objective c - Presenting a modal view controller forced in landscape orientation -


i presenting modal view controller table view (ignore memory leaks, testing..):

[self presentmodalviewcontroller:[[signaturevc alloc] init] animated:yes]; 

and in signaturevc, implementing this:

-(bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation {     return (interfaceorientation == uiinterfaceorientationlandscapeleft); } 

i want signaturevc in landscape mode. however, after presenting modal view controller, orientation doesn't change. doing wrong? thanks.

the method -shouldautorotatetointerfaceorientation: not rotate interface orientation. merely allows interface orientation rotate if device orientation rotates.

if modal view appears when device in portrait, in portrait. however, once rotate landscapeleft, remain locked in orientation code.

to force interface rotate, can use

[uiapplication sharedapplication].statusbarorientation = uiinterfaceorientationlandscaperight; 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -