With auto layout enabled, auto saving divider positions by setting an autosave name for the NSSplitView in interface builder results in each divider being completely collapsed on an app restart. Disabling auto layout allows auto save works perfectly.
I have tried this in a new Xcode project as well, same result. Is this a bug, or a known incompatibility?
How could I work around this (or is there a fix to this, if it is a bug)?
I found that setting Identifier
and Autosave
within a Storyboard with autolayout enabled doesn't work. However it did work for me once I set the autosaveName
programatically.
class MySplitViewController: NSSplitViewController {
override func viewDidLoad() {
super.viewDidLoad()
splitView.autosaveName = "Please Save Me!"
}
}
I ran into this problem as well, and I found that I need to set both the identifier
and the autosaveName
values for the NSSplitView, and that they need to be set to different values.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With