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 protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to