***** Assertion failure in -[UICGColor encodeWithCoder:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3512.60.7/UIColor.m:1457**
***** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Only RGBA or White color spaces are supported in this situation.'**
我碰到的这个错误的场景是:我在tableviewcell的左滑中加入一个按钮弹出带UITextField的AlertController,然后就报错
解决方法:
我的NavBar的背景颜色用的是这种模式赋值
[[UINavigationBar appearance] setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"title_bar"]]];
但是要改为
[[UINavigationBar appearance] setBackgroundColor:RGBColor(0xfdfdfd)];
这样才不会报错