我想知道如何用Apple的新语言快速制作动画。
在目标ci中,将使用以下代码将图像从屏幕顶部移至末尾:
[UIView animateWithDuration:1 delay:0 options:UIViewAnimationOptionCurveLinear animations:^{
UIImageView.center = CGPointMake(UIImageView.center.x , UIImageView.center.y + 200);
} completion:^(BOOL finished) {
[self move];
}];
所以问题是:
UIView.animateWithDuration(1, delay: 0, options: .CurveLinear, animations: {
UIImageView.center = CGPointMake(UIImageView.center.x, UIImageView.center.y + 200);
}, completion: {
(finished: Bool) in
move();
});
就是这样
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句