我有以下约束:
[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[drawerView(==tapView)]|" options:0 metrics:nil views:viewDictionary]
我想用它做一些动画,因此我需要将它参数化。我想拥有相同的东西,但使用 API。这是我尝试过的,但它不起作用:
[NSLayoutConstraint constraintWithItem:drawerView
attribute:NSLayoutAttributeHeight
relatedBy:NSLayoutRelationEqual
toItem:self.drawerMenuVC.tapView
attribute:NSLayoutAttributeHeight
multiplier:1.0
constant:0]
我想要的是让两个视图具有相同的高度。