UIView动画---移动与变形
-(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);
}];
}
}];
}
浙公网安备 33010602011771号