• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSSplitView question - how to implement my own "adjustViews" style method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSplitView question - how to implement my own "adjustViews" style method


  • Subject: Re: NSSplitView question - how to implement my own "adjustViews" style method
  • From: Todd Heberlein <email@hidden>
  • Date: Mon, 02 Jul 2012 22:05:31 -0700

On Jul 2, 2012, at 9:46 PM, Motti Shneor wrote:

> Thanks Graham (Sigh…)
>
> I was beginning to think I'm stupid or something, struggling so hard with a UI element as ordinary as a Split-View.

I ran into this exact same problem last week. I can't believe it is an extremely rare situation.

I tried using constraints to solve it, but I'm such a newbie at constraints I didn't think I had a chance in the near term. I did see this example code, but I haven't tried it:

	http://developer.apple.com/library/mac/#samplecode/Cocoa_Autolayout_Demos/Listings/ReadMe_txt.html#//apple_ref/doc/uid/DTS40010636-ReadMe_txt-DontLinkElementID_13

> "SplitView" demonstrates the API from the perspective of a view.  It implements a split view with one extra feature: when a divider is dragged, it pushes other dividers out of the way if necessary, and they snap back.  The class is 245 lines long compared with NSSplitView's 2502. This is of course not a fair comparison because NSSplitView does more, but it's clear that it's a lot simpler, particularly in the dragging code.  This example illustrates fancy use of priority, overriding updateConstraints, dragging, and constraints that cross the view hierarchy.


Todd


_______________________________________________

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


References: 
 >NSSplitView question - how to implement my own "adjustViews" style method (From: Motti Shneor <email@hidden>)
 >Re: NSSplitView question - how to implement my own "adjustViews" style method (From: Graham Cox <email@hidden>)
 >Re: NSSplitView question - how to implement my own "adjustViews" style method (From: Motti Shneor <email@hidden>)

  • Prev by Date: Re: NSSplitView question - how to implement my own "adjustViews" style method
  • Next by Date: Re: NSSplitView question - how to implement my own "adjustViews" style method
  • Previous by thread: Re: NSSplitView question - how to implement my own "adjustViews" style method
  • Next by thread: Re: NSSplitView question - how to implement my own "adjustViews" style method
  • Index(es):
    • Date
    • Thread