I have some (fairly large) UIButtons. Instead of text, I would like to draw some simple colored graphics inside them (lines, boxes).
How can it be done without resorting to using prerendered images?
I have some (fairly large) UIButtons. Instead of text, I would like to draw some simple colored graphics inside them (lines, boxes).
How can it be done without resorting to using prerendered images?
As you cannot subclass UIButton
, you should subclass UIView
and implement the drawRect:
method. Then, add this to your UIButton
as a subview.