ios - shouldAutorotate is not locking the screen orientation -
i ma trying lock screen orientation landscape orientation when image still visible, when image hidden, unlock orientations (targeting ios 6):
-(bool)shouldautorotate{ if (self.splashimageview.hidden == no) { return uiinterfaceorientationmaskportrait;//gets called when image visible }else{ return uiinterfaceorientationmaskall;//gets called when image hidden } } - (void)willrotatetointerfaceorientation:(uiinterfaceorientation)tointerfaceorientation duration:(nstimeinterval)duration { [self shouldautorotate]; }
as may notice, shouldautorotate
called screen supporting landscape orientation when image still visible, there missing?
p.s: please note trying work on tabbar view controller (a uiviewcontroller
subclass).
in appdelegate have 2 methods.but have setting in project settings -> go summary tab , see if orientation set landscape or all.just try set those.
Comments
Post a Comment