All Articles

UITapGestureRecognizer in Swift

I have a subclass of UIView that has a label:

class PlayerView : UIView {
    @IBOutlet weak var playLabel: UILabel!
}

I want to attach a Tap Gesture to it:

class PlayerView : UIView {
    @IBOutlet weak var playLabel: UILabel!
}
Published 27 Jul 2014

Code. Comics. Crossfit
Tim Broder on Twitter