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
}
}