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?
source
share