I have subclass of UIView
@interface TBL_CardView : UIView
It it internally have UIImageView for card image.
I need to handle touching of card in following way:
- When I touch (and still hold) TBL_CardView I need to set orange borderColor.
- If I am stil on top of TBL_CardView I need to set red borderColor.
- If I am not on top of TBL_CardView, I have moved my finger, because I want to cancel touch, then borderColor is removed.
I know how to handle setting of borderColor:
self.layer.borderColor = [UIColor redColor].CGColor;
self.layer.borderWidth = 3.0f;
But I do not know what is the easiest way to implement thin button like behavior ?
Should I make it just as button, or use UIResponder or something else ?
What are pros and cons for each case ?