GithubHelp home page GithubHelp logo

Comments (4)

SmileZXLee avatar SmileZXLee commented on May 28, 2024
  • 若您需要在特定页面禁止全屏手势,您可以在子控制器的-viewWillAppear-viewDidAppear中书写:
//将全屏手势范围缩小到宽度的十分之一
self.zx_popGestureCoverRatio = 0.1;
  • 若您需要在特定页面拦截全屏手势pop事件,您可以在子控制器中书写:
//拦截侧滑返回手势和返回按钮点击事件
self.zx_handlePopBlock = ^BOOL(ZXNavigationBarController * _Nonnull viewController, ZXNavPopBlockFrom popBlockFrom) {
    //viewController:当前控制器
    //popBlockFrom:通过什么方式(点击返回按钮或侧滑返回手势)触发pop操作
    
    //doSomething
    //返回YES则代表不禁止pop操作,返回NO则禁止pop操作
    return YES;
};

from zxnavigationbar.

VictDog avatar VictDog commented on May 28, 2024

好的,谢谢。有个小建议, 如果self.view 能自动向下偏移 statusBar 和 navigationBar 的高度就好了。 开始用系统的,换了您的这个之后, self.view 的顶部不是从导航栏底部开始,而是从0开始。所以就要调整约束了。

from zxnavigationbar.

SmileZXLee avatar SmileZXLee commented on May 28, 2024

好的,谢谢。有个小建议, 如果self.view 能自动向下偏移 statusBar 和 navigationBar 的高度就好了。 开始用系统的,换了您的这个之后, self.view 的顶部不是从导航栏底部开始,而是从0开始。所以就要调整约束了。

如果您的self.view从控制器的xib中加载,ZXNavigationBar会自动调整您的view距上的约束为导航栏高度,不需要手动调整约束。
若您的self.view是通过纯代码创建的,则在设置它的frame时,y值需设置为ZXNavBarHeight,您可以直接使用这个宏。

from zxnavigationbar.

VictDog avatar VictDog commented on May 28, 2024

好的,谢谢。

from zxnavigationbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.