• 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: NSSplitViewController and loading of NSSplitViewItems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSplitViewController and loading of NSSplitViewItems


  • Subject: Re: NSSplitViewController and loading of NSSplitViewItems
  • From: Dragan Milić <email@hidden>
  • Date: Wed, 09 Mar 2016 02:28:54 +0100

On sre 09.03.2016., at 01.49, Dragan Milić wrote:

> As it becomes common for my recent posts, since the issue is not easy to explain in words, I’ve attached a very simple project demonstrating it.
>
> It’s ongoing troubles with NSSplitViews, this time specifically with NSSplitViewController. A sentence from documentation says:
>
> “A split view controller employs lazy loading of its views. For example, adding a collapsed split view item as a new child does not load the associated view until it is revealed.”
>
> I can get this to work (in both code and IB) only when setting an instance of NSSplitViewController as a contentViewController of a window. But I can’t get NSSplitViewController to load NSSplitViewItems otherwise.

Okay, I’ve just figured it out. It’s rather simple, but kind of stupid. The problem is that the “”inner” split view controller wasn’t being loaded at all. In order to load it, one has to access not its “splitView” property, but its (from NSViewController superclass inherited) “view” property which is not very useful in case of split view controller.

-- Dragan
_______________________________________________

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: 
 >NSSplitViewController and loading of NSSplitViewItems (From: Dragan Milić <email@hidden>)

  • Prev by Date: NSSplitViewController and loading of NSSplitViewItems
  • Next by Date: UICollectionViewCells flashing on reload
  • Previous by thread: NSSplitViewController and loading of NSSplitViewItems
  • Next by thread: UICollectionViewCells flashing on reload
  • Index(es):
    • Date
    • Thread