Rah*_*yas 3 iphone cocoa-touch objective-c
我想在导航栏下面添加一个带有uitableview的搜索栏.我想从数据库中搜索?任何想法如何做到这一点
将搜索栏添加为表格的headerView.
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];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6650 次 |
| 最近记录: |