I would like to align a button in the toolbar of an os x app to the position of a split view in the window, similar to the delete button in Apple Mail. How can this be done
I know it's a bit old, but I had the same issue and found an answer:
You have to use topLayoutGuide property.
Ex in swift
view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormats(
["H:|[toolbarShadow]|", "V:[topLayoutGuide][toolbarShadow(100)]"],
views: viewDictionnary))
Of course topLayoutGuide must be in your view dictionary
You can access it through self.topLayoutGuide