隐藏UISearchBar的清除按钮
//隐藏UISearchBar的清除按钮 UITextField *searchField; for (UIView *subview in [_searchBar.subviews firstObject].subviews) { if ([subview isKindOfClass:[UITextField class]]) { searchField = (UITextField *)subview; searchField.clearButtonMode = UITextFieldViewModeNever; break; } }