开发者

hiding table view and in same time showing the search bar

开发者 https://www.devze.com 2023-03-06 02:04 出处:网络
In my app i have a table view and a search bar on it .Can i anyonme tell me the way to hide the table view initially and show the search bar and also when i click on th开发者_Python百科e search bar th

In my app i have a table view and a search bar on it .Can i anyonme tell me the way to hide the table view initially and show the search bar and also when i click on th开发者_Python百科e search bar then only table vie wshould be displayed .Please provide some answers.

Thanks , Christy


Every view has a hidden property. Whenever u want to hide the table just do [tableView setHidden:YES]. As for showing the tableView whenever the searchBar is clicked, set its delegate to self (or any class in which you are implementing the UISearchBarDelegate) and in the method searchBarTextDidBeginEditing: just do [tableView setHidden:NO]. Hope it helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消