- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我一直在尝试监听状态栏高度的变化 - 例如当通话状态栏显示或隐藏时,或者与互联网共享状态栏相同 - 通过监听 UIApplicationWillChangeStatusBarFrameNotification 通知已发送。
这里的代码相当简单......
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(statusBarWillChangeFrame:)
name:UIApplicationWillChangeStatusBarFrameNotification
object:nil];
但在这种情况下,通知似乎永远不会发送,无论是在模拟器上使用“切换通话状态栏”选项,还是在应用程序打开且通话结束时在设备上发送。另外,类似的UIApplicationDelegate方法也没有被调用。
根据文档,
UIApplicationWillChangeStatusBarFrameNotification
Posted when the application is about to change the frame of the status bar.
The userInfo dictionary contains an NSValue object that encapsulates a CGRect structure expressing the location and size of the new status bar frame. Use UIApplicationStatusBarFrameUserInfoKey to access this value.
任何人都可以解释为什么没有发送此通知来响应显示或隐藏的通话状态栏吗?根据文档,应该是这样。
最佳答案
这似乎是一个活跃的 SDK 错误。就这么多了。
参见http://openradar.appspot.com/6475681和 http://openradar.appspot.com/7080782 .
关于iphone - 为什么状态栏改变高度时没有发送 UIApplicationWillChangeStatusBarFrameNotification?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2406175/
我一直在尝试监听状态栏高度的变化 - 例如当通话状态栏显示或隐藏时,或者与互联网共享状态栏相同 - 通过监听 UIApplicationWillChangeStatusBarFrameNotifica
我是一名优秀的程序员,十分优秀!