Reputation: 145
Is it possible to see the selected state content of an UIButton only when I'm touching it?
Upvotes: 0
Views: 60
Reputation: 534893
When you're touching a button, the button is highlighted. Call setTitle:forState:
to give the button the normal title (UIControlStateNormal), and call setTitle:forState:
to give it the highlighted title (UIControlStateHighlighted). Now you'll see one title normally and the other title when you touch the button. The same thing for the other button features, like setImage:forState:
.
Upvotes: 1