Hi There,
When adapting custom UIKit view controllers for iPhone Duo, what is the recommended architectural boundary for detecting hinge articulation?
The potentially unsatisfying answer is that it "depends".
If you are using built-in container view controllers, like UISplitViewController, then they will likely already be adapting to the fold.
I'd recommend checking out "Strike a pose with adaptive layouts on iPhone Duo" as it has some good suggestions on when to use something like ArrangementViews or Reserved Regions:
https://developer.apple.com/videos/play/tech-talks/111463/
Does the system surface posture changes through UITraitCollection(such as new traits or size class combinations), or are developers expected to observe UIView.reservedRegions(kind: .division) mutations exclusively inside layoutSubviews() and viewSafeAreaInsetsDidChange()?
There are not UITraitCollection traits of the type you are mentioning. Again, I'd refer to the video above. Generally our recommendation has been to
- Prefer built-in container view controllers when possible
- Use
ArrangementViews for more custom horizontal split or overlay layouts - Use Reserved Regions for manually laid-out controls as needed.
Furthermore, when the hinge moves, how should view controllers coordinate transitions between a dual-pane layout and a unified continuous column without tearing down existing child view controllers?
Perhaps not quite what you are asking, but there's a similar question here:
https://developer.apple.com/forums/thread/847795?answerId=906614022#906614022
Specifically, thinking about how to place an ArrangementView or UIArrangementViewController within your existing navigational container may help answer this question.
Good luck!