Search Unity

Block interaction on a bottom anchored menu on iPhoneX close swipe gesture

Discussion in 'Scripting' started by NiteDev_, Dec 29, 2019.

  1. NiteDev_

    NiteDev_

    Joined:
    Oct 11, 2014
    Posts:
    19
    Hi, I was doing some research on how to achieve this for almost 4 days and I can't find any clue on how to do it, when player do swipe up gesture to close app on iPhoneX the buttons of my bottom anchored menu are selected, I'm using the Defer System for this, so player needs to do a double swipe gesture to close the app, if someone know how can I block interaction with the bottom menu when this gesture is done will be so grateful.

    What I've tested so far:
    - Adding an image with raycastTarget ON and added a custom IPointerEnter Handle to catch the gesture on a small block under the menu [FAIL]
    - Trying to get the initial swipe position (in this case must be the bottom screen border Y == 0) and if the swipe has it initial value on Y it blocks interaction [FAIL]
    -Adding a transparent button at the bottom on the menu [FAIL]

    All this objects were over the whole menu UI in case you think them was blocked by the menu UI

    https://gyazo.com/870ce0f70b52605efa33a717a17c5f49

    As you can see at the bottom border if I swipe under the shop button doing close gesture on iPhone X it is selected and I want to avoid that cuz I'm using double gesture to close App (Defer System Gesture)

    Any information would be helpfull, thanks in advance.