iphone - In iOS6, trouble forcing ViewController to certain interfaceOrientation when pushed on stack -
i have following view controller set up:
viewcontroller1 able rotate freely orientation except portrait upside down.
viewcontroller2 gets pushed on top of viewcontroller1, , i'd same orientation viewcontroller1 , i'd not able rotate.
viewcontroller3 gets pushed on top of viewcontroller2. i'd viewcontroller3 in portrait mode.
i'm having lot of issues trying accomplish in ios6 (haven't tried yet in ios5). first off, have created own navigation controller , put following in it:
- (uiinterfaceorientation)preferredinterfaceorientationforpresentation { return [self.topviewcontroller preferredinterfaceorientationforpresentation]; } - (nsuinteger)supportedinterfaceorientations { return [self.topviewcontroller supportedinterfaceorientations]; } - (bool) shouldautorotate { return [self.topviewcontroller shouldautorotate]; }
i've tried lot of different combinations of these things know avail. i'm struggling forcing vc3 presented portrait if vc2 in landscape. appreciated.
what you're trying here fighting framework. you're describing not how navigation controller architecture works in ios 6. if want show view controller's view , force rotation, use presented view controller. that's time preferredinterfaceorientationforpresentation
meaningful, , view controller's supportedinterfaceorientations
consulted because, being presented, @ root of interface.
Comments
Post a Comment