Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Swipe left for back on iOS
Forum Updated to NodeBB v4.3 + New Features

Swipe left for back on iOS

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 3 Posters 488 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Georges007
    wrote on last edited by
    #1

    How can one catch the 'swipe left' gesture on iOS that results in popping the current "page" of the stack. I want to redirect this gesture to a custom function and disable the "pop" action.

    J.HilkJ 1 Reply Last reply
    0
    • G Georges007

      How can one catch the 'swipe left' gesture on iOS that results in popping the current "page" of the stack. I want to redirect this gesture to a custom function and disable the "pop" action.

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      hi @Georges007 and welcome, can you be a bit more specific?

      For Qt, the swipe to left for stack pop is not a default behavior, in fact afaik its not detected by default at all.


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        Georges007
        wrote on last edited by Georges007
        #3

        When you swipe left on an iOS device there is a native functions that pops the current page of the stack (interactivePopGestureRecognizer). There is a way of overriding this when you use the native iOS developer, but I can't seem to find a way to do this from Qt.

        I'm working on an app that runs on both Android and iOS and the iOS user have reported that the "swipe left" gesture pops off the current page, which is not the intended behavior for the app.

        Here is how you can do it with the iOS developer. So I was wondering how one should go about doing this with Qt as I want to redirect the "swipe left" gesture that triggers this pop to a native function that is more suited for my app.

        For android I already have a function to redirect the native back button:

        // native back button
            onClosing: {
                if (mainRoot.depth > 1) {
                    close.accepted = false
                    backButtonPressed()
                }
            }
        
        1 Reply Last reply
        0
        • GrecKoG Offline
          GrecKoG Offline
          GrecKo
          Qt Champions 2018
          wrote on last edited by
          #4

          Are you using Felgo?

          1 Reply Last reply
          0
          • G Offline
            G Offline
            Georges007
            wrote on last edited by
            #5

            No, not using Felgo

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved