Regression: UISearchBar.showsCancelButton no more available on iPad

Originator:futuretap
Number:rdar://37498710 Date Originated:13-Feb-2018 05:23 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:11
Classification:UI/Usability Reproducible:Always
 
Summary:
In a horizontally compact trait environment, UISearchBar should respect the showsCancelButton setting, even on iPad. When an app runs in an iPad slide over window (having a .compact horizontalSizeClass), chances are high that the app uses iPhone-like UI paradigms. That includes search bars with a Cancel button.

The current behavior that the Cancel button is never shown on iPad, seems arbitrary. This should rather be determined by the trait collection (or entirely by the developer!).

Steps to Reproduce:
 

Expected Results:
 

Actual Results:
 

Version:
11

Notes:

Comments

This is actually a regression from iOS 10. In iOS 10, UISearchBar.showsCancelButton was still working. Even worse, the behavior change breaks old apps compiled against the iOS 10.3 SDK!


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!