5

Recently I upgrade my Xcode to Xcode5...

Sometimes running my app on my iPhone/iPad Simulator when I try to write on any UITextfield of my app (with my physical keyboard) this error appears on my Xcode5 ouptut window:

<Error>: CGContextSetBlendMode: 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 I use the keyboard of the simulator (screen), it works fine, but for testing purposes I'd rather typing on my Mac's Keyboard for quick development/testing, any ideas how to fix this???

thanks in advance

Jesús Ayala
  • 2,743
  • 3
  • 32
  • 48
  • 3
    don't worry... is a bug.. http://stackoverflow.com/questions/17777928/uisearchbar-cgcontext-error – TonyMkenu Oct 10 '13 at 13:06
  • thanks, they should fix that, on simulator this bug disable to enter anything by using my physical keyboard :( – Jesús Ayala Oct 10 '13 at 15:07
  • Yes, I know, I have the same issue... – TonyMkenu Oct 10 '13 at 15:13
  • possible duplicate of [invalid context 0x0 under iOS 7.0 and system degradation](http://stackoverflow.com/questions/19599266/invalid-context-0x0-under-ios-7-0-and-system-degradation) – allprog Jan 05 '14 at 21:57

2 Answers2

3

This issue happened to me also when I moved to iOS 7.0. I've noticed that in the case of UITextfields, this issue occurs only with the empty text fields, especially on double clicking it. So I just done the following to remove the error:

myTextField.text = @" "; // Just replaced the textfield text with a 'space' on init
Krishna Raj Salim
  • 7,331
  • 5
  • 34
  • 66
3

I found a work around if you are still getting this error and you are using xib and/or storyboards. You can stop the error from occurring by setting 'capitalization' to 'none' and 'correction' to 'No' on the properties tab for the textbox. You maybe able to use one or the other but once I changed both properties the error went away.

forbra
  • 83
  • 2
  • 1
    Well, this is not exactly a solution but good to know. And what if these properties are demanded? – allprog Jan 05 '14 at 21:54