mirror of
https://github.com/godotengine/godot.git
synced 2024-11-23 20:53:15 +00:00
iOS>=11 platform - when handling gestures on screen edges, godot apps should have priority over OS
Solves an issue where iOS would steal InputEventTouch events when near screen edges in order to handle system wide gestures. Fixes #31503
This commit is contained in:
parent
3bd49dabfa
commit
e0df9de0cb
@ -39,6 +39,10 @@
|
||||
|
||||
- (void)didReceiveMemoryWarning;
|
||||
|
||||
- (void)viewDidLoad;
|
||||
|
||||
- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures;
|
||||
|
||||
- (BOOL)prefersStatusBarHidden;
|
||||
|
||||
@end
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user