我已经创建了一个设备方向监听器来捕捉设备旋转的时间,就像这样
[[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];
关于iphone - device Orientation 到 statusBar Orientation 改变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11091521/