views:

39

answers:

1

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?

A: 

As you cannot subclass UIButton, you should subclass UIView and implement the drawRect: method. Then, add this to your UIButton as a subview.

Eiko