Subclass of UIButton or inherit from UIControl?

I have an element that should behave like a UIButton, but it has several (3) text labels visible immediately, and several UIImages in the same bounding box. This is really a view with a bunch of other UIViews and shortcuts that should look and act like a button, but with a more customizable layout of these elements than the standard UIButton.

Is it better to inherit from UIButton to accomplish this or UIControl to inherit from?

When an element is being listened, I want to simulate all the effects of the selection (if it is UILabel, show the color of the selection, etc.).

+5
source share
1 answer

, , UIButton UILabel, UIImageView.

UIView, UIButton , ( ).

+2

All Articles