Skip to content

Instantly share code, notes, and snippets.

@rhysforyou
Created October 31, 2011 12:18
Show Gist options
  • Select an option

  • Save rhysforyou/1327369 to your computer and use it in GitHub Desktop.

Select an option

Save rhysforyou/1327369 to your computer and use it in GitHub Desktop.
// In AppDelegate.m
- (void)application:(UIApplication *)application
willChangeStatusBarOrientation:(UIInterfaceOrientation)newStatusBarOrientation duration:(NSTimeInterval)duration
{
// Do some stuff with the orientation
// UIOrientation is an enumerable defined as
//
// typedef enum {
// UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait,
// UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown,
// UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeRight,
// UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeft
// } UIInterfaceOrientation;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment