0

we have a simple UITextField which lies on a second UIWindow. Touching it will correctly make it the first responder and a keyboard will be shown. However, no touched key, but the backspace, fires the textField:shouldChangeCharactersInRange:replacementString:. Every other UITextFieldDelegate method is being correctly fired. The textfield is created in an Interface Builder and it is not subclassed. Nothing seem to be stealing a first responder.

The bug occurs only on an iPhone 3GS, iOS 6.1.6.

xius
  • 596
  • 1
  • 6
  • 20

1 Answers1

0

Apparently, only the key window does get the changes from a first responder. It is as simple as to call makeKeyWindow on the appropriate window.

From the documentation:

Makes the receiver the main window.
xius
  • 596
  • 1
  • 6
  • 20
  • Still not sure why this was an issue for iOS 6 only. 3GS seems to not be as relevant here, since we don't have any other phone with iOS 6. Perhaps an unfortunate bug on Apple side? – xius Apr 16 '15 at 06:52