Questions tagged [uilongpressgesturerecogni]

147 questions
1
vote
2 answers

iOS8 - How do I change the sensitivity of a long press gesture in iOS 8

I have a UIView that flips over when long pressed. Works beautifully in the simulator, but in the real world the human finger has tiny movements while pressing. These tiny movements reset the gesture and instantly trigger the gesture ended…
1
vote
1 answer

Determine if dragging cell path == section header path

I am implementing a custom drag and drop, what i want is create a copy of the cell (just an image for the display) and when the location of this copy is the same that an header i want to change the background color of the header, and revert his…
1
vote
3 answers

Adding UILongPressGestureRecognizer to UIButton inside custom UITableViewCell

I have a custom cell with various IBOutlets, but on one button I want to add a UILongPressGestureRecognizer for long press gestures. Here is my code (btw outlets are connected correctly and the IBAction method of the button is called…
flizana
  • 569
  • 6
  • 26
0
votes
1 answer

How to detect long press on a UICollectionViewCell and and perform an action a the cell

I have a list of images displaying in a UICollectionViewCell. Now I want a way to display an overlay on the image when user long press on the cell. I have been able to place a long press gesture on the cell but unfortunately how to perform the…
0
votes
1 answer

iOS Swift - How many UILongPressGestureRecognizers can be enabled at one time?

I have a simple synthesizer application that has 28 buttons (UIView's), and each one has a UILongPressGestureRecognizer attached to it. The .minimumPressDuration for each recognizer is set to 0, so that simply touching a button will begin it's…
0
votes
3 answers

Adding UILongPressGesture to Cell not CollectionView

I am trying to add UILongGestureRecognizer to my Custom CollectionView Cell but handler function never called. This is my gesture and handlerFunc from custom cell: let longPress = UILongPressGestureRecognizer(target: self, action:…
Picode
  • 1,140
  • 1
  • 6
  • 12
0
votes
1 answer

How to limit a process between LongPressGesture-began and LongPressGesture-ended

The requirement is simple: I want to start an activity (e.g. drawing circles on the screen) when the user touches the screen and holds down the finger. This activity shall stop immediately when the finger is lifted again. So I used the…
0
votes
1 answer

UILongPressGestureRecognizer in Xamarin IOS

I'm currently working with "Press and hold" on a button, here is my code: public override void AwakeFromNib() { base.AwakeFromNib(); longp = new UILongPressGestureRecognizer(LongPress); button.AddGestureRecognizer(longp); } public void…
0
votes
1 answer

On LongPress on UITextView "NSAttributedString.Key.link" value is visible. How can I stop showing it to user

I have a UITextView with attributed text with multiple link's and those links have individual values for the keys and those links have click action on it. When I am long-tapping on the link text and moving, I am able to see the value give to…
iOSDev
  • 412
  • 10
  • 30
0
votes
0 answers

How do you call addGestureRecognizer if the interaction is added to a long press function - and not an override func?

Why does the add interaction need to be in objC func? Because it should only be added if certain database checks are met. Below is how it works successfully if interaction is added to override function. addGestureRecognizer is also added there. var…
0
votes
1 answer

UILongPressGestureRecognizer to accept a flexible amount of touches

I have a UILongPressGestureRecognizer which is fired when there is 1 finger on the screen. However, as soon as I put 2 fingers, the function is not fired anymore and I need to create a new gesture for 2 fingers. How to have…
Laurent Crivello
  • 3,809
  • 6
  • 45
  • 89
0
votes
1 answer

How to detect "long tap"

I have a UIView view, and I want to perform some action when user pressed it and then released. I added a UITapGestureRecognizer to the view, and it only fires when tap duration is small. If user touches the view, waits a couple of seconds and then…
0
votes
1 answer

How to reset/restart NSTimer in tap LongPressGesture Objective-C

I have small problem with NSTimer in long press gesture. How to invalidate timer for any press? If I've long pressed the timer is start count off from any pressed cells. For example I long pressed 3 cells the timer working 3 times. I have no Idea.…
handzel
  • 91
  • 1
  • 10
0
votes
1 answer

UILongPressGestureRecognizer location function issue in collectionView iOS 13.2

I had this wired flashing with UILongPressGestureRecognizer location(in: UIView?) method when drag around item original position. there is an unnatural flick when the cell. it all works fine in iOS 12. here is the link of demo project demo fork…
0
votes
1 answer

How do you get the location of touches for a UILongPressGestureRecognizer when the number of required touches is more than one in swift?

I would like to get the location of multiple multiple touches from a UILongPressGuestureRecognizer where the number of required touches is more than one. I know that I can do the following to get the location when one finger is used. let…
code kid
  • 374
  • 1
  • 6
  • 22