Re: UIButton variations?
Re: UIButton variations?
- Subject: Re: UIButton variations?
- From: Philip Mobley <email@hidden>
- Date: Wed, 13 Oct 2010 22:43:41 -0700
On Oct 13, 2010, at 5:07 PM, Laurent Daudelin wrote:
> I was just wondering, given the single choice of a default UIButton (when compared to all the variations that you have in NSButton on OS X) what you guys were doing whenever you need some kind of "spiced up" UIButtons. You're rolling your own, using some kind of UIButton subclass that uses some Quartz drawing or is there any other solutions? I'll probably embarked on designing a UIButton subclass that I can reuse across many apps but just wanted to get a feeling here of what others do, considering again the only choice of a default UIButton and no, I'm not talking about UIBarButtonItem or UITabBarItem that have a nice default appearance, just the poor default appearance of UIButton
A custom button style with your own image files as whatever style you want. With the UIButton.contentStretch property you can subdivide your button graphic into distinct areas to stretch or not allowing your button to "grow" as desired. There are 4 distinct states you can define for each custom button allowing you to have a different image for normal, highlighted, disabled, and selected. In 90% of the cases, the custom button style and properties can satisfy your custom button needs, but if not then you can still subclass.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden