iOS 10 beta: Problem with UISearchBar/UISearchDisplayController

Originator:skyriser
Number:rdar://27171532 Date Originated:2016.07.05
Status:open Resolved:
Product:iOS 10 Product Version:
Classification: Reproducible:
 
Area:
UIKit

Summary:
Problem with UISearchBar/UISearchDisplayController on iOS 10 beta.

Using the first iOS 10 developer beta on device or simulator), and using either XCode 7.3.1 or 8.0 beta. (10.0 14A5261U in Simulator)

Works correctly on iOS 9.3 and lower.

We are aware that UISearchDisplayController is deprecated, but this is an existing app in the app store that is having this issue.

See attached sample code.

Steps:
-Clicking on the "Good" tab (see screenshot), then click on the search bar text field. It resizes and displays a dark overlay correctly.

-Clicking on the "Bad" tab (see screenshot), then click on the search bar text field. It resizes incorrectly (squished on the left side of the screen, only a few pixels visible) and doesn't show the dark overlay correctly.

Note:
-ignore the content of the actual table view

-the Good example uses a UITableViewController (RecipeTableViewController.m) as the base controller inside a UINavigationController
-the Bad example uses a UIViewController (RecipeBookViewController) as the base controller   inside a UINavigationController (See MainStoryboard)


For some reason this sample has to be run with XCode 8 beta, since the Storyboard format isn't compatible with XCode7 (that's a problem for another time i guess)

Sample based on 2 merged tutorial projects:
https://www.appcoda.com/how-to-add-search-bar-uitableview/
http://www.appcoda.com/search-bar-tutorial-ios7/

Thanks!

Comments

Note: our production app's view hierarchy is a bit more complex. I'm trying to update the sample app to reproduce the problem with the same layout. The UISearchBar seems to be embedded in a UIWebView which is inside a UIPageViewController.


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!