Fixed iOS keyboard positioning, based on the final position rather than the initial one

This commit is contained in:
Sam Lantinga 2017-09-14 09:55:27 -07:00
parent 76176486ce
commit cfe72c76e2

View File

@ -281,7 +281,7 @@ SDL_AppleTVControllerUIHintChanged(void *userdata, const char *name, const char
- (void)keyboardWillShow:(NSNotification *)notification - (void)keyboardWillShow:(NSNotification *)notification
{ {
#if !TARGET_OS_TV #if !TARGET_OS_TV
CGRect kbrect = [[notification userInfo][UIKeyboardFrameBeginUserInfoKey] CGRectValue]; CGRect kbrect = [[notification userInfo][UIKeyboardFrameEndUserInfoKey] CGRectValue];
/* The keyboard rect is in the coordinate space of the screen/window, but we /* The keyboard rect is in the coordinate space of the screen/window, but we
* want its height in the coordinate space of the view. */ * want its height in the coordinate space of the view. */