I have created a device orientation listener to catch when the device is rotated, like so
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(jumpBarButtonPosition)
name:@"UIDeviceOrientationDidChangeNotification" object:nil];
however inside the jumpBarButtonPosition method I have changed from using UIDeviceOrientation to statusBarOrientation, so I am woundering what I could replace UIDeviceOrientationDidChangeNotification with in order to only receive notifications about the statudBarOrientation changes.
Don't type it as a string:@"UIDeviceOrientationDidChangeNotification" use:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(jumpBarButtonPosition)
name:UIDeviceOrientationDidChangeNotification object:nil];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.