我想知道如何用苹果的新语言快速动画.
在目标c中,我将使用以下代码将图像从屏幕顶部移动到结尾:
[UIView animateWithDuration:1 delay:0 options:UIViewAnimationOptionCurveLinear animations:^{ UIImageView.center = CGPointMake(UIImageView.center.x,UIImageView.center.y + 200); } completion:^(BOOL finished) { [self move]; }];
所以questoin是:
解决方法
UIView.animateWithDuration(1,delay: 0,options: .CurveLinear,animations: { UIImageView.center = CGPointMake(UIImageView.center.x,UIImageView.center.y + 200); },completion: { (finished: Bool) in move(); });
这是怎么回事.