Skip to content

cw_pushViewController 不能显示下一个控制器导航栏 #126

@weizhangCoder

Description

@weizhangCoder

1 用的最新的版本 主控制器 MainViewController 的导航栏隐藏 。NextViewController控制器的导航栏显示,都是通过- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated 这个方法去判断导航栏是否隐藏。但是点击cw_pushViewController 这个方法到下一个控制器的时候,不会走控制导航栏影藏和显示的方法。

看了下cw_pushViewController内部的代码获取的UINavigationController应该是LeftViewController这个控制器的。我需要获取的是MainViewController 的nav.
目前的临时的解决办法是 。判作者解决下

[self dismissViewControllerAnimated:YES completion:^{
UINavigationController *nav = [UIApplication sharedApplication].visibleNavigationController;
[nav pushViewController:vc animated:YES];
}];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions