According to the Cocoa Auto Layout Guide, I can use a dash in the visual constraint format language to "denote the standard Aqua space:"
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"[a]-[b]"
options:0
metrics:nil
views:viewDict]];
However, I can't seem to find an NSLayout...
constant or method that allows me to do the same thing if I'm building a constraint without using the visual format language:
[self addConstraint:[NSLayoutConstraint constraintWithItem:a
attribute:NSLayoutAttributeTrailing
relatedBy:NSLayoutRelationEqual
toItem:b
attribute:NSLayoutAttributeLeading
multiplier:1.0f
constant:<# ??? #>]];
Is there a constant (or another value or method) that I can use to define the Aqua space in such a situation?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…