split view customization ; need help

hey I'm in a blind alley, need new perspectives.


I have a splitview, the splitview has a delegate. I'm trying to control the limits of the splitview, a max value and a min value.

at first it was EASY, then not so much.


when I resize the splitview, it ignores trhe min and max values. I get an ugly UI, and then manipulation of the split divider snaps back to my limits. I've tried a bunch of stuff. Nothing makes the splitview behave when it's being resized.


The Most Obvious thing: unchecking Autoresizing subviews... hah! Xcode lets me uncheck it, and then rechecks it while I'm watching.


the delegate class for my splitview (in swift):


class BKSplitMan: NSObject, NSSplitViewDelegate{
    @IBOutlet weak var tableView: NSTableView!
    @IBOutlet weak var firstColl: NSTableColumn!
    @IBOutlet weak var splitView: NSSplitView!
   
    override func awakeFromNib() {
    }
   
   
   
   
   
    func splitView(splitView: NSSplitView, constrainMinCoordinate proposedMinimumPosition: CGFloat, ofSubviewAt dividerIndex: Int) -> CGFloat{
        var retVal : CGFloat = 0
       
        if let tbv = firstColl{
            retVal = tbv.width
        }
       
        return retVal
    }
   
   
    func splitView(splitView: NSSplitView, constrainMaxCoordinate proposedMaximumPosition: CGFloat, ofSubviewAt dividerIndex: Int) -> CGFloat{
        var retVal : CGFloat = 0
       
        if let tbv = tableView{
            retVal = tbv.frame.width
        }
       
        return retVal
    }
}

Hi,


If you target OS X 10.10 and higher I'd suggest to use a new class NSSpltiViewController which controls its NSSplitView and NSSplitViewItems it contains. Have fun!

so, it looks like... splitViewController may be meant more for The storyboard style of UI file.

so here's where I'm at: I'm invested in the older and more mature style of XIB, NSSplitviewController sounds really nice, but it creates a long laundry list of learning and work for me to do, just to get it up and running... I don't even know if it can do what I want it to do. This is what we call a Blind Alley.


rather than investing the time to see if SplitViewController can work in an XIB (I suspect it can, but it's not avaliable to XIBs... yeah... not in the list) and then trying to figure out the rat's nest of autoLayout settings (don't get me started)... and then finding out that it simply doesn't do what I want it to do, I'd like to get the splitView Delegate to work. It's very simple, super accessible, and It has built in support for exactly what I'm talking about... that doesn't wortk correctly.

But I did try making an autolayout constraint.

splitView to The first column in the tableView. And... since it's a cell base table... no good. I may try doing a view based table (adding a lot more work, for no reason at all) but I suspect even that will be unworkable. there's the potential for a loop in the dependancies no matter what i do.


nope. not with a view based Table either.

and... Autoalyout is incapable of fulfilling the need.

no need to bother with a SplitViewController, if Autolayout cannot address the columns in a tableView.

split view customization ; need help
 
 
Q