Hierarchical split views and auto layout
Hierarchical split views and auto layout
- Subject: Hierarchical split views and auto layout
- From: Dragan Milić <email@hidden>
- Date: Tue, 09 Feb 2016 00:07:51 +0100
I’m trying to implement rather complex UI, with a lot of views involved. The main window should contain one main view (module), which cannot be removed, and then users can add arbitrary number of additional specific views (modules) and arrange them on positions to their liking. Those additional views should also be resizable with user action, so I decided to use split views, which led to a view hierarchy with split views inside split views (inside split views…). The code use auto layout, thus NSSplitViewController and NSSplitViewItem instances.
I’m having a problem which is probably related to assigning a particular holding priority values to particular split view items, in order to achieve desired resizing behaviour of involved views when window is resized and/or a particular split view divider dragged. Since it’s really hard to explain with words how UI looks and works (or should work) and what the problem is, I recorded a video (4:30 minutes) showing the issue. Please don’t mind a bit poor sound quality and my narrative skills. I gave my best to explain what’s happening.
I’d be very thankful to anyone having the time to look at the video and try to figure out what could be the root of the problem. If after watching anyone has questions about implementation, code, etc, I’d be happy to provide more information.
The link for the video: https://www.dropbox.com/s/1xbl5allc35b6l2/splitviews.mov?dl=0
One final note: in moments of desperation I considered implementing the whole UI without using auto layout and do all heavy work in split view’s delegate, but that would require major redesign and rewrite of current UI code that I quickly abandoned the idea.
Thanks in advance,
-- 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