[英]device Orientation to statusBar Orientation changes
我创建了一个设备定向侦听器,以在设备旋转时捕获它,就像这样
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(jumpBarButtonPosition)
name:@"UIDeviceOrientationDidChangeNotification" object:nil];
但是在jumpBarButtonPosition方法内部,我已从使用UIDeviceOrientation更改为statusBarOrientation,因此我很讨厌替换UIDeviceOrientationDidChangeNotification所使用的内容,以便仅接收有关statudBarOrientation更改的通知。
不要将其键入为字符串:@“ UIDeviceOrientationDidChangeNotification”使用:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(jumpBarButtonPosition)
name:UIDeviceOrientationDidChangeNotification object:nil];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.