appcues / appcues-ios-sdk

The Appcues iOS SDK
https://www.appcues.com/mobile
MIT License
8 stars 2 forks source link

Fix debugger hit test on iPad #525

Closed mmaatttt closed 5 months ago

mmaatttt commented 5 months ago

On iPads, the OS adds a UIView as a parent to the rootViewController of the window:

DebugUIWindow
  ↳UITransitionView
    ↳UIDropShadowView
      ↳UIView (iPadOS only, not present on iOS)
        ↳DebugViewController
          ↳DebugView

We want the hit test logic to ignore this view (otherwise it captures all touches), so I've changed the window hit test to start checking in the root view (ie DebugView) instead.

Note that convert-ing the point to the rootView isn't necessary in this case since they're the same, but it's best practice, so better safe than sorry.

Fixes appcues/appcues-react-native-module#148