• iOS定义自己的回报button(它不影响返回手势)


     这种方法可以定义为返回到其button,它不影响返回手势。

    新方法:

     self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]
                                             initWithImage:img
                                             style:UIBarButtonItemStylePlain
                                             target:self
                                             action:@selector(onBack:)];
    self.navigationController.interactivePopGestureRecognizer.delegate = (id<UIGestureRecognizerDelegate>)self;



    老方法:

        UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:self action:nil];
        self.navigationController.navigationBar.topItem.backBarButtonItem = backButton;
    




  • 相关阅读:
    React父组件调用子组件
    ES6数组操作
    ant design mobile入坑记
    vue
    图片上传七牛
    CSS
    CSS矩形、三角形等
    使用POST下载文件
    http https协议
    前端网络必备知识
  • 原文地址:https://www.cnblogs.com/mfrbuaa/p/4588373.html
Copyright © 2020-2023  润新知