![](/img/trans.png)
[英]How to bound UITableView Header and also want to show or hide tableview cells by clicking tableview header programatically in swift
[英]How to hide tableView header?
我在其中添加了搜索欄的tableview。
actionsTableView.tableHeaderView = searchController.searchBar
我希望我的tableView帶有隱藏的標題,當我向上滾動時會出現。
作為參考,您可以查看Telegram / WeChat / WhatsApp Messenger,他們已經實現了此功能。
在viewDidLoad
內部嘗試一下,
[self.myTableView setContentOffset:CGPointMake(0.0f, 40) animated:NO];
注意:在UITableView
內添加UISearchBar
在視圖中添加searchBar和tableView(例如mainView)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.