Giter VIP home page Giter VIP logo

Comments (7)

rickytan avatar rickytan commented on May 13, 2024

是什么情况下需要直接用这个?你可以:

self.rt_navigationController.rt_viewControllers;

重写 getter 尚不清楚会不会造成隐患

from rtrootnavigationcontroller.

swsdyg avatar swsdyg commented on May 13, 2024

其实我也注意到了,重写getter确实容易造成问题,我看了您的源码,我准备再封装一层然后使用self.rt_navigationController.rt_viewControllers,我还想问一个问题,就是我在viewcontroller(不是navigationcontroller)的子类中重写了- (UIStatusBarStyle)preferredStatusBarStyle方法,但是不会调用,但我看您的调用没问题,不知您知道是什么原因吗,还望不吝赐教!

from rtrootnavigationcontroller.

rickytan avatar rickytan commented on May 13, 2024

你的 viewController 子类放在哪个里面?

from rtrootnavigationcontroller.

swsdyg avatar swsdyg commented on May 13, 2024

我是说你在RTContainerController类中重写了- (UIStatusBarStyle)preferredStatusBarStyle方法会调用,而我自己写了一个UIViewController的子类,里面也重写了该方法但不会调用(我的工程还没引入您的项目,我只是单纯的请教问题,希望您不要见谅),我一直不明白原因,所以想请教一下。
截图是您的代码,这个方法是会自动调用的
screen shot 2016-07-14 at 11 08 00 am
下面是我的代码,但该方法不会被调用
screen shot 2016-07-14 at 11 14 57 am

screen shot 2016-07-14 at 11 14 08 am

from rtrootnavigationcontroller.

rickytan avatar rickytan commented on May 13, 2024
  1. Info.plist 中设置 view controller based status bar 为 YES
  2. 如果你的 VC 在系统的 Navigation 中,它不会被调到,Navigation 接管了

from rtrootnavigationcontroller.

swsdyg avatar swsdyg commented on May 13, 2024

@rickytan 谢谢你,我找到原因了,其实你的根本没有设置view controller based status bar 为 YES
但你的RTContainerController中的- (UIStatusBarStyle)preferredStatusBarStyle方法会调用,是因为你的navigation bar是隐藏的,我实验了一下,如果我把自己写的navigation bar隐藏掉也是可以的,谢谢你!
be6c86c7-2ce9-4314-a957-aeb80495ce88

from rtrootnavigationcontroller.

rickytan avatar rickytan commented on May 13, 2024

参考 #9

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.