AppsDev
AppsDev

Reputation: 12509

Custom buttons and states in iOS

This is a question for people that have already submitted an app to Apple Store: is it required, for a custom UIButton you're setting an image or a background, to set one for each button state? Sometimes I only set a button image for the normal state, and then the system puts a default highlight when the button is tapped, but I've seen that in Xcode's console sometimes some messages appear saying that some button's states are not set...

Thanks!

EDIT. Messages in console are similar to this:

button text attributes only respected for UIControlStateNormal, UIControlStateHighlighted and UIControlStateDisabled. state = 4 is interpreted as UIControlStateHighlighted.

Upvotes: 1

Views: 1014

Answers (1)

Marcel Puyat
Marcel Puyat

Reputation: 325

No - it is merely optional to call setImage:forState on your UIButton. Do this only as you see fit.

Upvotes: 1

Related Questions