setNeedsStatusBarAppearanceUpdate无法识别的select器
我有iOS电话应用程序的问题,状态栏与iOS 7中的webview重叠。我find了解决问题的答案 ,但第二步,调用
[self setNeedsStatusBarAppearanceUpdate];
在viewDidLoad
导致应用程序在iOS 6崩溃,并引发unrecognized selector
。
未来,如果您需要使用iOS 7中的某些东西(例如setNeedsStatusBarAppearanceUpdate
并且您仍需要支持早期的iOS版本,则可以先检查是否支持select器:
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) { [self setNeedsStatusBarAppearanceUpdate]; }
原来没有必要添加[self setNeedsStatusBarAppearanceUpdate];
而且iOS 6和iOS 7的应用运行良好。
- Cordova媒体插件打破了iOS上的HTML5audio标签
- 在使用IONIC和angularJS制作的ios设备上testingIOS应用程序
- ios phonegap)我应该在哪里定位自定义推送通知声音?
- presentOpenInMenuFromRect不工作DocumentHandler.h – QuickLook
- 提供Quadtree GPS数据到应用程序的最佳select?
- iOS中的链接Ionic应用程序不能立即打开
- 是否可以使用Ripple模拟器testingPhoneGap File API
- Xcode 7.2构build离子应用程序的设置不断得到重置
- Cordova平台添加ios – 错误命令失败,退出代码2