ios - Control autorotation from a view controller without modifying the rest of the app -


i'm developing ios framework. contains view controller can displayed modally app using framework. don't have access app code, framework. i'd prevent autorotation when view controller being displayed. can done? i've tried returning no shouldautorotatetointerfaceorientation: in vc, doesn't called.

you add code appdelegate. allow other viewcontrollers respond autorotation calls.

- (nsuinteger)application:(uiapplication *)application supportedinterfaceorientationsforwindow:(uiwindow *)window{ /* in order allow views not support landscape mode able load in  */ return uiinterfaceorientationmaskall; } 

also, in ios 6.0 , later shouldautorotatetointerfaceorientation: method has been deprecated. substituted following methods:

- (nsuinteger)supportedinterfaceorientations{     return uiinterfaceorientationmaskportrait; } - (uiinterfaceorientation)preferredinterfaceorientationforpresentation{     return uiinterfaceorientationportrait; } - (bool) shouldautorotate{     return yes; } 

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -