Customizing controls in Interface Builder doesn’t give expected result

In my previous post I talked about pimping the standard UISlider, I did the same with the UIButton and in both cases I found out that changing the images of the controls in Interface Builder doesn’t give you the expected result.

For instance, to pimp the UIButton I changed the background image to a nicely shining transparent and glowing button but when I set this image in Interface Builder it still showed the standard button image behind it. If you have a non transparent image that nicely fills the UIButton you probably won’t notice it but in my case it was really obvious.

When you create the button in code it appears just like you expect, no residue what so ever of the original UIButton.

If somebody has a solution or some advice on this topic please enlighten me.

UPDATE:

Fred Garvin has shown me the light.
In IB, if you use the UIButton and you want custom graphics, you need to set the "type" to "custom" (this gets rid of the other button image stuff). Then use the "Image" rather than the "Background Image" for the various assets (up, over, down states etc) by switching the drop down that defaults to "All".

Advertisement
This entry was posted in iPhone and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s