UIImagePickerController inherits init methods from UINavigationController and UIViewController but doesn't implement them

Originator:stephen.groom
Number:rdar://23143131 Date Originated:16-Oct-2015 02:41 PM
Status:Open Resolved:
Product:Developer Tools Product Version:iOS SDK 9.0.2
Classification:Other Bug Reproducible:Always
 
Summary:
UIImagePickerController is only correctly set up if initialised using -init.  Calling any of the other init methods it inherits return malformed half-configured instances with no functionality.  This behaviour is doesn’t seem to be documented anywhere.

Steps to Reproduce:
Create and present an UIImagePickerController using -[UIImagePickerController initWithNavigationBarClass:toolbarClass:].  The image picker controller and its UINavigationBar is presented but with no root view controller.

Notes:
There are a few things that I might expect to see when calling an unimplemented init method, but returning a useless instance feels wrong. In the past I’ve seen
• An exception
• An __attribute__((unavailable(“”)))
• A note in the documentation (I can’t find anything about only calling -init at https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImagePickerController_Class/index.html)

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!