I ran into the same problem. In my case, at least this has to do with adding a UITapGestureRecognizer
to self.view
(to allow the keyboard to turn off if you click outside of UITextField
) and set cancelsTouchesInView=NO
in the gesture recognizer . I set this property to get the hyperlink working on the TTTAttributesLabel
I have elsewhere in the view.
My workaround was to monitor the keyboard and hide notifications, and toggle this property accordingly:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidShowNotification:) name:UIKeyboardDidShowNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidHideNotification:) name:UIKeyboardDidHideNotification object:nil];
(register for notifications)
- (void)keyboardDidShowNotification:(NSNotification*)notification { tapGestureRecognizer.cancelsTouchesInView = YES; } - (void)keyboardDidHideNotification:(NSNotification *)notification { tapGestureRecognizer.cancelsTouchesInView = NO; }
(recording notifications)
The only behavioral problem is that the hyperlink still does not work when the keyboard is displayed: touching it will simply cancel the keyboard, and not drag it to the link handler. But I can live with it. After the keyboard is rejected, the link works fine.
T'Pol source share