An auto market uses the - symbol to indicate that the restriction should use the default interval. Is there a way to set priority at this distance without explicitly specifying the metric value?
For example, the following visual format will create a leading constraint between myView and its superview, equal to the default value of Cocoa / CocoaTouch. But this limitation takes priority required .
@"H:|-[myView]"
The following will create a leading constraint with a lower priority, but an explicit metric value must be specified:
@"H:|-( 10@750 )-[myView]"
I want to give a leading constraint a priority, but not an explicit indicator. The reason is that 1) I do not want to guess what the meaning of Apple is, and 2) to future proof if Apple changes this value.
Ideally, I would like the following:
@"H:|-(@750)-[myView]" or @"H:|-( -@750 )-[myView]"
But not one of them is accepted in grammar. Is there a secret format string that would achieve this?
(I don't think there is a difference between iOS and MacOS for something similar, but if there is, I am targeting MacOS.)
source share