RE: NSSegmentedControl Label
RE: NSSegmentedControl Label
- Subject: RE: NSSegmentedControl Label
- From: Shawn Bakhtiar <email@hidden>
- Date: Fri, 14 Jan 2011 16:17:58 -0500
- Importance: Normal
Don't listen to the naysayers... You can do whatever you want.
NSSegmentedCell is a good start, as it was recommended. More generically you can implement your own NSCell to really get deep; in either case simply override the draw method, and make sure you are checking the state, and drawing accordingly (so your draw function draws the correct highlights, ie if it is pressed). In fact NSButton is nothing more than a wrapper function for NSButtonCell (derive classes from it with drawInRect overrides all the time).
Conceptually an NCCell (which includes all the different Cell types) is no different than an NSView, simply less resource intensive (using the same context as its super view, etc...) to draw, instead of created a new drawing context.
So just like you can draw to a view you can draw to a cell, the frame and bounds are simply given as the area of the cell instead of the area of the view (which can have many cells in it).
Following Apples recommendation is just that, recommendation. You don't have to DO or DON'T anything, however, if your
intention is to provide a good interface to your users, following their recommendation is not a bad idea. Cluttering such a small area with an icon
and text may take away from the user experience instead of enhancing it. but as far as it does not support it, no such thing. Nothing could be father from the truth, you can always added any missing functionality, or override any ones you don't like.
IMHO
> Date: Fri, 14 Jan 2011 12:44:19 -0800
> From: email@hidden
> To: email@hidden
> CC: email@hidden
> Subject: Re: NSSegmentedControl Label
>
> On Fri, Jan 14, 2011 at 12:38 PM, koko <email@hidden> wrote:
> > It may not be recommended but I want to do it. Should I get permission from from steven p jobs first?
> >
> > Apple HIG is not the be-all, end-all of UI design.
>
> No, but it is the design document by which the AppKit implementors
> write their code.
>
> If it doesn't support it, you can't do it.
>
> --Kyle Sluder
> _______________________________________________
>
> 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
_______________________________________________
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