AutoLayoutを使っているUIViewをアニメーションする方法
AutoLayoutを使っているUIViewのアニメーション。
制約を更新してlayoutIfNeededを呼ぶ。
- (void)move { self.constraintViewY.constant = 100; [UIView animateWithDuration:0.5f delay:0.0 options:UIViewAnimationOptionCurveEaseInOut animations:^ { [self.view layoutIfNeeded]; } completion:nil]; }
知らないと知らないよね。
AutoLayoutされたUIViewをアニメーションしたい。今すぐしたい。
— ひとのみち (@hitonomichi) February 4, 2016