[英]device Orientation to statusBar Orientation changes
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. 但是在jumpBarButtonPosition方法内部,我已从使用UIDeviceOrientation更改为statusBarOrientation,因此我很讨厌替换UIDeviceOrientationDidChangeNotification所使用的内容,以便仅接收有关statudBarOrientation更改的通知。
Don't type it as a string:@"UIDeviceOrientationDidChangeNotification" use: 不要将其键入为字符串:@“ UIDeviceOrientationDidChangeNotification”使用:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(jumpBarButtonPosition)
name:UIDeviceOrientationDidChangeNotification object:nil];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.