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
Crash when inheriting SAHistoryNavigationViewController #38
Comments
Thanks for your report. At the early stage, I implemented custom navigation delegate, but that had changed this PR. But those changes seems to cause a crashing. therefore i'll fix them. |
According to Apple documentation: > If the navigation bar was created by a navigation controller and is being managed by that object, you must not change the value of this property. Navigation controllers act as the delegate for any navigation bars they create. Since this is exactly what's happening here, the OS triggers a trap and any controller subclassing SAHistoryNavigationViewController will crash as well. Simply removing the delegate assignment solves this issue.
I've opened PR #39 to fix this feel free to look at it, it's a very simple fix |
[#38] fixed crash when changing navbar delegate
Thank you :-) |
awesome, can you let me know when you make a new release so that i can update my |
I've released v2.3.0! |
I gave this lib a try but discovered a nasty crash when using it on iOS 9.2
Here's the end of the stack trace.
The debugger gives this output:
Cannot manually set the delegate on a UINavigationBar managed by a controller.
Looking at the documentation you can see that:
This is what is happening here. The controller automatically becomes the
navigationBar
delegate
. I think this line should be removed. Let me know if you need a PR I would happily do so.The text was updated successfully, but these errors were encountered: