Based on the provided information, here are the key changes and APIs introduced in iOS 16 for supporting foldable devices:
Changes
-
Reserved Regions:
- New regions like
safeArea,safeAreaInsets, andsafeAreaFramethat account for hinge gaps. - Use
.edgesIgnoringSafeArea(.all)to ignore safe areas.
- New regions like
-
Arrangement API:
- Two types: Split (side-by-side) and Overlay (stacked).
- Split prefers stacking, moves to side-by-side as device folds.
- Overlay prefers stacking content above/below, moves to side-by-side on fold.
-
Hinge API:
- Provides coarse status (closed/partially open/fully open) and continuous angle.
- Use
onHingeChangein SwiftUI orUIHingeInteractionin UIKit.
-
Multiple Scenes:
- Supports two apps side-by-side on iPhone for the first time.
- Same tools as resizing on iPad or iPhone mirroring (size classes, scene geometry).
Key APIs
- Reserved Regions:
swift
1struct ContentView: View { 2 var body: some
Read the full article at DEV Community
Want to create content about this topic? Use Nemati AI tools to generate articles, social posts, and more.



