我有一个特定的边缘情况我试图考虑 - 在加载应用程序之前状态栏已经可见的情况。我的AppDelegate中的以下代码不考虑这种情况(它只考虑状态栏的更改时间):
- (void) application:(UIApplication *)application willChangeStatusBarFrame:(CGRect)newStatusBarFrame
{
self.currentStatusBarFrame = newStatusBarFrame;
[[NSNotificationCenter defaultCenter] postNotificationName:@"Status Bar Frame Change"
object:self
userInfo:@{@"current status bar frame": [NSValue valueWithCGRect:newStatusBarFrame]}];
}
是否有人知道类似的功能会检查状态栏是否已经可见?我似乎无法在任何地方找到答案。