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)didReceiveMemoryWarning;
|
||||||
|
|
||||||
|
- (void)viewDidLoad;
|
||||||
|
|
||||||
|
- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures;
|
||||||
|
|
||||||
- (BOOL)prefersStatusBarHidden;
|
- (BOOL)prefersStatusBarHidden;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -83,6 +83,18 @@ int add_cmdline(int p_argc, char **p_args) {
|
||||||
printf("*********** did receive memory warning!\n");
|
printf("*********** did receive memory warning!\n");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
[super viewDidLoad];
|
||||||
|
|
||||||
|
if (@available(iOS 11.0, *)) {
|
||||||
|
[self setNeedsUpdateOfScreenEdgesDeferringSystemGestures];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures {
|
||||||
|
return UIRectEdgeAll;
|
||||||
|
}
|
||||||
|
|
||||||
- (BOOL)shouldAutorotate {
|
- (BOOL)shouldAutorotate {
|
||||||
switch (OS::get_singleton()->get_screen_orientation()) {
|
switch (OS::get_singleton()->get_screen_orientation()) {
|
||||||
case OS::SCREEN_SENSOR:
|
case OS::SCREEN_SENSOR:
|
||||||
|
|
Loading…
Reference in New Issue