Can't set UINavigationBar delegate when inside a UINavigationController

Originator:jtbandes
Number:rdar://13055919 Date Originated:21-Jan-2013 03:00 PM
Status:Open Resolved:
Product:iPhone SDK Product Version:6.0
Classification:Enhancement Reproducible:Always
 
Summary:
UINavigationBar throws an exception on setDelegate: when it is managed by a UINavigationController.

This is reasonable because of the implementation details needed by UINavigationController. However, developers need a way to hook into this as well.

UINavigationBar should be switched from using delegates to notifications.

Steps to Reproduce:
Set up an app with navigation controller and try to change the navigation bar's delegate.

Expected Results:
It works... or there are associated notifications so that other objects may respond to the delegate methods.

Actual Results:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot manually set the delegate on a UINavigationBar managed by a controller.'

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!