_isOrderOpen = !_isOrderOpen; [UIView animateWithDuration:0.5 animations:^{ if (_isOrderOpen) { _orderControlConstant.constant = 50; } else { _orderControlConstant.constant = 0; } [self.view layoutIfNeeded]; }];
时间: 2024-10-11 07:45:51
_isOrderOpen = !_isOrderOpen; [UIView animateWithDuration:0.5 animations:^{ if (_isOrderOpen) { _orderControlConstant.constant = 50; } else { _orderControlConstant.constant = 0; } [self.view layoutIfNeeded]; }];