UISearchController does not show search bar in navigation bar if created with default initialiser
Originator: | d2.lebedev | ||
Number: | rdar://33563261 | Date Originated: | 27-Jul-2017 12:28 pm |
Status: | Open | Resolved: | |
Product: | iOS + SDK | Product Version: | iOS 11 beta4 |
Classification: | Other Bug | Reproducible: | Always |
Summary: UISearchController does not show search bar if created with default initialiser, it is only created when `UISearchController(searchResultsController: nil)` is being used. Steps to Reproduce: Create new iOS11 search bar using the following snippet: `navigationItem.searchController = UISearchController()` Expected Results: Search bar is present inside navigation bar. Observed result of using of `UISearchController(searchResultsController: nil)` and `UISearchController()` should be identical Actual Results: Search bar is not added to view hierarchy. Version: iOS 11 beta4 Notes: Workaround: use other constructor with nil parameter ` UISearchController(searchResultsController: nil)`
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!