I'm attempting to create a custom button using a background image in Interface Builder. The image has stretchable and non-stretchable parts so that it can be resized.
IB exposes the Stretching properties to allow for this, yet no values I put in affect how the button appears. It is always fully stretched to fill the size of the frame.
Is this this a unsupported feature in IB or in UIButton perhaps?
http://img.skitch.com/20100103-rjabkq2c2jkqynw47crxepdtwb.jpg
(Note: The above stretch values are not the ones that will work with the image properly, but just the values I was messing with at the time of the screenshot)
In the example in Beginning iPhone 3 Development only the UIImage leftCapWidth and topCapHeight are used, and the image is created/set programmatically, so that's an alternate method if contentStretch isn't working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With