Skip to content

Commit

Permalink
Merge pull request mopsicus#33 from frbodya/master
Browse files Browse the repository at this point in the history
Fix IOS: Keyboard Height return in pixel
  • Loading branch information
mopsicus authored Mar 16, 2020
2 parents 840df20 + 9bf0fff commit 8caf4e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Unity/Assets/Plugins/iOS/MobileInput.mm
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,8 @@ - (void)keyboardWillShow:(NSNotification *)notification {
NSDictionary *keyboardInfo = [notification userInfo];
NSValue *keyboardFrameBegin = [keyboardInfo valueForKey:UIKeyboardFrameEndUserInfoKey];
rectKeyboardFrame = [keyboardFrameBegin CGRectValue];
CGFloat height = rectKeyboardFrame.size.height;
CGFloat screenScale = [[UIScreen mainScreen] scale];
CGFloat height = screenScale * rectKeyboardFrame.size.height;
NSMutableDictionary *msg = [[NSMutableDictionary alloc] init];
[msg setValue:KEYBOARD_ACTION forKey:@"msg"];
[msg setValue:[NSNumber numberWithBool:YES] forKey:@"show"];
Expand Down

0 comments on commit 8caf4e6

Please sign in to comment.