[UICGColor encodeWithCoder:] 以及Only RGBA or White color spaces are supported

错误描述:
xcode 控制台提示错误:
Assertion failure in -[UICGColor encodeWithCoder:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/
友盟崩溃错误描述:
Only RGBA or White color spaces are supported in this situation.

原因:
在设置导航背景颜色是使用 colorWithPatternImage: 方法导致错误崩溃
[[UINavigationBar appearance] setBarTintColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"back.png"]]];

解决办法:
换用其他方法设置颜色,如[UIColor lightGrayColor] 即可。

你可能感兴趣的:([UICGColor encodeWithCoder:] 以及Only RGBA or White color spaces are supported)