I've got an Custom UIButton
. It's got
- a "static" background image
- a variable text (the Title) which gets set in the code
Now I would like to add an icon (UIImage/UIImageView
) inside the button on the left of the text. (I use the indent to move the text slightly to the right). Is there an easy way of adding that icon (and referencing it from code, so I can change it) or would you recommend creating a completely new button e.g. based on a UIView
? (e.g. a view, that responds to touches)?
I'm just trying to get a feel for what the best approach would be for this. Any experience?