好吧,我读了这篇文章,但是范围栏只是立即显示,没有动画。
问问题
1235 次
1 回答
0
这应该有效:
- (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar {
[searchBar setShowsCancelButton:YES animated:YES];
searchBar.showsScopeBar = YES;
return YES;
}
- (BOOL)searchBarShouldEndEditing:(UISearchBar *)searchBar {
[searchBar setShowsCancelButton:NO animated:YES];
[searchBar sizeToFit];
searchBar.showsScopeBar = NO;
return YES;
}
请记住关联 UISearchBar 委托。
于 2012-07-05T08:31:08.033 回答