No longer possible to hide navigationbar buttons on ABPeoplePickerNavigationController
Originator: | krazyyak | ||
Number: | rdar://18712182 | Date Originated: | 20-Oct-2014 |
Status: | Duplicate/5833449 | Resolved: | |
Product: | iOS SDK | Product Version: | 8.0.2 |
Classification: | Reproducible: | Always |
Summary: In iOS 7 and prior there were various ways to hide the buttons on a navigationBar in a ABPeoplePickerNavigationController. None of these seem to work any more in iOS 8.0.2 (have not tested with 8.1). I wanted to have the ABPeoplePickerNavigationController contained within a UIView of another controller, and therefore didn't need an additional Cancel button. I ended up refactoring the UI to dispay the picker in a modal. Steps to Reproduce: 1. Instantiate and display a ABPeoplePickerNavigationController 2. Attempt to hide buttons in the navigationBar. a) One way is to set your controller to be a UINavigationControllerDelegate, in `func navigationController(nav: UINavigationController, willShowViewController viewController:UIViewController, animated:Bool)` you used to be able to set the UIBarButtonItems to nil or a view with a frame of CGRectZero. b) I believe there is a private api called `setAllowsCancel(_: bool)`. Expected Results: The UIBarButtonItems are removed (or hidden) Actual Results: The UIBarButtonItems are visible. Version: iOS 8.0.2 Notes: Here is a sample project: https://dl.dropboxusercontent.com/u/392461/AddressBookUIBug.zip
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!