I have a bunch of UILabels that I add through code and I want to perform a specific action for each if the user's finger touches up inside (much like UIButton's touchUpInside in IB). What is the best way of doing this?
+6
A:
The easiest way is probably to use UIButton instead of UILabel. A custom UIButton has no border and can look like a plain label, but handles the event tracking for you.
Otherwise, you must derive from UILabel and implement the UIResponder calls for touch handling.
drawnonward
2010-07-16 23:05:14
Awesome, so simple.
Don Wilson
2010-07-16 23:49:09