Question

I need to add a variable number of NSSliders to a custom view at runtime and I would like to have them spaced evenly across the available space. I've looked at Apple docs and seen some examples on 'net and they none of them quite illustrate how to do this. I might have one view, I might have four. How can I programmatically express these constraints between an unknown number of items?

Was it helpful?

Solution

I found the answer here: https://github.com/smileyborg/UIView-AutoLayout

Written for iOS, but easy enough to make work for MacOS

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top