我想在导航栏下面添加一个带有uitableview的搜索栏。我想从数据库中进行搜索。你有什么好的方法吗?
UISearchBar *temp = [[UISearchBar alloc]initWithFrame:CGRectMake(0, 0, 320, 45)];
temp.barStyle=UIBarStyleBlackTranslucent;
temp.showsCancelButton=YES;
temp.autocorrectionType=UITextAutocorrectionTypeNo;
temp.autocapitalizationType=UITextAutocapitalizationTypeNone;
temp.delegate=self;
self.tableView.tableHeaderView=temp;
[temp release];