I have a UIViewController with a UITableView and a UICollectionView. The way it works is that when I click on the TableView, the contents of the CollectionView has be changed and everything works fine. However, when I add a UITapGestureRecognizer over the entire View for the double click, everything still works as it should, but the CollectionView loads significantly slower.
let tap = UITapGestureRecognizer(target: self, action: #selector(doubleTapped))
tap.numberOfTapsRequired = 2
tap.cancelsTouchesInView = false
tap.delaysTouchesBegan = true
view.addGestureRecognizer(tap)
The issue is the line: tap.delaysTouchesBegan = true
If true, the CollectionView is slow. In case it's false, everything is fast, but double click doesn't work :(
Any experience, idea?