问题
In xcode when I turn on the decimal pad keyboard option in the .xib for my textfield, and I run the application, I receive this error:
Jun 13 01:22:38 Nicholas-Gibsons-iPhone Quick Utilities[1009] <Error>:
CGContextSetFillColorWithColor: invalid context 0x0. This is a serious error. This
application, or a library it uses, is using an invalid context and is thereby
contributing to an overall degradation of system stability and reliability. This notice is
a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
If you have any idea what this really means, you would be a lot of help! Thanks so much!
回答1:
try the following :
textField.keyboardType = UIKeyboardTypeDecimalPad;
回答2:
Check to see if you are using context anywhere - if so rename it anywhere it occurs.
来源:https://stackoverflow.com/questions/17080554/xcode-number-pad-with-decimal-error