UISearchController searchBar showsCancelButton not being respected

后端 未结 12 2337
北荒
北荒 2021-02-13 03:58

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

12条回答
  •  情话喂你
    2021-02-13 04:25

    What about setting it with [searchBar setShowsCancelButton:NO animated:NO];

    https://developer.apple.com/library/ios/documentation/UIKit/Reference/UISearchBar_Class/#//apple_ref/occ/instm/UISearchBar/setShowsCancelButton:animated:

提交回复
热议问题