Re: NSSplitView -drawDividerInRect
Re: NSSplitView -drawDividerInRect
- Subject: Re: NSSplitView -drawDividerInRect
- From: Graham Cox <email@hidden>
- Date: Sat, 05 Jan 2013 11:09:04 +1100
On 05/01/2013, at 12:16 AM, koko <email@hidden> wrote:
> I am currently drawing a custom divider via -drawDividerInRect but want to improve this and am not sure of the proper approach.
>
> I would like to draw a divider similar to that in the Xcode Utilities view which has the four buttons for Template, Code, Object and Media Libraries.
>
> This divider is interesting in that with the cursor over the divider and not a button it is the pane splitter and cursor and over a button it is the arrow.
>
> How is this divider created and drawn … ?
I don't know how it's implemented, but my guess would be that it isn't a custom divider at all.
NSplitView allows you, via its delegate, to specify a region that *acts* like the divider, even if it isn't. The panel with the buttons is probably just another view within the split view content, but which is added to the split view's divider area using [NSSplitViewDelegate splitView:additionalEffectiveRectOfDividerAtIndex:]
--Graham
_______________________________________________
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