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
-2
votes
1 answer

Swift UITapRecognizer steals the tap from an UITableView

If I use UITapGestureRecognizer, my UITableView objets does not get taps, but the recognizer works well. Tap recognizer init: let tap = UITapGestureRecognizer(target: self, action: #selector(tapBackground))…
HaZe
  • 53
  • 2
  • 4
-2
votes
1 answer

UITapGestureRecognizer breaks UITableView SelectRowAtIndexPath?

if I add tapgesture on background view then I have to long press for select cell and if I set numberoftaprequired is 2 the it will be work normally but I have to give one functionality on single tap
-2
votes
1 answer

UITapGestureRecognizer not updating UIView until completion

I am running swift 4 on Xcode 9.4.1. My program uses a UITapGestureRecognizer for single taps with the code below: let screenTapOnce = UITapGestureRecognizer(target: self, action: #selector(singleTapGesture)) …
Delph2
  • 119
  • 1
  • 9
-2
votes
1 answer

Swift Playground in Xcode - TapGestureRecognizer to UILabel not working

I am creating a Swift Playground in Xcode and I have a problem with putting a TapGestureRecognizer to an UILabel... class MyViewController : UIViewController { override func loadView() { func tapped() { print("The label was…
-2
votes
1 answer

IOS swift app not working when using tap Gesture recognizer

em new to Swift and IOS while developing my first app i am using tap gesture , just dragging and linking it from storyboard to controler view using following code. @IBAction func taped(_ sender: Any) { bgimage.isHidden = false …
-2
votes
1 answer

Can we Add Tap Gesture to UILabel?

I have added Label in the UIView and created its outlet, then with the help of UITapGestureRecognizer i have added the functionality,but when i tap or click in the label. Label text does not changes. I searched for the similar question and i got the…
Chinmay Balutkar
  • 224
  • 3
  • 15
-2
votes
3 answers

UITapRecognizer not working with ImageView

I am currently trying to make a signout button for an app. I have the UIImageView "User Interaction Enabled" box checked. in my .h file I have this: @property (strong, nonatomic) IBOutlet UIImageView *signOutButtonIV; in my .m file I have…
Airagale
  • 226
  • 1
  • 3
  • 19
-2
votes
1 answer

UITapGestureRecogniser not working

I wrote the same code as given in Apple docs but when I click on the photo the photo library doesn't come up. The tap gesture recogniser may not be working. import UIKit class ViewController: UIViewController,…
-2
votes
1 answer

Making Multiview Button Tappable

This is currently a UIStackView with a UIImageView and a UILabel. I want the entire thing to be tappable. My poor man's solution at the moment is to overlay a UIView on top of the UIStackView and add a UITapGestureRecognizer into the mix. But it…
Eric Johnson
  • 1,087
  • 1
  • 11
  • 16
-2
votes
1 answer

How to know container of TapGesture Recgoinizer in Swift

I want to know the container of an UITapGestureRecognizer in Swift For example, if I put a UITapGestureRecognizer in View1 When UITapGestureRecognizer action is triggered, how do I know that View1 is the container of that UITapGestureRecognizer?
Daud 11
  • 189
  • 1
  • 2
  • 7
-2
votes
2 answers

UITapGeatureRecogniser is not working on 2 labels

I am trying to use two TapGestures on two labels, but it always shows the result of last one TapGesture. My code is as follows: [write_review_label addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self…
-3
votes
1 answer

UITapGestureRecognizer with pangesture

I want to use tap gesture recoznizer together with pan gesture, but i can make only one work. How can I use both on the one view?
John
  • 122
  • 1
  • 2
  • 9
-3
votes
2 answers

How to do view transition like setting of system iOS?

I have a problem and I have no idea for that... I want change interface like setting:settings.gif I do not know even the key word to search it in the internet... I used "interactive transition" and "gesture interactive" etc... but I can not find a…
-4
votes
1 answer

How to add something on an image in swift

I have an anatomic picture and on it, I want to print a image like a dot or something when the user taps on the first image (the body) to point out where does it hurts. I've already read something on UITapGestureRecognizer, but I don't really…
Papaya
  • 158
  • 1
  • 9
-4
votes
2 answers

How to declare blocks using Swift in iOS?

I am trying to convert my Objective C source code to swift, I have searched alot to change syntax for Blocks. Here is my Objective C code that I want to switch to Swift : class.h file : @property (nonatomic, copy) void (^tapBlock)(CGFlagsCell *); +…
Anand Gautam
  • 2,541
  • 3
  • 34
  • 70
1 2 3
80
81