两个view控制底部隐藏 1、底部隐藏 NSArray* constrains = self.ve_bottom.constraints; for (NSLayoutConstraint* constraint in constrains) { if (constraint.firstAttribute == NSLayoutAttributeHeight) { constraint.constant = 0.0; } } 2、更新上面view的距离底部的约束 NSArray* constrains2 = self.ve_top.constraints; for (NSLayoutConstraint* constraint in constrains2) { if (constraint.secondItem == self.ve_top) { //据底部0 if (constraint.firstAttribute ==NSLayoutAttributeBottom) { constraint.constant = 0.0; } } }