Been looking at several SO post now, but none seem to help me. Just want a UITableView
s bottom constraint to be set so that the keyboard never is on top of the
You can detect if external keyboard is connected and and set keyboard's height to 0 by doing something like that.
Objective-C version:
CGRect finalKeyboardFrame = [[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
finalKeyboardFrame = [self convertRect:finalKeyboardFrame fromView:self.window];
NSLog(@"origin.y: %f", finalKeyboardFrame.origin.y);
Shows the y coordinate properly depending if external keyboard is connected or not:
origin.y: 258.000000 (not connected)
origin.y: 474.000000 (connected)