'UITextView keyboard gets stuck
I am trying to dismiss keyboard and bring it back up programmatically, but after dismissal it gets stuck only the inputAccessoryView shows up. Can you please tell me what is going wrong? I have attached two images for the reference. Thank You !
code
textView.resignFirstResponder()
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
self.textView.becomeFirstResponder()
}
before execution of the code
after execution of the code
Solution 1:[1]
The following fixed the issue:
- Delete all UITextView's
- Add new UITextView's
set the default lorem imposed text and change this programmatically in the viewDidLoad()
OR
Fully quit the simulator and rerun the app. If that doesn't work, try with new simulator or device.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | AzeTech |


