/*
Duration:持续时间
delay: 延迟时间
options: 枚举值 动画的风格
*/
[UIView animateKeyframesWithDuration:3 delay:0 options:(UIViewKeyframeAnimationOptionRepeat) animations:^{
/*
参数1: RelativeStartTime: 相对的开始时间
参数2: relativeDuration:相对持续时间
*/
[UIView addKeyframeWithRelativeStartTime:0.0 relativeDuration:0.5 animations:^{
ws.MyLabel.center = self.view.center;
}];
[UIView addKeyframeWithRelativeStartTime:0.5 relativeDuration:0.3 animations:^{
ws.MyLabel.frame = CGRectMake(100, 100, 100, 100);
}];
ws.MyLabel.frame = CGRectMake(100, 400, 100, 100);
}];
} completion:^(BOOL finished) {
NSLog(@"开始了吗?已经结束了。。");
}];