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

请移除EasyNavigationController中对于-setTitle:的重写 #24

Open
Hsukun opened this issue Feb 19, 2019 · 0 comments
Open

请移除EasyNavigationController中对于-setTitle:的重写 #24

Hsukun opened this issue Feb 19, 2019 · 0 comments

Comments

@Hsukun
Copy link

Hsukun commented Feb 19, 2019

//- (void)setTitle:(NSString *)title
//{
// if (self.topViewController.navigationView) {
// [self.navigationView setTitle:title];
// }
//}

或将 ‘ self.topViewController.navigationView’ 的判断条件改为:self.topViewController.navigationController, 因为self.topViewController 拿回来的可能是 UINavigationController,且当 navigationController 为空时,获取navigationView时就会被NSAssert拦截,此判断根本无效:

if (!self.navigationController) {
NSAssert(NO, @"attention: this controller's navigationcontroller is null: %@",self);
}

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

No branches or pull requests

1 participant