summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/iphone/view_controller.h4
-rw-r--r--platform/iphone/view_controller.mm12
2 files changed, 16 insertions, 0 deletions
diff --git a/platform/iphone/view_controller.h b/platform/iphone/view_controller.h
index fc18661f62..68e3bc64fc 100644
--- a/platform/iphone/view_controller.h
+++ b/platform/iphone/view_controller.h
@@ -39,6 +39,10 @@
- (void)didReceiveMemoryWarning;
+- (void)viewDidLoad;
+
+- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures;
+
- (BOOL)prefersStatusBarHidden;
@end
diff --git a/platform/iphone/view_controller.mm b/platform/iphone/view_controller.mm
index 0358abf9e2..e52ad92bf2 100644
--- a/platform/iphone/view_controller.mm
+++ b/platform/iphone/view_controller.mm
@@ -83,6 +83,18 @@ int add_cmdline(int p_argc, char **p_args) {
printf("*********** did receive memory warning!\n");
};
+- (void)viewDidLoad {
+ [super viewDidLoad];
+
+ if (@available(iOS 11.0, *)) {
+ [self setNeedsUpdateOfScreenEdgesDeferringSystemGestures];
+ }
+}
+
+- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures {
+ return UIRectEdgeAll;
+}
+
- (BOOL)shouldAutorotate {
switch (OS::get_singleton()->get_screen_orientation()) {
case OS::SCREEN_SENSOR: