ios - Status Bar remains in landscape, while UIInterfaceOrientation is only portrait -


i developing iphone app. application supports portrait , landscape orientations in supported interface orientations, in first view of application disable rotation following code:

- (bool)shouldautorotate {     return no; }  - (nsuinteger)supportedinterfaceorientations {     return uiinterfaceorientationmaskportrait; } 

now, problem when start app on ipad ios 6.1 while holding ipad in landscape mode, app starts in portrait mode while status bar in landscape mode. also, application not respond touches.

i have tried returning yes in call shouldautorotate or setting status bar in portrait mode call [[uiapplication sharedapplication] setstatusbarorientation:uiinterfaceorientationportrait], when application switches 3 times in orientation (landscape -> portrait upsidedown -> portrait) resulting in lot of flickering @ start-up, doesn't seem way go, or it?

what have in appdelegate function

- (nsuinteger)application:(uiapplication *)application supportedinterfaceorientationsforwindow:(uiwindow *)window{ }

by default, app , view controller’s supported interface orientations set uiinterfaceorientationmaskall ipad idiom , uiinterfaceorientationmaskallbutupsidedown iphone idiom.

check selected viewcontroller in supportedinterfaceorientationsforwindow function , set portrait orientation.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -