Ios 用于宽度或高度约束的布局格式选项?

Ios 用于宽度或高度约束的布局格式选项?,ios,cocoa-touch,autolayout,nslayoutconstraint,Ios,Cocoa Touch,Autolayout,Nslayoutconstraint,我使用可视化格式语言在代码中创建宽度和高度约束。像这样: [myView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[myView(100)]" options:NSLayoutFormatAlignmentMask

我使用可视化格式语言在代码中创建宽度和高度约束。像这样:

[myView addConstraints:[NSLayoutConstraint
                        constraintsWithVisualFormat:@"V:[myView(100)]"
                                            options:NSLayoutFormatAlignmentMask
                                            metrics:nil
                                              views:views]];

但是我真的不知道我应该使用什么
NSLayoutFormatOption
作为选项。一个是代码工作所必需的,但是
nslayouttributeleft
和类似的代码与宽度无关。在这种情况下,我应该使用什么选项?

如果传递任何选项没有意义,请使用0

看看苹果在他们的例子

对于Swift,可以使用格式选项:

NSLayoutFormatOptions.allZeros

0导致编译器警告