Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有搜索栏的表格视图。我想为用户提供打开或关闭搜索栏的选项。当搜索栏关闭时,该区域应显示 UIToolBar。这可能吗?
为您的 searchBar 分配一个标签
-(IBAction) searchbarOFF: (id) sender { [[urTableView viewWithTag:100] removeFromSuperview]; //Add UIToolBar to your TableView here. }