Posted By

joshparnham on 12/23/10


Tagged

bar status orientation


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

terababy
Tintenklecks
cnathan
Rakesh


Remove status bar when the iOS device is landscape orientation


 / Published in: Objective C
 

  1. -(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
  2. {
  3. if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft||UIInterfaceOrientationLandscapeRight) {
  4. [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];
  5. }
  6. if (toInterfaceOrientation == UIInterfaceOrientationPortrait) {
  7. [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
  8. }
  9.  
  10. }

Report this snippet  

You need to login to post a comment.