We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I need to add a Long Press Gesture to an existing UICollectionView cell in Layout but having problems.
This is the extra code.
extension TimerCollectionViewController: UIGestureRecognizerDelegate { @objc func onDidLongPressTimer(gestureRecognizer : UILongPressGestureRecognizer) { if gestureRecognizer.state != UIGestureRecognizer.State.began { return } let p = gestureRecognizer.location(in: timerCollectionView) if let indexPath = timerCollectionView?.indexPathForItem(at: p) { print("\(indexPath.row) Let's delete this timer.") } else { print("got nothing...") } } }
I also added the following to viewDidLoad()
// Add Long Press Gesture to delete let lpgr : UILongPressGestureRecognizer = UILongPressGestureRecognizer(target: self, action: #selector(onDidLongPressTimer)) lpgr.minimumPressDuration = 0.5 lpgr.delegate = self lpgr.delaysTouchesBegan = true timerCollectionView?.addGestureRecognizer(lpgr)
The text was updated successfully, but these errors were encountered:
Anyone have thoughts on this. Not working using 0.6.35.
Thanks.
Sorry, something went wrong.
No branches or pull requests
I need to add a Long Press Gesture to an existing UICollectionView cell in Layout but having problems.
This is the extra code.
I also added the following to viewDidLoad()
The text was updated successfully, but these errors were encountered: