有没有一种方法可以将以下 3 个语法行组合成一个语句,例如(不起作用):
[_cardsContainer addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[cardContainer1]|[cardContainer2]|[cardContainer3]|" options:0 metrics:nil views:viewsDictionary]];
1. [_cardsContainer addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[cardContainer1]|" options:0 metrics:nil views:viewsDictionary]];
2. [_cardsContainer addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[cardContainer2]|" options:0 metrics:nil views:viewsDictionary]];
3. [_cardsContainer addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[cardContainer3]|" options:0 metrics:nil views:viewsDictionary]];