我有下面的代碼以便延遲更改NSLayoutConstraint
。價值在變化,但沒有延遲和動畫。請讓我知道這個代碼有什麼問題。NSLayoutConstraint更改不起作用
self.heightConstraint.constant = 100;
[self.animatingView setNeedsUpdateConstraints];
[UIView animateWithDuration:3.0 delay:1.0 options:UIViewAnimationOptionCurveEaseOut animations:^{
[self.animatingView layoutIfNeeded];
} completion:^(BOOL finished) {
}];
移除[self.animatingView layoutIfNeeded]; 從您的代碼。並檢查 – Nirmalsinh
@Nirmalsinh:即使刪除它也不能工作。 – boom