Giter Site home page Giter Site logo

Comments (10)

rickytan avatar rickytan commented on May 18, 2024

这个属性只在 - (void)viewDidLoad: 设置一次有效,之后的改变是无效的,就像:

self.extendedLayoutIncludesOpaqueBars;
self.automaticallyAdjustsScrollViewInsets;
self.edgesForExtendedLayout;

等属性一样

from rtrootnavigationcontroller.

PatShen avatar PatShen commented on May 18, 2024

如果想要在某个ViewController的生命周期中,控制可划出/不可划出,还有其他方式实现吗?

from rtrootnavigationcontroller.

rickytan avatar rickytan commented on May 18, 2024

不能一开始就确定吗?如果用户手势返回滑到一半,突然又禁止呢?

from rtrootnavigationcontroller.

PatShen avatar PatShen commented on May 18, 2024

是这样子的,iOS8新增的WKWebview,可以通过右滑来返回上一页。
如果一开始确定手势为开启的话,会将WKWebview的右滑手势屏蔽...这里的话我想通过判断WKWebview是否可以返回(canBack)来判断手势是否应该开启。

from rtrootnavigationcontroller.

rickytan avatar rickytan commented on May 18, 2024

试试:

self.rt_navigationController.interactivePopGestureRecognizer.enabled = !self.webView.canGoBack;

但是记得 vc 消失时还原设置

from rtrootnavigationcontroller.

PatShen avatar PatShen commented on May 18, 2024

这个可以!非常感谢!

from rtrootnavigationcontroller.

ucoker avatar ucoker commented on May 18, 2024

可行,感谢🙏

from rtrootnavigationcontroller.

rickytan avatar rickytan commented on May 18, 2024

使用手势依赖应该更科学点:#104 (comment)

from rtrootnavigationcontroller.

KearLiao avatar KearLiao commented on May 18, 2024

image
每次这个都被会设置一次 然后我在viewDidload里面设置 禁止 就失效?

from rtrootnavigationcontroller.

rickytan avatar rickytan commented on May 18, 2024

@KearLiao 不会每次都改,还有个条件 rt_hasSetInteractivePop

from rtrootnavigationcontroller.

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.