美文网首页
navigationController Push 动画的设置

navigationController Push 动画的设置

作者: kococlass | 来源:发表于2017-05-10 11:11 被阅读68次

    CATransition *transition = [CATransition animation];

    transition.duration = 0.5;//动画时间

    transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];

    transition.type = kCATransitionPush;//动画类型

    transition.subtype = kCATransitionFromBottom;//动画方向

    transition.delegate = self;//指定代理

    [self.navigationController.view.layer addAnimation:transition forKey:nil];//指定适用层

    然后在进行push就可以了

    相关文章

      网友评论

          本文标题:navigationController Push 动画的设置

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