Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
iOS 11 and later delay in touch response near edge of screen (with FIX) — Gideros Forum

iOS 11 and later delay in touch response near edge of screen (with FIX)

EricCarrEricCarr Member
edited December 2018 in Bugs and issues
I noticed in my games that tapping near the edge had a long delay of firing a response on my iPhones. I looked and found that, before ios11, hiding the status bar told the system "Allow me to handle edge based gestures first" but in ios11 and later, you have to explicitly tell it this. So, I added a fix to these two files which seems to have fixed it:

ViewController.m (added at the end)
- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures{
    return  UIRectEdgeAll;
}

AppDelegate.m (added after wantsFullScreenLayout)
self.viewController.wantsFullScreenLayout = YES; // this should be removed. Deprecated since v7.0!
if (#available(iOS 11.0, *)) {
       [self.viewController setNeedsUpdateOfScreenEdgesDeferringSystemGestures];
}

IMPORTANT: #available should be (at sign)available.

EDIT - :# PRE does not work correctly. PRE means *NOTHING INSIDE SHOULD BE TOUCHED*. But the "at" symbol is adding a link in the code above so I had to change it to a # sign. Something to review :smile:

Likes: Apollo14

Tagged:
+1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.