<Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
世界只因有你2017-05-02 09:20:34
The old method is used to set the status bar style of the app. In the info.plist, the View controller-based status bar appearance is set to NO, and the default is YES. This method is generally used for iOS6, and also for iOS7 and 8. Compatible, but a warning was reported when iOS9 arrived.
Delete the original setting code
//设置状态栏的白色
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
In the Xcode project file settings, set View controller-based status bar appearance to YES, and then use the new method to implement the status bar style.
Write the following method in your custom navigation controller:
//设置状态栏的(亮色)白色
-(UIStatusBarStyle)preferredStatusBarStyle
{
return UIStatusBarStyleLightContent;
}
Clean or delete the application and re-run
Warning elimination