UITableViewHeader(固定位置) [英] UITableViewHeader (fix position)
问题描述
我在表视图中添加了UITableviewHeader,有没有办法对其进行修复.我想使用TableView进行滚动,但始终能够查看Header.
I added a UITableviewHeader to my tableview, is there a way to make it fix. I want to scroll with my TableView but always be able to watch the Header.
推荐答案
当前无法使用标准的UITableViewHeader来实现.如果需要这种行为,则必须缩小UITableView并将UIView放在顶部.
There is currently no way to achieve this using a standard UITableViewHeader. You'll have to shrink the UITableView and put a UIView at the top if you want this behavior.
据我所知,UITableViewController不允许您更改UITableView框架,因此您应该创建一个容器" UIView,其中包含一个UITableView和一个自定义的UIViewController子类.
As far as I know a UITableViewController doesn't allow you to change the UITableView frame, so you should create a 'container' UIView with an UITableView in it and a custom UIViewController subclass that controls is.
这篇关于UITableViewHeader(固定位置)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!