I have already looked at this solution. I have created a sample project showing the bug.
The view has only one UITextField on it.
and here is my code:
class ViewController: UIViewController {
@IBOutlet weak var mm: UITextField!
override func viewDidLoad() {
super.viewDidLoad()
let x = UIView(frame: CGRect(x: 0, y: 0, width: view.frame.width, height: 40))
x.backgroundColor = .red
mm.inputAccessoryView = x
}
}
When I tap on the textfield, here is what happens: --> The red view appears at the bottom and is just stuck there no matter if the keyboard is dismissed or not. Any help please?