xcode 7 错误:CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG
来源:互联网 发布:2017年新出的网络剧 编辑:程序博客网 时间:2024/06/10 18:59
Oct 12 16:01:45 yingyong[1639] <Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.Oct 12 16:01:45 yingyong[1639] <Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.Oct 12 16:01:45 yingyong[1639] <Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.2015-10-12 16:01:46.075 yingyong[1639:228828] CUICatalog: Invalid asset name supplied: (null)2015-10-12 16:01:46.075 yingyong[1639:228828] CUICatalog: Invalid asset name supplied: (null)
出错原因:
设置app的状态栏样式的使用使用了旧的方式,在info.plist里面设置了View controller-based status bar appearance为NO,默认为YES,一般式iOS6的时候使用这种方式,iOS7,8也兼容,但是到了iOS9就报了警告。
解决办法:
(1)删除 原先的设置代码
//设置状态栏的白色 [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
(2)修改plist方式将View controller-based status bar appearance设置为YES,然后使用新的方式来实现状态栏的样式。
(3)在你的 自定义导航控制器里面 写上如下方法:
//设置状态栏的(亮色)白色-(UIStatusBarStyle)preferredStatusBarStyle{ return UIStatusBarStyleLightContent;}记住要clean 或者删除应用程序 重新运行
0 0
- xcode 7 错误:CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG
- <Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_C
- ios错误<Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set
- Error>: CGContextDrawImage: invalid context 0x0. If you want to see the backtrace, please set CG_CON
- If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
- iOS报错 - If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variabl
- CGContextSaveGState: invalid context 0x0
- 一种解决办法:CGContextSaveGState: invalid context 0x0
- ios修改status bar颜色及xcode7下日志出现CGContextSaveGState: invalid context 0x0错误
- CGContextSaveGState: invalid context 0x0. This is a serious error.
- 《iOS总结》 <Error>: CGContextSaveGState: invalid context 0x0.
- To see the people you want to see
- 使用UIBezierPath绘图控制台<Eorro>CGContextSaveGState: invalid context 0x0,CGContextSetLineWidth: invalid co
- 错误:CGContextSetStrokeColorWithColor: invalid context 0x0
- 点击文本框第一次输入中文的时候出现CGContextSaveGState: invalid context 0x0
- UIBezierPath CGContextSaveGState: invalid context 0x0. This is a serious error.
- UIBezierPath CGContextSaveGState: invalid context 0x0. This is a serious error.
- 升级到XCode7后出现 <Error>: CGContextSaveGState: invalid context 0x0.
- 第4周实践项目1-- 建立单链表
- grape api单元测试
- 第七周项目二~~链队算法库
- [原]iOS--字符编码,NSString和UTF-8间的转换
- Impala005-Impala SQL操作内部表和外部表
- xcode 7 错误:CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG
- 第8周 项目2—建立链串算法库
- asp jquery ajxs json和jsonp跨域请求
- AssetDatabaseOpenHelper 数据库工具类
- ant的讲解
- 第六周项目2--建立链栈算法库
- 第七周—项目1 - 建立顺序环形队列算法库
- 顺序表
- 每天一个linux命令(33):df 命令