Answers for "swift allow gesture recognizer over others"

0

swift allow gesture recognizer over others

func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, 
         shouldBeRequiredToFailBy otherGestureRecognizer: UIGestureRecognizer) -> Bool {
   // Do not begin the pan until the swipe fails. 
   if gestureRecognizer == self.swipeGesture && 
          otherGestureRecognizer == self.panGesture {
      return true
   }
   return false
}
Posted by: Guest on January-30-2021
0

swift allow gesture recognizer over others

func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, 
         shouldRequireFailureOf otherGestureRecognizer: UIGestureRecognizer) -> Bool {
   // Don't recognize a single tap until a double-tap fails.
   if gestureRecognizer == self.tapGesture && 
          otherGestureRecognizer == self.doubleTapGesture {
      return true
   }
   return false
}
Posted by: Guest on January-30-2021

Code answers related to "swift allow gesture recognizer over others"

Code answers related to "Swift"

Browse Popular Code Answers by Language