summaryrefslogtreecommitdiff
path: root/platform/iphone/view_controller.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/iphone/view_controller.mm')
-rw-r--r--platform/iphone/view_controller.mm20
1 files changed, 10 insertions, 10 deletions
diff --git a/platform/iphone/view_controller.mm b/platform/iphone/view_controller.mm
index e11eff423b..d3969e6b02 100644
--- a/platform/iphone/view_controller.mm
+++ b/platform/iphone/view_controller.mm
@@ -33,15 +33,18 @@
#include "display_server_iphone.h"
#import "godot_view.h"
#import "godot_view_renderer.h"
+#import "keyboard_input_view.h"
#import "native_video_view.h"
#include "os_iphone.h"
+#import <AVFoundation/AVFoundation.h>
#import <GameController/GameController.h>
@interface ViewController ()
@property(strong, nonatomic) GodotViewRenderer *renderer;
@property(strong, nonatomic) GodotNativeVideoView *videoView;
+@property(strong, nonatomic) GodotKeyboardInputView *keyboardView;
@end
@@ -101,6 +104,10 @@
}
- (void)observeKeyboard {
+ printf("******** setting up keyboard input view\n");
+ self.keyboardView = [GodotKeyboardInputView new];
+ [self.view addSubview:self.keyboardView];
+
printf("******** adding observer for keyboard show/hide\n");
[[NSNotificationCenter defaultCenter]
addObserver:self
@@ -118,6 +125,9 @@
[self.videoView stopVideo];
self.videoView = nil;
+
+ self.keyboardView = nil;
+
self.renderer = nil;
[[NSNotificationCenter defaultCenter] removeObserver:self];
@@ -214,14 +224,4 @@
}
}
-// MARK: Delegates
-
-#ifdef GAME_CENTER_ENABLED
-- (void)gameCenterViewControllerDidFinish:(GKGameCenterViewController *)gameCenterViewController {
- //[gameCenterViewController dismissViewControllerAnimated:YES completion:^{GameCenter::get_singleton()->game_center_closed();}];//version for signaling when overlay is completely gone
- GameCenter::get_singleton()->game_center_closed();
- [gameCenterViewController dismissViewControllerAnimated:YES completion:nil];
-}
-#endif
-
@end