-(void)startAnim:(id)sender{
[UIView animateWithDuration:1 animations:^{
redView.frame=CGRectMake(100, 300, 150, 150);//大小位置
redView.transform=CGAffineTransformMakeRotation(M_PI_4);//角度
} completion:^(BOOL finished) {
if (finished) {
[UIView animateWithDuration:2 animations:^{
redView.transform=CGAffineTransformIdentity;//把变形还原
redView.frame=CGRectMake(100, 100, 100, 100);
}];
}
}];
}
UIView动画---移动与变形
最新推荐文章于 2024-06-09 16:41:15 发布