UIView의 간단한 애니메이션

1380 단어
여기 있는 이 애니메이션은 무슨 할 말이 있는지 코드를 직접 보십시오.
//  、    
    [UIView animateWithDuration:0.5 animations:^{
        self.aView.frame = CGRectMake(_aView.frame.origin.x, _aView.frame.origin.y + 50, _aView.frame.size.width, _aView.frame.size.height);
    }];
    
    //    
    [UIView animateWithDuration:0.5 animations:^{
        _aView.alpha = !_aView.alpha;
    }];
    
    //    
    [UIView beginAnimations:nil context:nil];//       
    [UIView setAnimationDuration:0.5];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseIn];//   『  』
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:_aView cache:NO];
    [UIView commitAnimations];//      ,    
    
    //  
    [UIView animateWithDuration:0.5 animations:^{
        //     
//        _aView.transform = CGAffineTransformMakeRotation(M_PI);
        //   
        _aView.transform = CGAffineTransformRotate(_aView.transform, M_PI_4);
    }];
    
    //    
    [UIView animateWithDuration:0.5 animations:^{
        _aView.transform = CGAffineTransformMakeScale(2, 2);
    }];
    
    //  
    [UIView animateWithDuration:0.5 animations:^{
        _aView.transform = CGAffineTransformScale(_aView.transform, 0.7, 0.7);
    }];

    //  
    [UIView animateWithDuration:0.5 animations:^{
        _aView.transform = CGAffineTransformTranslate(_aView.transform, 10, 10);
    }];

좋은 웹페이지 즐겨찾기