Guest User

Untitled

a guest
Jul 15th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. - (void)viewDidLoad {
  2. [super viewDidLoad];
  3. NSLog(@"viewDidLoad");
  4. // Tell the UIDevice to send notifications when the orientation changes
  5. [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
  6. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:) name:UIDeviceOrientationDidChangeNotification object:nil];
  7. }
  8.  
  9. // tell the director that the orientation has changed
  10. - (void) orientationChanged:(NSNotification *)notification
  11. {
  12. NSLog(@"orientationChanged");
  13. }
Add Comment
Please, Sign In to add comment