CG_CONTEXT_SHOW_BACKTRACE

ios 9报警告如下:

CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.


原因:设置app的状态栏样式的使用使用了旧的方式,在info.plist里面设置了View controller-based status bar appearance为NO


解决方式:删除info.plist中的View controller-based status bar appearance,并将状态栏交给控制器管理

你可能感兴趣的:(CG_CONTEXT_SHOW_BACKTRACE)