Skip to content

Commit

Permalink
Corrige bug do IOS
Browse files Browse the repository at this point in the history
  • Loading branch information
ernonemacher committed Sep 28, 2021
1 parent bfd00ad commit a78f5ea
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@

.DS_Store

*.meta
9 changes: 0 additions & 9 deletions Android~/UnityMobileInput/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion Android~/UnityMobileInput/app/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion Android~/UnityMobileInput/common/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion Android~/UnityMobileInput/mobileinput/.gitignore

This file was deleted.

8 changes: 4 additions & 4 deletions Plugins/iOS/MobileInput.mm
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ - (id)initWith:(UIViewController *)controller andTag:(int)idInput {
if (self = [super init]) {
viewController = controller;
inputId = idInput;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidShow:) name:UIKeyboardDidShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidHide:) name:UIKeyboardDidHideNotification object:nil];
}
return self;
}
Expand Down Expand Up @@ -584,7 +584,7 @@ - (void)textFieldDidChange:(UITextField *)theTextField {
[self onTextChange:theTextField.text];
}

- (void)keyboardWillShow:(NSNotification *)notification {
- (void)keyboardDidShow:(NSNotification *)notification {
if (![editView isFirstResponder]) {
return;
}
Expand All @@ -600,7 +600,7 @@ - (void)keyboardWillShow:(NSNotification *)notification {
[self sendData:msg];
}

- (void)keyboardWillHide:(NSNotification *)notification {
- (void)keyboardDidHide:(NSNotification *)notification {
NSMutableDictionary *msg = [[NSMutableDictionary alloc] init];
[msg setValue:KEYBOARD_ACTION forKey:@"msg"];
[msg setValue:[NSNumber numberWithBool:NO] forKey:@"show"];
Expand Down

0 comments on commit a78f5ea

Please sign in to comment.