滚动 UITableView 以关闭 UIView Above
Scroll UITableView to dismiss UIView Above
我有一个 UIViewController
具有以下内容:
UIView
as navigation (Button, Label, Button) 高度:60
UIView
含信息(标签)高度:110
UITableView
我希望当用户向上滚动时,UITableVIew
正上方的第二个 UIView
会随之移动并离开屏幕,如下所示:
.
最后,当用户再次向下滚动时,UIView
将再次出现回到初始屏幕。
从 ViewController 中删除您的第二个信息视图,并将其设置为您的 tableView
的 header 视图
tableView.tableHeaderView = informationView
我有一个 UIViewController
具有以下内容:
UIView
as navigation (Button, Label, Button) 高度:60UIView
含信息(标签)高度:110UITableView
我希望当用户向上滚动时,UITableVIew
正上方的第二个 UIView
会随之移动并离开屏幕,如下所示:
最后,当用户再次向下滚动时,UIView
将再次出现回到初始屏幕。
从 ViewController 中删除您的第二个信息视图,并将其设置为您的 tableView
的 header 视图tableView.tableHeaderView = informationView