_isOrderOpen = !_isOrderOpen; [UIView animateWithDuration:0.5 animations:^{ if (_isOrderOpen) { _orderControlConstant.constant = 50; } else { _orderControlConstant.constant = 0; } [self.view layoutIfNeeded]; }];
_isOrderOpen = !_isOrderOpen; [UIView animateWithDuration:0.5 animations:^{ if (_isOrderOpen) { _orderControlConstant.constant = 50; } else { _orderControlConstant.constant = 0; } [self.view layoutIfNeeded]; }];
转载于:https://www.cnblogs.com/10-19-92/p/5504372.html