Unable to change shadowImage for UINavigationBar when prefersLargeTitles and searchController present

Originator:stephen
Number:rdar://35051117 Date Originated:October 18 2017, 3:22 PM
Status:Open Resolved:No
Product:iOS Product Version:iOS 11.1 b3
Classification:Bug Reproducible:Always
 
Area:
UIKit

Summary:

When hiding/replacing the shadow on the UINavigationBar the new shadowImage is ignored when prefersLargeTitles and a searchController is set.

Example project has been attached.

Steps to Reproduce:

1. Set the following:

navigationController?.navigationBar.prefersLargeTitles = true
navigationItem.largeTitleDisplayMode = .always
navigationItem.searchController = searchController

2. Remove the shadow with the following: 

navigationBar.setBackgroundImage(UIImage(), for: .default)
navigationBar.shadowImage = UIImage()

Expected Results:

Border at the bottom of the navigation bar to be hidden.

Actual Results:

Border on navigation bar is still present

Version/Build:

iOS 11.1 b3 / Xcode 9.1 (9B46)

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!