objective-c - iOS开发过程中大家遇到过这样的打印信息吗
PHP中文网
PHP中文网 2017-05-02 09:18:34
0
1
430
<Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
PHP中文网
PHP中文网

认证0级讲师

reply all(1)
世界只因有你

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template