marty-suzuki / SAHistoryNavigationViewController

SAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationContoller. Support 3D Touch!
MIT License
1.57k stars 91 forks source link

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

Closed apouche closed 8 years ago

apouche commented 8 years ago

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.