fix iOS screen rotation with keyboard
This commit is contained in:
@@ -227,7 +227,7 @@ std::recursive_mutex lock_mutex;
|
||||
{
|
||||
App::I->redraw = true;
|
||||
App::I->animate = false;
|
||||
[self unregisterForKeyboardNotifications];
|
||||
//[self unregisterForKeyboardNotifications];
|
||||
}
|
||||
|
||||
// Called when the UIKeyboardDidShowNotification is sent.
|
||||
@@ -237,7 +237,8 @@ std::recursive_mutex lock_mutex;
|
||||
CGSize kbSize = [[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue].size;
|
||||
|
||||
GameView *view = (GameView *)self.view;
|
||||
CGRect frame = view.frame;
|
||||
//CGRect frame = view.frame;
|
||||
CGRect frame = [[UIScreen mainScreen] bounds];
|
||||
frame.size.height -= kbSize.height;
|
||||
view.frame = frame;
|
||||
|
||||
@@ -409,7 +410,7 @@ std::set<UITouch*> ignored_touch;
|
||||
{
|
||||
App::I->redraw = true;
|
||||
[self resignFirstResponder];
|
||||
//[self registerForKeyboardNotifications];
|
||||
[self registerForKeyboardNotifications];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
|
||||
Reference in New Issue
Block a user