A recently introduced second option consists
in using a resizable image as a button background
after having set its resizable and non-resizable
areas in code. Start by making a pill-shaped
background image in your graphic editor.
Not accurate. -[UIImage stretchableImageWithLeftCapWidth:topCapHeight] has been around since the first public SDK release. Although, I must say the -resizableImageWithCapInsets: methods added in iOS 5 and 6 are far more powerful.
Also, here are a bunch of UIButton subclasses that I think are pretty neat that demonstrate some of the techniques described in the article, plus others:
Comments
Also, here are a bunch of UIButton subclasses that I think are pretty neat that demonstrate some of the techniques described in the article, plus others:
http://www.cocoacontrols.com/platforms/ios/controls/bbutton
http://www.cocoacontrols.com/platforms/ios/controls/psstoreb...
http://www.cocoacontrols.com/platforms/ios/controls/gloss-ca...