Is it possible to implement touchdown for UILabel?
UILabel is a subclass of UIView, which is itself a subclass of UIResponder; therefore, it’s definitely possible to make a label that responds to touches. Just make a new subclass of UILabel and implement the following method(s):
– touchesBegan:withEvent:
– touchesMoved:withEvent:
– touchesEnded:withEvent:
– touchesCancelled:withEvent:
So, if you wanted something to happen when touches started, you’d do it in -touchesBegan:withEvent:.
If creating a new subclass is too heavy-handed for you, then I’d suggest doing as @JustSid suggests and using a UIButton for the task.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With