Questions tagged [uilongpressgesturerecogni]
147 questions
3
votes
1 answer
Long press gesture recognizer issue
In Interface Builder, I've added a press gesture recognizer to a MKMapView.
An event is sent after 1 second (I am using it to add a pin to the map). I have checked the "Cancel touches in view" behavior of my gesture recognizer, but my issue is…

Pop Flamingo
- 3,023
- 2
- 26
- 64
2
votes
1 answer
How to fail a LongPressGesture on SwiftUI
I'm trying to fail LongPressGesture with maximumDistance when I move my finger away from the Image but that doesn't work, it keeps printing the message "Pressed"
struct ContentView: View {
@GestureState private var isDetectingPress = false
var…

xmetal
- 681
- 6
- 16
2
votes
2 answers
Adding UILongPressGesture to UITableView in iOS13
I've been using UILongPressGesture with UITableView for over a year, but I found that this doesn't work in iOS13.
In iOS13, Apple added this gesture to UIScrollView and I'm not sure it is safe to replace it to my…

Ryan
- 4,799
- 1
- 29
- 56
2
votes
2 answers
UILongPressGestureRecognizer not recognizing .ended state
As the title reads, my problem is that my UILongPressGestureRecognizer sometimes does not run the code inside the sender.state = .ended. The .began always runs and works. I have tried to notice pattern but is to infrequent and I have not found a…
user10873038
2
votes
1 answer
How to implement a Longpress Gesture on a UITextView
Is it possible to implement a long press gesture on a UITextView? Basically, if the user tap once on a textview I want him/her to be able to edit the text. However, if he/she tap and hold on the textview (let's say for two seconds) an action will be…

Shadi Hammoudeh
- 81
- 12
2
votes
1 answer
UILongPressGestureRecognizer with SpriteKit
I'm trying to figure it out how to detect if a shapeNode has been pressed, specifically with the LongPress Gesture. Please take a look on the below code. Any idea what is wrong, why I can't see the "Found!" message?
class Test: SKScene {
let…

RafalK
- 749
- 2
- 7
- 13
2
votes
1 answer
Swift 3.0 Table View Cell Selected by Long Press
I have a gesture recognizer that dismisses my keyboard but this gets in the way of the tableView didSelectAtRow because the tableView doesn't recognize a tap unless it is a long press. When I run this in the simulator, and tap the tableViewCell…

Kevin
- 1,189
- 2
- 17
- 44
2
votes
3 answers
Create long press gesture recognizer with annotation pin
What I did so far was create a map. Then show user location and center it so that map is centered when travelling (car etc)
But now I would like to add a long press gesture so that If a user does the input a pin will be dropped. I have struggled…

sabrefm1
- 61
- 1
- 9
2
votes
1 answer
Long press tap gesture recogniser for UICollectionView Objective-c
I am using a UICollectionView in my ViewController for displaying images and i want that user should be able to delete photos on long press, but i am not able to detect long press gesture. I have read all the previous discussions and tried to…

Developer
- 822
- 9
- 23
2
votes
1 answer
UILongPressGestureRecognizer only firing on Touch Up (swift)
I have a collection view/scrollview where I'm adding my UILongPressGestureRecognizer. It works, but state .Began only gets fired together with state. Ended. That doesn't work for me as I want to also track the state .Changed to get the…

EdwardSanchez
- 95
- 1
- 8
2
votes
1 answer
Long Press & Tap Recognizer for multiple UIButtons
I have Multiple Buttons on my UI, and I want to execute different functions according to different types of click,
Single Click
Double Click
Long Press
Doing it for single tap was easy for me, an IBAction with all the four buttons connected to…

Sevan Malatjalian
- 21
- 3
2
votes
1 answer
Set maximum duration for UILongPressGesture?
I have a button with hold Action. I use a UILongPressGestureRecognizer. I want se a maximum value from hold Action.
When perform the button i have start a CABasicAnimation for 30 seconds and start recording a video for maximum 30 seconds. If the…

Gaby Fitcal
- 1,814
- 1
- 17
- 28
2
votes
0 answers
How to deselect link on wkwebview because long press after customized action sheet pop up?
WKWebView have native action sheet pop up when long press any link on web page, if we long press on any link, when menu action sheet pop up, the pressed link will be deselected automatically.
But I replaced native action sheet with more sharing…

Andy_24
- 1,353
- 2
- 12
- 20
2
votes
0 answers
How to drag and reorder UITableViewCell from one UITableView to another similar to trello app?
I want to make animations like the "trello" iOS app . In that app there are many uitableviews placed horizontally on a scrollview. Now user can long press any rows of the table and can drag it to another table. The user can also reorder rows in the…

sajwan
- 333
- 3
- 14
1
vote
1 answer
On long press, how do you call an ImagePreviewController: UIViewController from an objective c function instead of a contextMenuInteraction function?
This function below needs to instead go into an ObjC function
///this 1st func is in UITableViewController, the others are in UITableViewCell
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell…

uuuuuu
- 119
- 1
- 7