• present(模态)实现出push的效果


    在present加上这个转场动画,取消掉原来的转场动画

      CATransition *animation = [CATransitionanimation];

        animation.duration = 0.35;

        animation.timingFunction = UIViewAnimationCurveEaseInOut;

        animation.type = kCATransitionPush;

      animation.subtype = kCATransitionFromRight;

        [self.view.window.layeraddAnimation:animation forKey:nil];

        [self presentViewController:setVC animated:NOcompletion:nil];

    在dissmiss加上这个转场动画,取消掉原来的动画效果

          CATransition *animation = [CATransition animation];

     animation.duration = 0.35;

     animation.timingFunction = UIViewAnimationCurveEaseInOut;

     animation.type = kCATransitionPush;

     animation.subtype = kCATransitionFromLeft;

       [self.view.window.layer addAnimation:animation forKey:nil];

           [selfdismissViewControllerAnimated:NOcompletion:nil];

    然后就和NavCtl的push效果和back效果几乎一致。

  • 相关阅读:
    div弹出层
    经典SQL语句
    sql连接及操作
    给flash加上连接
    在c#中图片原比例缩放
    悬浮提示筐
    拖动板块
    IFrame自适应高度
    SQL语句中的日期计算
    注意Request.Cookies["UserID"]的用法
  • 原文地址:https://www.cnblogs.com/shizhiliblog/p/7679963.html
Copyright © 2020-2023  润新知