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

工程中使用RTRootNavigationController后,在controller中重写- (BOOL)canBecomeFirstResponder 无法调用 #42

Closed
maqihan opened this issue Jan 13, 2017 · 7 comments

Comments

@maqihan
Copy link

maqihan commented Jan 13, 2017

工程中使用RTRootNavigationController后,在controller中重写 - (BOOL)canBecomeFirstResponder ,导致不能调用canBecomeFirstResponder;

@maqihan
Copy link
Author

maqihan commented Jan 13, 2017

我查到 问题出在这里 屏蔽这段话 走系统的push就没事

- (void)pushViewController:(UIViewController *)viewController
                  animated:(BOOL)animated
{
    if (self.viewControllers.count > 0) {
        UIViewController *currentLast = RTSafeUnwrapViewController(self.viewControllers.lastObject);
        [super pushViewController:RTSafeWrapViewController(viewController,
                                                           viewController.rt_navigationBarClass,
                                                           self.useSystemBackBarButtonItem,
                                                           currentLast.navigationItem.backBarButtonItem,
                                                           currentLast.title)
                         animated:animated];
    }
    else {
        [super pushViewController:RTSafeWrapViewController(viewController, viewController.rt_navigationBarClass)
                         animated:animated];
    }
}

@rickytan
Copy link
Owner

rickytan commented Jan 16, 2017

什么情况下会用 VC 的 - (BOOL)becomeFirstResponder

@xiaoyangh
Copy link

同问,这个问题如何解决?一般的IM软件都会用到这个方法

@rickytan
Copy link
Owner

你是怎么调用的?@xiaoyangh 预期效果是什么?

@rickytan
Copy link
Owner

帮忙试下这个分支 issue42 有没有解决你的问题?

@PatShen
Copy link

PatShen commented Feb 3, 2017

我用融云的SDK验证过,issue42解决了这个问题。

rickytan added a commit that referenced this issue Feb 6, 2017
@ivarwei
Copy link
Contributor

ivarwei commented Jun 1, 2017

遇到了同样的问题,issue42解决了这个问题

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

5 participants