gpt4 book ai didi

iphone - 在导航栏下添加搜索栏?

转载 作者:搜寻专家 更新时间:2023-10-30 19:57:28 26 4
gpt4 key购买 nike

我想用 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];

关于iphone - 在导航栏下添加搜索栏?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1004858/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com