博客> presentViewController跳转样式(自定义,系统自带)
presentViewController跳转样式(自定义,系统自带)
2018-07-20 17:03 评论:0 阅读:726 yutaotst
ios pressentViewController跳转样式 自定义跳转样式 model自带样式

presentViewController跳转样式

      UIModalTransitionStyleCoverVertical=0, //默认方式,竖向上推
             UIModalTransitionStyleFlipHorizontal, //水平反转
             UIModalTransitionStyleCrossDissolve,//隐出隐现
             UIModalTransitionStylePartialCurl,//部分翻页效果
             ===================上面是自带动画=================
             常見的轉換類型(type):
             kCATransitionFade               //淡出
             kCATransitionMoveIn          //覆盖原图
             kCATransitionPush               //推出
             kCATransitionReveal          //底部显出来
             SubType:
             kCATransitionFromRight
             kCATransitionFromLeft    // 默认值
             kCATransitionFromTop
             kCATransitionFromBottom
             设置其他动画类型的方法(type):
             pageCurl   向上翻一页
             pageUnCurl 向下翻一页
             rippleEffect 滴水效果
             suckEffect 收缩效果,如一块布被抽走
             cube 立方体效果
             oglFlip 上下翻转效果

             */

//             [feedVC setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
            CATransition *animation = [CATransition animation];
            animation.duration = 1.0;
            animation.timingFunction = UIViewAnimationCurveEaseInOut;
            animation.type = @"pageCurl";
            //animation.type = kCATransitionPush;
            animation.subtype = kCATransitionFromLeft;
            [self.view.window.layer addAnimation:animation forKey:nil];
            [weakSelf presentViewController:feedVC animated:YES completion:nil];
收藏
1
sina weixin mail 回到顶部