ios - App rotating to landscape left and right, when landscape "right" is explicitly chosen. Xcode 7.2.1 -
can tell me why happening? there anywhere else needs defined?
//appdelegate - (nsuinteger)supportedinterfaceorientations { return uiinterfaceorientationmasklandscaperight; } - (bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation { return (interfaceorientation == uiinterfaceorientationlandscaperight); //return no; } -(bool)shouldautorotate { return no; }
i found interface orientation method in app delegate. @matt's comment, made me take harder look. returning landscape, changed landscape right , fine now.
- (uiinterfaceorientationmask)application:(uiapplication *)application supportedinterfaceorientationsforwindow:(uiwindow *)window { if (([window.rootviewcontroller.presentedviewcontroller iskindofclass:[uiimagepickercontroller class]]) && (window.rootviewcontroller.presentedviewcontroller.isbeingdismissed == no)) { return uiinterfaceorientationmaskportrait; } //return uiinterfaceorientationmasklandscape; return uiinterfaceorientationmasklandscaperight; }
Comments
Post a Comment