I\'ve added a UISearchController to my application and set it\'s searchBar to the titleView
of my navigationItem
.
This works but I am seeing t
It may be helpful to note that this has changed on iOS 13 and quote Apple's documentation on showsCancelButton
, currently only available on UISearchBar.h and not on developer.apple.com
/* New behavior on iOS 13.
If the search bar is owned by a UISearchController, then using the setter
for this property (as well as -setShowsCancelButton:animated:) will implicitly
set the UISearchController's automaticallyShowsCancelButton property to NO.
*/
automaticallyShowsCancelButton
has been introduced on iOS 13.0 and should clarify what @pbasdf had already pointed out in his answer: that the buggy behavior is something intrinsic to UISearchController
.