UISearchController breaks the UI when the search bar becomes active when in a grouped style UITableView

Originator:ben
Number:rdar://21749311 Date Originated:09-July-2015
Status:Closed Resolved:
Product:iOS Product Version:8.0
Classification: Reproducible:
 
Summary:
When using a UITableView with the group style and a large section header, when the UISearchController becomes active (user taps the search bar) it will break the UINavigationController's UINavigationBar and not show the standard searching UI with the cancel button. Also the automatic content insets are off when the UISearchController's search bar is set as the UITableView's tableHeaderView.

Steps to Reproduce:
1. Launch the app
2. Tap the search bar text field to begin search, the UI will now be in a broken state.

Expected Results:
The search bar should look like it does when used with a Plain UITableView style with the search bar in the UINavigationBar and the cancel button in the right bar button items area.

Actual Results:
The UINavigationBar breaks by disappearing and none of the search UI is visible (though the keyboard does come up). This leaves the view in an unusable state that can only be fixed by reloading the view hierarchy completely (restarting the app or popping the view controller and causing a full reload).

Version:
iOS 8.4, 8.3

Notes:
https://github.com/bendjones/UISearchControllerRadarSample

Configuration:
iOS 8, iPhone Simulator, iPhone 6+, iPhone 6

Comments

Apple Developer Relations 31-Jul-2015 10:42 AM

Thanks for letting us know that this is working in 9.0.

We are closing this bug report.

If you have questions regarding the resolution of this issue, please update your bug report with that information.

Please be sure to regularly check new Apple releases for any updates that might affect this issue.

Ben Jones 28-Jul-2015 04:12 PM

The updated code for Xcode 7 b4 is here https://github.com/bendjones/UISearchControllerRadarSample

'UISearchControllerRadarSample-1.zip' was successfully uploaded.

Ben Jones 28-Jul-2015 04:12 PM

So I checked my example using iOS 9 and Xcode 7 b4 and everything works as expected. But when using Xcode 7 b4 and running the iOS Simulator for iOS 8.4/8.3 it is still present (I'm assuming it's due to the bug being in the bundled iOS 8.x frameworks).

Apple Developer Relations 28-Jul-2015 09:59 AM

Many things have changed in newer builds of iOS, Xcode, watchOS and OS X. All of those products have beta 4 or 5 available now. Please let us know how this issue behaves on the most recent software available to you.

Please provide your response or results by updating your bug report.

Please compress any bundled files (e.g. nested folders) prior to uploading.


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!