Keyboard layout issues
Cyberbeni opened this issue · 0 comments
Cyberbeni commented
First of all, you want to subscribe to UIKeyboardWillChangeFrameNotification and then ifelse based on (keyboardEnd.origin.y < [[UIScreen mainScreen] bounds].size.height)
And then you want to set toolbarHolder's frame like this:
CGRect frame = self.toolbarHolder.frame;
CGRect kbRect = [self.toolbarHolder.superview convertRect:keyboardEnd fromView:nil];
frame.origin.y = kbRect.origin.y - sizeOfToolbar;
self.toolbarHolder.frame = frame;
Only tested on iOS12 but it solved my issues with being in a container that has stuff at the bottom.