Installing UIButton Stretches Background Images in Interface Builder (Xcode 4)

I am trying to customize a UIButton background using a stretch image in Interface Builder. The button is configured as "custom", and I assigned it a background image. The view mode is set to "Zoom to fill," but when I set any value in the "Stretch" area, it does nothing.

I tried to do this programmatically and it works using the UIImage message stretchableImageWithLeftCapWidth:topCapHeight:, but its use by Apple is not recommended.

Is there any way to make it work with Interface Builder?

+5
source share
1 answer

, / Xcode 4. .

, iOS 5: SDK NDA , . , : Apple stretchableImageWithLeftCapWidth:topCapHeight:. ( iOS 5) , .

+4

All Articles