Questions tagged [uitapgesturerecognizer]

UITapGestureRecognizer is a concrete subclass of UIGestureRecognizer that looks for single or multiple taps.

For the gesture to be recognized, the specified number of fingers must tap the view a specified number of times.

Although taps are discrete gestures, they are discrete for each state of the gesture recognizer; thus the associated action message is sent when the gesture begins and is sent for each intermediate state until (and including) the ending state of the gesture. Code that handles tap gestures should therefore test for the state of the gesture.

Whole document - UITapGestureRecognizer

1215 questions
-1
votes
1 answer

How to make ImageView TapGesture smooth in swift

In my project I have one profile with profilepic(imageview).. here if i tap on imageview the image showing in separate view very sharply and coming back to its original position as well sharply here i want the tapped image should open and close…
Swift
  • 1,074
  • 12
  • 46
-1
votes
1 answer

UITapGestureRecognizer with UIImageView in Table View Cell not working Swift

In my Table View Controller I'm requesting data from my backend. Then adding the data to an array with a view model for each row from the request. let getNotifications = GETNotificationsByUserID(user_id: user_id) getNotifications.getNotifications {…
DDavis25
  • 1,149
  • 1
  • 13
  • 25
-1
votes
1 answer

How could I ensure UITapGesture also triggers when a UIButton is tapped?

I have a UIViewController which has 4 UICollectionViews. Each CollectionView uses the same custom cell, via its NIB. Each cell has buttons on it, whose actions are defined using the delegate structure. In my main View Controller, I've implemented…
Karim
  • 271
  • 2
  • 11
-1
votes
4 answers

(Swift) How to get rid of "Left side of mutating operator isn't mutable"

complete error: Left side of mutating operator isn't mutable: 'abc' is a 'let' constant Happens because I am trying to change value of a variable sent by parameter to function. Can I get rid of this, or find some other solution? Code(My code is…
faris97
  • 402
  • 4
  • 24
-1
votes
2 answers

Swift passing parameters in #selector calls

to sum up my problem: I have a bigger table with lots of posts from different people. And I am going through my list of tablecells with the datasource of the tableview like in the following example. And I want to give each textlabel of the cell a…
-1
votes
1 answer

How to detect tap begin with Long press?

I want to detect 3 actions, "Tap begin", "Long press begin", "Long press ended". I want to detect "Tap begin" regardless of detection long tap (i.e. every time when touch the screen, detect "Tap begin") and detect "Tap begin" followed by "long press…
Zako
  • 61
  • 3
-1
votes
1 answer

Why is the interface builder action for tap gesture recognizer in iOS not fire?

In iOS in Xcode, I dropped a tap gesture recognizer control onto a label, and control-dragged the tap gesture recognizer to create an interface builder action. When I tap the label, the interface builder action doesn't fire. Here is my…
daniel
  • 1,446
  • 3
  • 29
  • 65
-1
votes
1 answer

TapGesturecognizer not working in backgroundview in iphone X 12.1

I have a simple code to add tapgestureRecognizer to dismis ViewController when tap in screen, but it not working only in iPhone X 12.1. addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(closeSharing(_:)))) Note: magicaly,…
goat_herd
  • 571
  • 3
  • 13
-1
votes
2 answers

UITapGestureRecognizer not working when setting target programmatically

I'm trying to add tap event listener on an UIImageView inside UITableViewCell so I added an UITapGestureRecognizer on it and used this code override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { …
Amir_P
  • 8,322
  • 5
  • 43
  • 92
-1
votes
2 answers

Programmatically Tap View

I have created a custom view that is to be used as a radio button with images and text. I need to be able to load the saved selection when the controller loads. I set my listeners this way: for button in genderButtons { …
Cody Harness
  • 1,116
  • 3
  • 18
  • 37
-1
votes
1 answer

UITapGesture inside Framework not working

I'm trying to create my first Cocoapod framework, and need to attach a simple UITapGestureRecognizer to a view, but I can't get the tap gesture action to be called from within my framework. I've got: class ViewController: UIViewController { …
-1
votes
1 answer

How to access a let statement in a UIView from my main View Controller?

Within the viewdidload in my my main ViewController I created a let statement so I can enable a tap feature. override func viewDidLoad() { super.viewDidLoad() let tapRecognizer = UITapGestureRecognizer(target: self, action:…
user7186765
-1
votes
1 answer

How can disable tap gesture in parent view?

I have 2 views. View 1 is superview and i added tap gesture in superview. View 2 is Collectionview and when I click on collectionview cell both event didSelectItemAt in Collectionview and tap gesture in superview called.How can disable tap gesture…
Le Bao
  • 23
  • 4
-1
votes
3 answers

Objective-c UITapGestureRecognizer unrecognized selector

I have a UITableView with cells that contain a UILabel. When I tap the UILabel, I'd want to execute an action, therefore I added a UITapGestureRecognizer. UILabel *telephone = (UILabel *)[cell.contentView…
jbehrens94
  • 2,356
  • 6
  • 31
  • 59
-1
votes
1 answer

Unrecognized selector error trying to use a tap gesture recognizer

I am trying to create a sign up page for my app. But I am getting an error when I run the app. Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFBoolean select:]: unrecognized selector sent to instance…