UISearchBar as titleView becomes invisible when swipe to back used

Originator:dszabo
Number:rdar://7137214 Date Originated:Aug 27, 2019 at 3:08 PM
Status:Open Resolved:
Product:UIKit Product Version:iOS 12.4
Classification:Incorrect/Unexpected Behavior Reproducible:Always
 
Summary:
- Using UISearchBar as a titleView in a UIViewController's navigationItem. 
- Then pushing an another UIViewController to the navigation stack. 
- Finally when we pop back by swiping to the previous viewController, the searchBar is no longer visible.
This problem only persists on iPad.
+1: If we cancel the swipe back midway, the back button also becomes invisible on the top viewController.

Steps to reproduce:
Run the sample project, tap "push" button. Swipe from the left edge of the of the screen to the right edge of the screen.

Expected Results:
The starting screen would appear, with a search bar on the top.

Actual Results:
The starting screen appears without the SearchBar.

Version/Build:
iOS SDK: 12.4
Simulator Version: 12.4 (iPad Air 3rd generation)

Code:
https://drive.google.com/file/d/1abpvqBueH5LLdcllXC6SuLxgmgVsBmOs/view?usp=sharing

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!