Reputation: 175
I use [button setImage:image forState:0];
to set a image to a UIButton.
Then I want the title of it using [button setTitle:[titleArray objectAtIndex:i] forState:0];
.
But the image cover the title which I want to show in front of the image.
Any solution?
Thanks!
Upvotes: 0
Views: 840
Reputation: 39502
use setBackgroundImage:forState instead. When you use the (foreground) image, you dont get to set a title.
Upvotes: 3