我想动画一个UIView的中心,我在viewDidLoad中这样做:的UIView不动画
_test.center = CGPointMake(100.0,100.0);
[UIView animateWithDuration:10.0
delay:5
options:UIViewAnimationOptionCurveLinear
animations:^{_test.center = CGPointMake(100.0,-100.0);}
completion:^(BOOL finished) {
}];
但是当我运行的代码,测试视图中心已经为100, - 100。为什么它不动画?
移动代码'viewDidAppear'。 – Avi
@Avi它的作品谢谢! – GiddensA