SplitView autolayout + autosave = proportionally resized views
SplitView autolayout + autosave = proportionally resized views
- Subject: SplitView autolayout + autosave = proportionally resized views
- From: Lee Ann Rucker <email@hidden>
- Date: Thu, 27 Mar 2014 13:46:37 -0700
I've converted my very complex layout to autolayout and started seeing some interesting effects that weren't there with it off:
I have two main views for my window, one has a split view, one doesn't. They get swapped in and out on demand - think Finder with list style and icon style.
The nib loads. As of awakeFromNib, the splitView's divider position is set to what it was on window close.
I hit [window setContentView:viewContainingSplitView]. Unless the contentView size is the same as viewContainingSplitView, it gets proportionally resized. And then it saves that size to prefs, so every time you close and reopen the window, even if you don't touch anything, the divider keeps moving.
I suspect that if the splitView were inside the window in the nib, it would get resized first and prefs applied after. But either way, resizing my view should not move the divider, whether the user moves it or it happens because of setContentView: (other than, of course, the user resizing the window small enough that it has to shift for constraints)
Is there any constraint variable I'm missing here, or should I file a bug?
_______________________________________________
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