我使用下面的代码来显示带有范围栏的UISearchBar
。UISearchBar不显示范围栏
UISearchBar *searchBar = [[UISearchBar alloc]initWithFrame:CGRectMake(0, 0, 320, 45)];
searchBar.barStyle = UIBarStyleDefault;
searchBar.showsCancelButton = NO;
searchBar.autocorrectionType = UITextAutocorrectionTypeNo;
searchBar.autocapitalizationType = UITextAutocapitalizationTypeNone;
searchBar.scopeButtonTitles = [NSArray arrayWithObjects:@"One", @"Two", nil];
searchBar.showsScopeBar = YES;
self.tableView.tableHeaderView = searchBar;
[searchBar release];
但是,范围栏从不显示。为什么没有显示,我该如何解决这个问题?
非常感谢!很简单。 – Joshua 2010-08-28 14:32:56