Questions tagged [uilongpressgesturerecogni]
147 questions
0
votes
2 answers
LongPress gesture not called on UITableView
In an iOS App, I have a UITableView (NOT part of a UITableViewController) on which I want to detect long press on custom UITableViewCells with the following method:
- (void)viewDidLoad
{
myTableView.delegate=self;
…

Laurent Crivello
- 3,809
- 6
- 45
- 89
0
votes
1 answer
Using long press to toggle
I would like to use a long press gesture to toggle an .isHidden property of a tableView. My code (below) makes the tableView appear upon the first long press but does not hide it upon the second long press.
let recognizer =…

Pat Dolan
- 41
- 6
0
votes
0 answers
UILongPressGestures conflict
I have a container view which has two UILongPressGestureRecognizers on it (well not only those two, but other gestures are acting ok). One is to recognize one finger, the other is for two. When i try to fire gesture for one finger, it will not fire…

tkrz
- 240
- 3
- 10
0
votes
0 answers
Why UILongPressGestureRecognizer behaves differently on devices released after iPhone 6?
In my code, I have an area on which when users taps and holds, UILongPressGestureRecognizer causes an animation to run and at the end of animation a method gets called.
(It's basically a long tap on a small area square which contains one CGPoint so…

Reza.Ab
- 1,195
- 1
- 11
- 21
0
votes
2 answers
Swift 3 - LongPress on GMSMarker and print its coordinates (Google Maps iOS SDK)
Using Google Maps iOS SDK, I want to be able to print the coordinates of a GMSMarker if long pressed on that particular marker.
I first get all of my coordinates from a dictionary and drop markers for all coordinates on the map:
func…

Kanav Batra
- 35
- 1
- 10
0
votes
1 answer
wrong UILongPressGestureRecognizer IBAction fired
I created two Long Press Gesture Recognizers in IB, and created two IBActions for them.
@IBAction func longPressGesture(_ gesture: UILongPressGestureRecognizer) {
print("Do long press")
}
@IBAction func longPressTapGesture(_ gesture:…

Bevan
- 179
- 1
- 12
0
votes
1 answer
UILongPressGesture working on movement not on long press
I'm trying to add UILongPressGesture to the cell. It is working but only when I long press and move in any direction.
It should call the selector method on long press but it is calling when I long press and started to move. I'm also handling the…

V. Garg
- 15
- 6
0
votes
1 answer
Updating text of UILabel while dragging superview
In my application I use UILongPressGestureRecognizer to drag a view around the screen. This view has some subviews, including an UILabel, which are laid out using constraints. When I begin dragging, I make sure to remove all positioning constraint…

Denis Balko
- 1,566
- 2
- 15
- 30
0
votes
1 answer
iOS : How to save selected row of tableview even I refresh tableview?
Using some API, I am displaying data in table view format.
A) In that when API is called first time we will get 10 user details, so at first time we can see 10 rows in tableview. When we scroll down i.e after 10 rows, a new API called for…

Nikita Patil
- 674
- 1
- 7
- 17
0
votes
1 answer
Swift: Conflict between LongPressGestureRecognizer and scroll view
I have a UIView within a UIScrollView. I want the view to do something when a tap on it begins, and do something different when the tap ends. Therefor I used a UILongPressGestureRecognizer. I set the minimumPressDuration to zero. This works fine,…

MightyAlienDwarf
- 69
- 1
- 7
0
votes
3 answers
Long Press Recognize Gesture via Button - Swift 3
I'm new to Swift and I'm trying to make timer(in the label) that starts with a long press on the button. At the same time I want to change the long press button image when press the long press button. I leave button, I want the button revert…

MarryJoe
- 3
- 4
0
votes
1 answer
How to end long press gesture without lifting finger from screen?
I'm trying to end a long press gesture without lifting my finger from the screen. Is that possible in swift?
I'm making an app that lets you record video. The video recording starts when i press down on a button and ends when I lift my finger from…

Jordan Tate
- 381
- 1
- 3
- 7
0
votes
1 answer
UILongPressGestureRecognizer and UITapGestureRecognizer
I am quite new to Swift and I am fascinated to the potential of distinguish these two gesture for a button.
I am writing my first app in xCode and I am near to conclude that. As a last step I want to implement two different actions for a button…

sky90
- 123
- 7
0
votes
1 answer
How to implement the multiple selection in uitable in swift3?
currently, i have added a long press gesture to my table view. It is working fine. Now the thing i want is that if i long press any UITableview cell that cell should get selected and after this if i tap on next cells that too should get selected…

Jessica thompson
- 407
- 2
- 8
- 20
0
votes
2 answers
Issue with UILongPressGestureRecognizer while using it in table view cell
I am implementing a long press in the uitableview through storyboard in swift3. I have only one prototype cell set in the storyboard. But the problem is the long press is being detected only in the first cell. Rest of the cells are not listening to…

Jessica thompson
- 407
- 2
- 8
- 20