UIView animation

前端 未结 5 2066
醉话见心
醉话见心 2020-12-30 18:00

I am trying to animate a UIView here. It looks like a rectangle, and I just want to translate it to my coordinations.

So, how can I animate it? I tried

5条回答
  •  执念已碎
    2020-12-30 18:39

    //try this AnimationTransitionCurlDown \UP
    
    -(void)pageDown
    {
     [UIView beginAnimations:nil context:NULL];
            [UIView setAnimationDuration:1.0];
            [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self cache:YES];
    
            [UIView commitAnimations];
    }
    
    -(void)pageUP
    {
    [UIView beginAnimations:nil context:NULL];
            [UIView setAnimationDuration:1.0];
            [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self cache:YES];
    
            [UIView commitAnimations];
    }
    
    //flip uiviews  using animation
    
    
    
    -(void)FlipFromLeft
    {
    [UIView beginAnimations:nil context:NULL];
            [UIView setAnimationDuration:1.0];
            [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self cache:YES];
    
            [UIView commitAnimations];
    }
    
    -(void)FlipFromRight
    {
    [UIView beginAnimations:nil context:NULL];
            [UIView setAnimationDuration:1.0];
            [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self cache:YES];
    
            [UIView commitAnimations];
    }
    

提交回复
热议问题