restricting InterfaceOrientations
restricting InterfaceOrientations
- Subject: restricting InterfaceOrientations
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Fri, 08 Aug 2014 10:50:49 +0700
Master-Detail app on iOS. Universal, Xcode (Targets, General) allows all orientations.
Problem: on iPhone the DetailView does not make sense in landscape (iPad is fine with landscape).
Fix1: added supportedInterfaceOrientations to DetailViewController, but this did never get called.
"When the user changes the device orientation, the system calls this method on the root view controller or the topmost presented view controller that fills the window."
Probably my DetailViewController is not the root view controller. Ok.
Fix2: added supportedInterfaceOrientations to MasterViewController; this gets called occasionally and iPhone returns 0x6 (should mean both portraits, no landscape) and shouldAutorotate is YES (I checked).
The layout is:
Window → UINavigationController → MasterViewController
But the silly phone ignores the return value and displays in landscape (why does it ask, if it is going to ignore my answer?).
Device 7.1.2; Xcode 6 beta 5; SDK latest.
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden