In Xcode I can put some controls on the window's contentView and they get default spacing according to some unknown rules. This depends on control types that are constrained. For example, two NSButtons of regular type are separated by 12 points, but regular button and gradient button only by 8.

Also, vertical space depends too. Regular spacing is 8, but for two NSTextFields the spacing is 10, and for button below them even 20.

What are the rules and/or constants?

有帮助吗?

解决方案

Can't find it in the docs right now but it was mentioned in the various WWDC videos covering this topic -

default should refer to the various suggested defaults in the Human Interface Guidelines, i.e. using default will apply Apple's suggested settings.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top