Good answer @roaminggamer!
Rob
I see know that this has been implemented in daily builds, “preferredScreenEdgesDeferringSystemGestures”.
Is there any documentation on how to use this?
Thanks,
Matt
Hi this was also talked about here:
https://forums.coronalabs.com/topic/71426-preferredscreenedgesdeferringsystemgestures/
If the question is, “How do I enable this?”
I think the answer you are looking for is,
native.setProperty( "preferredScreenEdgesDeferringSystemGestures", true)
https://docs.coronalabs.com/api/library/native/setProperty.html
I think the docs are a little behind on this one.
Thanks, I will try this asap…
Matt
do I put this in config.lua or in the actual lua file where the game play exists?
Thank you in advance!
Matt
No, you do not put that in config.lua.
You do it in in main.lua or any other script you use for initializing your game logic if you prefer.
I added the code to main.lua and the behavior of the swipe has not been changed. Meaning, I still have the same swipe behavior, one swipe from the bottom of the screen in portrait easily brings up the control center.
Am I missing something here?
here is the code I added:
native.setProperty( “preferredScreenEdgesDeferringSystemGestures”, true ) – disables single swipe up for control center in IOS
Thanks,
Matt
I just added this to an app and it’s working as expected. I copy/pasted the exact code above.
On first swipe up or down, I get an arrow displayed and then I have to swipe a second time on the arrow. I tested on an iPhone 6 running iOS 11.2.2.
I’m using Corona build 3195.
Rob
Hi Rob,
My rookie mistake, I was using the incorrect build for my test. I can confirm it does indeed work as described, awesome, many thanks to the team for providing this!
Regards,
Matt
Just a note here - this does not work in conjunction with “prefersHomeIndicatorAutoHidden”