美文网首页
iOS push、pop和旋转动画

iOS push、pop和旋转动画

作者: JohnayXiao | 来源:发表于2018-02-23 10:48 被阅读15次
    CATransition *animation = [CATransition animation];
            animation.duration = 0.5;
            animation.timingFunction = [CAMediaTimingFunction functionWithName:@"easeInEaseOut"];
            animation.type = kCATransitionPush;
            animation.subtype = kCATransitionFromTop;
            [self.navigationController.view.layer addAnimation:animation forKey:@"animation"];
    
    [UIView animateWithDuration:2.0f animations:^{
            
            [self.view setTransform:CGAffineTransformMakeRotation(M_PI)];        
            [self.view setTransform:CGAffineTransformMakeRotation(0)];
            
        }];
    

    相关文章

      网友评论

          本文标题:iOS push、pop和旋转动画

          本文链接:https://www.haomeiwen.com/subject/lontxftx.html