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);
            }];
        }
    }];
}

posted on 2014-05-23 15:32  超级庄子  阅读(572)  评论(0编辑  收藏  举报

导航