***** 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)];
這樣才不會報錯