Giter VIP home page Giter VIP logo

Comments (7)

userdefault avatar userdefault commented on May 14, 2024

已解决:[self.navigationController popToViewController:self.rt_navigationController.rt_viewControllers[0] animated:YES];

from rtrootnavigationcontroller.

rickytan avatar rickytan commented on May 14, 2024

这个不是解决办法。能提供下你的层级结构及调用代码吗?

from rtrootnavigationcontroller.

userdefault avatar userdefault commented on May 14, 2024

@rickytan 我写的demo,控制器A push到B,B push到C,然后C返回B后者A,测试发现直接使用[self.navigationController popToViewController:controllerB animated:YES]方法不行,你看下

from rtrootnavigationcontroller.

rickytan avatar rickytan commented on May 14, 2024

你在 C 里返回到 B,只有一层,直接 popViewControllerAnimated: 不就好了么?

一定要 popToViewController:animated:,你的 B 实例是怎么获取的?

from rtrootnavigationcontroller.

userdefault avatar userdefault commented on May 14, 2024

@rickytan ,我是整体测试下你的方法,因为popToViewController:animated:在真实项目中会经常用,我是storyboard创建的控制器,获取的方法也是根据控制器id取的方法

from rtrootnavigationcontroller.

rickytan avatar rickytan commented on May 14, 2024

通过 storyboardID 每次会创建新的实例,并不是你之前 push 进去的 B

from rtrootnavigationcontroller.

rickytan avatar rickytan commented on May 14, 2024

Discussion
You use this method to create view controller objects that you want to manipulate and present programmatically in your application. Before you can use this method to retrieve a view controller, you must explicitly tag it with an appropriate identifier string in Interface Builder.

This method creates a new instance of the specified view controller each time you call it.

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.