I have three different gestures with two different types on one view.
First is a UITapGestureRecognizer and the two others are UILongPressGestureR
I converted the code for Swift 5 to add to this post. It should work as I pulled it off the Apple Documents.
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer,
shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer)
-> Bool {
return true
}
I'm going to try this tomorrow as I've been struggling with UIScrollView and UISwipeGestureRecognizer working together. If I disable Scrolling, then the gesture works, but if I enable Scrolling (what I need), then gesture does not work. I want this feature for hiding and showing the top Navigation Bar and the bottom TabBar when scrolling up and down my scrollview. Then I'm going to try to get it to work with a UICollectionView on the next page in my app. Being new to coding, any suggestions would be appreciated if the above code won't be enough. I'll update this comment if it works or not.