UICachedDeviceRGBColor CGImage]: unrecognized selector sent to instance 0xxxxxxxxxxx'
报错原因是
本来应该写空间的背景色:
textField.backgroundColor = [UIColor redColor];
但是如果你 没注意,直接写了
textField.background = kColorRed;
就会报这个错误。
因为
.background这个属性 的类型是 uiimage,而你却隔了它一个 rgb的颜色 所以有如此的提示。