The documentation for showsCancelButton clearly states that this property is ignored on an iPad so that is expected behavior. So this means that tapping the little x icon causing the search to be cancelled is, unfortunately, also expected. A Mac Catalyst version of a UIKit app has always had this undesired behavior. It seems Apple is making the iPad version work the same. It’s a poor choice in my opinion. File a request via Feedback Assistant asking for it to be changed.
There are many bugs in iOS 26 related to UISearchBar. I’ve filed at least 3 separate bug reports and Apple doesn’t seem to care since none have been fixed. 2 of my reports were filed against beta 1. And my reports are about clearly broken functionality, not just things I would prefer to behave differently.
But you should file your own bug reports for any incorrect or undesired behavior. Apple needs to know that things don’t work and that they are affecting people’s apps.
Here’s a post I made summarizing the issues I’m still facing:
https://developer.apple.com/forums/thread/797701
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: