Some error calculating keyboard size for bigger phones (as example iPhone 6)
vronin opened this issue · comments
It works very well for iPhone 5 on which I mainly played with it.
However, it has problems with resizing on iPhone 6.
As example, I have a view with just one TextView which occupies whole screen. The keyboard is opened when TextView becomes a first responder. SingleLineKeyboardResize is executed and it inserts to TextView. However, inserts are a little bit wrong size. As result, the bottom of TextView will end up being under the keyboard.
Hmm. Will investiage
I believe I have the same problem on UITableView too, on iphone 6 the bottom 2 rows will be covered by keyboard. However if the keyboard is dismissed and showed again, the tableView will be resized correctly.
You can consistently replicate this?
Yes
It worked if the listener changed from UIKeyboardWillShowNotification
to UIKeyboardDidShowNotification
I was doing becomeFirstResponder() at viewDidLoad. SingleLineKeyboardResize was getting called very early when frames weren't set correctly yet. I moved becomeFirstResponder() to viewWillAppear and it solved this problem