标签:
[UIView animateWithDuration:(NSTimeInterval) animations:^{ <#code#> } completion:^(BOOL finished) { code }];
[UIView animateKeyframesWithDuration:(NSTimeInterval) delay:(NSTimeInterval) options:(UIViewKeyframeAnimationOptions) animations:^{ <#code#> } completion:^(BOOL finished) { code }]; delay代表延时的时间,单位是秒 UIViewKeyframeAnimationOptions常用: // UIViewAnimationOptionCurveEaseInOut // default 快进快出 // UIViewAnimationOptionCurveEaseIn = 1 << 16, 快进 // UIViewAnimationOptionCurveEaseOut = 2 << 16, 快出 // UIViewAnimationOptionCurveLinear 匀速
label.transform = CGAffineTransformMakeTranslation(0, label.height); label.transform = CGAffineTransformIdentity; 常配合二段动画(简单动画+延时动画)使用 CGAffineTransformMakeTranslation 往坐标移动 CGAffineTransformIdentity 回归原位置
标签:
原文地址:http://my.oschina.net/u/2346786/blog/495263