Presenting UISearchController from UIViewController doesn't increase Navigation Bar height

Originator:azyktulek
Number:rdar://35994146 Date Originated:12/12/2017
Status:Open Resolved:No
Product:UIKit Product Version:10
Classification: Reproducible:Yes
 
Area:
UIKit

Summary:
Presenting UISearchController from UIViewController doesn't change the height for navigation bar. It can be reproduced on iOS 10 and iOS 11, but on iOS 11 search bar located too close to status bar and looks strange.

In comparison with UIViewController with UISearchController placed inside the navigationItem – the height for navigation bar increased properly.

Steps to Reproduce:

1) Have UIViewController in navigation stack
2) call `present(searchController, animated: true: completion: nil)`
3) search controller presented inside the navigation bar

Expected Results:
4) height for navigation bar should be increased from the default height

Actual Results:
4) navigation bar height stays the same, search bar positioned too close to status bar on iOS 11

Version/Build:
iOS 10, iOS 11

Configuration:
check sample project and included screenshot

https://github.com/gn0meavp/UISearchController-Issue-1

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!