Closed rickrets closed 8 years ago
After tapping on "Cancel" or "Undo", the text view becomes first responder again and the keyboard shows up, right?
The keyboard shows up yeah, but the text input bar won't move with it.
Which version are you using? iOS version?
1.9.4 using pods, iOS 9.3 with the simulator and the latest iOS version on iPhone 6 and iPhone 6 Plus.
After pressing Cancel
or Undo
the code ends up here:
// Skips if it's not the expected textView and shouldn't force adjustment of the text input bar.
// This will also dismiss the text input bar if it's visible, and exit auto-completion mode if enabled.
if (![currentResponder isEqual:self.textView] && ![self forceTextInputbarAdjustmentForResponder:currentResponder]) {
[self slk_dismissTextInputbarIfNeeded];
return;
}
The currentResponder is a UIAlertController
, so my guess is that I can fix it by overriding forceTextInputbarAdjustmentForResponder:currentResponder
and return YES
if it's a UIAlertController
, but it seems wrong.
Unfortunately, that's the way of doing it. Here is how it's done in the sample project: https://github.com/slackhq/SlackTextViewController/blob/master/Examples/Messenger-Shared/MessageViewController.m#L366-L374
Jeez, how did I miss that. Thank you!
Quick steps to reproduce: