zoukankan      html  css  js  c++  java
  • 页面滑动返回和点击返回按钮动作实现;

    - (void)configNavbar

    {

      UIViewController *vc =  self.navigationController.viewControllers[0];

        

        if (![vc isEqual:self]) {

            self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:self.backButton];//自定义返回按钮

        }

        

        //    // 获取系统自带滑动手势的target对象

        //    id target = self.navigationController.interactivePopGestureRecognizer.delegate;

        //    // 创建全屏滑动手势,调用系统自带滑动手势的targetaction方法

        //    UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:target action:@selector(handleNavigationTransition:)];

        //    // 设置手势代理,拦截手势触发

        //    pan.delegate = self;

        //    // 给导航控制器的view添加全屏滑动手势

        //    [self.view addGestureRecognizer:pan];

        //    // 禁止使用系统自带的滑动手势

        //    self.navigationController.interactivePopGestureRecognizer.enabled = NO;

        

        

        [self.navigationController.navigationBar setTitleTextAttributes:

         @{NSFontAttributeName:kFont_System_17,

           NSForegroundColorAttributeName:kColor_ThemeNavText}];

        

        self.navigationController.navigationBar.barTintColor = kColor_ThemeNavBG;//设置导航栏背景颜色

        }

     

     

  • 相关阅读:
    docker 方式安装gitlab时,项目的clone地址及项目文件列表地址为机器名的问题解决办法
    CPU流水线
    Element中el-form嵌套el-table双击编辑提交检验
    java基础知识
    C#多线程下载
    mysql优化
    C++ 算法(一)
    前端vue 的面试总结 以及答案以及前端技术点面试
    C# 组合任务
    C# List去重DistinctBy扩展
  • 原文地址:https://www.cnblogs.com/meixian/p/6171965.html
Copyright © 2011-2022 走看看