With the latest iOS updates, GetPointerPressed(), GetPointerReleased() and GetPointerState() are not fired if you tap in the top or bottom areas (roughly 20-40pt at either end). GetRawTouhCount also returns 0 (except upon release in these areas where it records '1' for a single frame). You can test this simply with:
// set window properties
SetWindowSize( 1024, 768, 0 )
SetVirtualResolution( GetDeviceWidth(), GetDeviceHeight() )
SetOrientationAllowed( 1, 1, 1, 1 )
SetSyncRate( 30, 0 )
SetScissor( 0,0,0,0 )
UseNewDefaultFonts( 1 )
SetClearColor(0, 0, 96)
do
Print("Touch Count: " + Str(GetRawTouchCount(1)))
Print("Pointer Pressed: " + Str(GetPointerPressed()))
Print("Pointer Released: " + Str(GetPointerReleased()))
Print("Pointer State: " + Str(GetPointerState()))
Sync()
loop
If you hold your finger still in these regions for approximately one second, GetPointerPressed() is finally triggered for the first time and then touch count registers correctly. Likewise it behaves correctly if you start to slide your finger when down after a few pixels of movement. But if you have an interface or game component that uses these areas and are monitoring specifically for any touch began/ended events, this will now fail. It seems to be something Apple integrated to make accessing Control Center etc. easier (but the problem persists even if you disable Control Center from apps).
One person who observed this in an app commented on
Stack Overflow:
Quote: "It does indeed appear that iOS11.1 changes the timing for touch events at the top and bottom of the screen. Presumably this is in order to handle the new single-swipe gestures for opening notifications and the control center. The touchesBegan events and touchesEnded events appear at almost exactly the same time. ... Apps that follow the pattern of processing touch events into a touch state, and then poll that touch state to detect button presses are likely to break. The approach fails because these touches get removed from the touch state immediately after being added with no opportunity for the polling code to observe them."
Apple does have a method:
preferredScreenEdgesDeferringSystemGestures() but I am unsure if that will resolve the issue.
Edit: One quick hack solution to capture 'touch end' in these regions is to monitor GetRawTouchCount(1). Every time that value is > 0, add 1 to a counter. Then when GetRawTouchbCount(1) = 0 you can check the counter and if it equals 1 you can treat it as an OnPointerReleased(), and also reset the counter. Note that this solution can also trigger if the user very quickly taps any area in the scope of 1 frame so you'll want to implement accordingly.