UISearchController shows empty view controller when in UINavigationController in UITabBarController
Originator: | DanielMiedema | ||
Number: | rdar://23290615 | Date Originated: | 10-27-2015 |
Status: | open | Resolved: | |
Product: | iOS SDK | Product Version: | 9.1 |
Classification: | Reproducible: | Always |
Summary: If a UISearchController is imbedded in a UINavigationController which is a tab of a UITabBarController, if you type into the search bar to filter the results, navigate to another tab then come back the controller is gone and an empty screen is displayed. To fix the search bar text must be cleared, navigate to another tab then come back to disable the UISearchResults table view (or whatever view is displayed when the search controller is active) Steps to Reproduce: 1. Create a UITableView subclass with a UISearchController property 2. Embed the UITableView subclass in a UINavigationController 3. Put the UINavigationController in a tab of a UITabBarController with at least one other view controller (to have 2 or more tabs) 4. Put the search bar of the search controller in the table view header 5. run the app 6. Filter the tableview with the search bar 7. navigate to another tab in the tab bar controller 8. Come back to the filtered tab 9. notice a black/empty screen with just a tab bar Expected Results: The tableview to look exactly how I left it when I come back, exactly how a UISearchDisplayController worked Actual Results: View controller is empty and the search bar must be cleared, and i must navigate to another tab and come back for it to work Version: iOS 9.1 (13B143) Notes: Configuration: iPhone 6+
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!