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

[#38] fixed crash when changing navbar delegate #39

Merged
merged 1 commit into from Jan 12, 2016

Conversation

apouche
Copy link
Contributor

@apouche apouche commented Jan 12, 2016

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.

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.
marty-suzuki added a commit that referenced this pull request Jan 12, 2016
[#38] fixed crash when changing navbar delegate
@marty-suzuki marty-suzuki merged commit 9278d44 into marty-suzuki:develop Jan 12, 2016
@apouche apouche deleted the develop branch January 12, 2016 14:01
@apouche apouche restored the develop branch January 12, 2016 14:01
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.

None yet

2 participants