Questions tagged [uilongpressgesturerecogni]

147 questions
1
vote
1 answer

Multiple actions being performed on Long Press Gesture

I'm trying to do an action during a long press (for now, I'm just printing out the data). But whenever I do the longpress gesture in the simulator/phone, it repeats the action several times. How do I make it perform the action only exactly one time…
Artvader
  • 906
  • 2
  • 15
  • 31
1
vote
2 answers

Executing pan gesture recognizer ONLY after long press recognizer has fired

I'm trying to implement a drag and drop UI for my UIView using the pan gesture recognizer. I have that piece of code working, but now I want to only execute the drag and drop logic only AFTER the user has long pressed on my to-be-dragged view. I'm…
1
vote
0 answers

if possible send long press event to fire the UILongPressGestureRecognizer

I meaning simulate user long press the view, I have face a problem, I add a UILongPressGestureRecognizer on a view, while user long press it, then it will hide , show other view which response touch event continue, but now, it does not work at all,…
iXcoder
  • 1,564
  • 4
  • 20
  • 41
1
vote
0 answers

Perform Long Press Gesture Programmatically

I am developing an sdk. I want to perform the long press gesture added to a view Programmatically. I have tried changing the state of the gesture recognizer and dispatching the message to the main loop but this does not perform the action for…
1
vote
1 answer

How to take screenshot of a uiview and drag in swift?

i got the code but its not working, let me know if im did anything wrong. In the code i have a imageview which i created programmatically and adding the image into a uiview.Right now im unable to load the image in the "draggingView". func…
Joe
  • 859
  • 2
  • 10
  • 27
1
vote
2 answers

How to add long press gesture recognizer to a button inside of tableview cell?

I am trying to add a long press gesture recognizer to a button inside a tableview cell. But i could not figure out what i am doing wrong. I want my button to play a different audio file when user taps and holds the button. MY CODE import…
Volkan Elçi
  • 163
  • 2
  • 13
1
vote
1 answer

Swift - LongPress Gesture on Button to record Audio with AVFoundation

I'm trying to implement a record button for my chat, which records as long as you hold the button. I implemented a longpressGestureRecognizer, but unfortunately it only records for one second, no matter how long I press. Here is the code: let…
user4034967
1
vote
3 answers

Unrecognized Selector sent to instance using LongPressGestureRecognizer swift 3

I searched through all the questions for this topic here on stack overflow, but I can't seem to figure it out, since I seem to do everything right, still I get this error. I'm trying to implement a recording button for my chat, which records as…
user4034967
1
vote
3 answers

Long press gesture on image in tableview custom cell

I need some help. Today, I am working on table view custom cell where the cell contains an UIImageView. On the ImageView, I want to implement the long gesture. I implement code for this that is give below.. But I am doing something wrong in my…
1
vote
1 answer

How to add cell which is long pressed to indexpathforSelectedRow?

I want to add a cell that longPressed to indexPathforSelectedRow.. when I longPress a cell, I hope it would be added automatically in indexPathForSelectedRow... how can I do it? This code is long press function: func…
shin
  • 11
  • 3
1
vote
1 answer

How to pass indexPath.row through the tag property with UILongPressGestureRecognizer in Swift?

This is my code: func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCellWithReuseIdentifier("cell", forIndexPath: indexPath)…
1
vote
1 answer

Need to apply UIRotationGestureRecognizer followed by UILongPressGestureRecongnizer

Applied UILongPressGestureRecongnizer on one view, Check below code for reference.. @interface ViewController () { UIRotationGestureRecognizer *rotationGestureRecognizer6; } - (void)viewDidLoad { //--------Added LongPress…
1
vote
1 answer

2 simultaneous UILongPressGestureRecognizer

I want that when the user has two fingers touching the screen, two separate UILongPressGestureRecognizers recognize the gesture for each finger (1 recognizer for 1 finger). I could use a single UILongPressGestureRecognizer with…
1
vote
2 answers

Open popup on long press gesture like Whats app

I want to open popup on long press gesture. My application having UITableView and when user long press on UITableviewCell open popup. When user holding his finger long enough then only display popup. Not when user long press and releasing his…
Monika Patel
  • 2,287
  • 3
  • 20
  • 45
1
vote
2 answers

Programmatically made UIButton is not deleting when action fired

Currently I have a button that makes a draggable UIView with a subview of a UIButton. When I long press that UIButton, an alert view comes up and I have two buttons, a delete button and a cancel button. The delete button is supposed to delete the…