SwipeRight/LeftEvents

Tagged: , , ,

This topic contains 2 replies, has 2 voices, and was last updated by  Jeff Keeme 5 days, 13 hours ago.

  • November 30, 2016 at 2:10 pm #158294

    Is it possible for swipe events to require a longer swipe in order for them to register? I have some other touch events on the page that interfere with the swipe events.

  • November 30, 2016 at 2:19 pm #158295

    I don’t think so in the Page.swift file you can look for…

     swipeLeftRec.addTarget(self, action: #selector(Page.swipedLeft))
      swipeLeftRec.direction = .left
      self.view!.addGestureRecognizer(swipeLeftRec)

    And on a new line try typing swipeLeftRect. and then let the compiler suggest extra properties. For example, you could add

    swipeLeftRec.numberOfTouchesRequired = 2

    So that could solve the problem by making people do a two finger swipe.

    Generally speaking, I think if you are doing this to get kids to turn to the next page, you should just put an arrow in the top left or right of the screen. Leads to far less accidental touches / swipes. And even if you could lengthen the swipe time for it to register, young kids do a lot of slow gestures by accident too.

  • December 4, 2016 at 8:21 am #158385

    Thanks for you help on this. I took your advice and have it working perfectly now.

You must be logged in to reply to this topic.