有没有办法强制取消按钮保持可见而不创建自定义搜索栏?
- (void)searchDisplayControllerDidBeginSearch:(UISearchDisplayController *)controller { controller.searchBar.showsCancelButton = YES; }