Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解决didMoveToParentViewController:不调用的问题 #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

swsdyg
Copy link

@swsdyg swsdyg commented Apr 7, 2017

更改:重写了RTContainerController类的- willMoveToParentViewController:- didMoveToParentViewController:方法, 删除了- initWithContentController:- initWithController:navigationBarClass:withPlaceholderController:backBarButtonItem:backTitle:中对- didMoveToParentViewController:方法的手动调用

更改说明:其实当parent != nil时,contentViewController的- willMoveToParentViewController:- didMoveToParentViewController:方法是会由系统自动调用的,不需要处理,当parent == nil时,经测试不会调用,所以这时需要手动调用 contentViewController 的对应方法

我也不知道这样修改是否有问题,也不知道这样能否解决作者所说的顺序问题,望作者多加测试,辛苦!

…oParentViewController:'方法, 删除了'initWithContentController:'和'initWithController:navigationBarClass:withPlaceholderController:backBarButtonItem:backTitle:'中对'didMoveToParentViewController:'方法的手动调用
@rickytan
Copy link
Owner

rickytan commented May 8, 2017

你这个实现是 work 的,但是 containerNavigationController- didMoveToParentController: 不会调到

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants