GithubHelp home page GithubHelp logo

Comments (15)

SmileZXLee avatar SmileZXLee commented on May 28, 2024

ZXIsBangScreen

您好,我在iOS 14的iPhone XR上未发现您提出的问题,您可以将ZXNavigationBar更新至1.2.4后再次尝试哦,最新版本是根据safeAreaInsets.bottom > 0来判断刘海屏的。

from zxnavigationbar.

hhw2020 avatar hhw2020 commented on May 28, 2024

恩,我这里的版本是根据top == 44 判断的。
由于改了一些源码,自行按判断bottom处理了。
不过ZXAppStatusBarHeight内的44最好也建议改成动态取top的方式。
多谢了!

from zxnavigationbar.

SmileZXLee avatar SmileZXLee commented on May 28, 2024

恩,我这里的版本是根据top == 44 判断的。
由于改了一些源码,自行按判断bottom处理了。
不过ZXAppStatusBarHeight内的44最好也建议改成动态取top的方式。
多谢了!

ZXAppStatusBarHeight固定写死20(刘海屏为44)的而不动态获取是为了适配iOS 11以下的设备开热点、开音视频情况下的导航栏高度,因为在iOS 11以下,当设备开启热点或者音视频时,动态获取到的状态栏高度会比20(刘海屏为44)高许多,导致计算出来的导航栏高度异常增高,因此ZXAppStatusBarHeight写死才能适配这种情况,且不会对正常计算导航栏高度产生影响,我在1.2.4版本中重新分析优化了iPad、横屏、iPhone刘海屏、iPad刘海屏及iOS8-14的情况下导航栏的布局计算,因此建议您可以更新到最新的1.2.4版本。
ZXNavigationBar有需要调整的地方可以通过Pull Request或者将demo发送给我,若确实需要我可以将它们加入到pod中,这样您就可以不用担心pod更新造成的问题了。

from zxnavigationbar.

hhw2020 avatar hhw2020 commented on May 28, 2024

好的,还确实没有考虑到这些修改后影响的边界问题。
那我升级下最新版吧,感谢作者。
其实也没改什么,主要就是加了个subLeftButton,也是参照你的其他button方式来的。

from zxnavigationbar.

SmileZXLee avatar SmileZXLee commented on May 28, 2024

好的,还确实没有考虑到这些修改后影响的边界问题。
那我升级下最新版吧,感谢作者。
其实也没改什么,主要就是加了个subLeftButton,也是参照你的其他button方式来的。

不客气,您可以先备份一下修改内容再更新,感谢您的建议,下一个版本我加一下subLeftButton,您在使用过程中有任何问题也可以随时联系我,感谢!

from zxnavigationbar.

SmileZXLee avatar SmileZXLee commented on May 28, 2024

您好,pod 1.2.5已新增zx_subLeftBtn

from zxnavigationbar.

hhw2020 avatar hhw2020 commented on May 28, 2024

from zxnavigationbar.

SmileZXLee avatar SmileZXLee commented on May 28, 2024

收到,马上更新。十分感谢 发自我的iPhone

不好意思,更新版本为1.2.6,昨晚pod引用的文件忘记更新了

from zxnavigationbar.

hhw2020 avatar hhw2020 commented on May 28, 2024

from zxnavigationbar.

SmileZXLee avatar SmileZXLee commented on May 28, 2024

你好,请教下关于彻底禁用侧滑返回手势的问题。 我尝试使用以下两种方式: 1. self.zx_disableFullScreenGesture = YES; 2.self.zx_handlePopBlock = ^BOOL(ZXNavigationBarController * _Nonnull viewController, ZXNavPopBlockFrom popBlockFrom) { return NO; }; 但是在靠近左侧边缘侧滑的话还是可以响应侧滑返回这个动作。 不知道是否有遇到过这种情况,本来想给git提issue,发现你一直在维护已经fix的issue。 因为小问题且为了不给你增加维护成本,故使用了邮件,打扰之处,望见谅。期待你的回复。 在 2020年10月26日 15:15,ZXLee[email protected] 写道: 收到,马上更新。十分感谢 发自我的iPhone … 不好意思,更新版本为1.2.6,昨晚pod引用的文件忘记更新了 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

您好,只需要设置

self.zx_handlePopBlock = ^BOOL(ZXNavigationBarController * _Nonnull viewController, ZXNavPopBlockFrom popBlockFrom) {
    return NO;
};

即可,我在demo中设置了,可以正常禁止所有pop操作,在左侧边缘也是正常的,您可以使用此项目的demo试下,若您在此项目的demo中测试正常,在您的项目中不正常,就应该是与您的项目中的某些库冲突导致的,您可以提供给我一下pod的第三方名称以便我查找原因,谢谢!!

from zxnavigationbar.

hhw2020 avatar hhw2020 commented on May 28, 2024

from zxnavigationbar.

SmileZXLee avatar SmileZXLee commented on May 28, 2024

好的,那我明天参考下demo再试下看看。 发自我的iPhone

好的,我在demo中新增了pop拦截,您有空可以更新试下哦。在DemoXibViewController中,即ZXNavigationBar属性设置

from zxnavigationbar.

hhw2020 avatar hhw2020 commented on May 28, 2024

from zxnavigationbar.

SmileZXLee avatar SmileZXLee commented on May 28, 2024

当我在viewWillAppear里设置self.navigationController.interactivePopGestureRecognizer.enabled = NO; 禁用掉系统返回即生效了。应该是我自己的BaseViewController或者BaseNavigationController里面有代码影响到了。 虽然这两个我都分别继承了ZXNavigationBarController和ZXNavigationBarNavigationController。我再自检下吧。 十分感谢! 在 2020年11月23日 20:41,ZXLee[email protected] 写道: 你好,请教下关于彻底禁用侧滑返回手势的问题。 我尝试使用以下两种方式: 1. self.zx_disableFullScreenGesture = YES; 2.self.zx_handlePopBlock = ^BOOL(ZXNavigationBarController * _Nonnull viewController, ZXNavPopBlockFrom popBlockFrom) { return NO; }; 但是在靠近左侧边缘侧滑的话还是可以响应侧滑返回这个动作。 不知道是否有遇到过这种情况,本来想给git提issue,发现你一直在维护已经fix的issue。 因为小问题且为了不给你增加维护成本,故使用了邮件,打扰之处,望见谅。期待你的回复。 在 2020年10月26日 15:15,[email protected] 写道: 收到,马上更新。十分感谢 发自我的iPhone … 不好意思,更新版本为1.2.6,昨晚pod引用的文件忘记更新了 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. 您好,只需要设置 self.zx_handlePopBlock = ^BOOL(ZXNavigationBarController * _Nonnull viewController, ZXNavPopBlockFrom popBlockFrom) { return NO; }; 即可,我在demo中设置了,可以正常禁止所有pop操作,在左侧边缘也是正常的,您可以使用此项目的demo试下,若您在此项目的demo中测试正常,在您的项目中不正常,就应该是与您的项目中的某些库冲突导致的,您可以提供给我一下pod的第三方名称以便我查找原因,谢谢!! — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

当您的导航控制器继承于ZXNavigationBarNavigationController是,我会自动调用self.interactivePopGestureRecognizer.enabled = NO;方法,这里的self是导航控制器,因此应该是您在某个地方设置了self.navigationController.interactivePopGestureRecognizer.enabled = YES;导致此处的设置失效了,您可以全局搜一下这段代码,并注释掉就可以了,手势无需集成其他第三方,交由ZXNavigationBar内部自行处理即可。

from zxnavigationbar.

hhw2020 avatar hhw2020 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.