views:

3285

answers:

3

Why does a custom UIButton image does not resize with the button?

I set it's view mode to Scale to Fill in Interface Builder, but unlike a UIImageView image, it doesn't respect that setting.

Am I looking in the wrong place or is it not possible?

+6  A: 

While this may not be quite what you're after - the background image does scale.

teabot
If I put the image in the background, I get the correct behavior so you solved it, thanks.
willc2
A: 

Try setting the Clip subviews property in Interface Builder to true.

Hope that helps.

Dshutsi
Alas, that did not. Thanks for trying to help, though.
willc2
A: 

Just get a real UIimageview and place a UIbutton on top of it and via layout menu set it to back. Then you can scale your image properly.

Rene