简体   繁体   English

第一部分标头固定在顶部的UITableView

[英]UITableView with first section header fixed on top

I am developing a table view where the header of the first section of a needs to be fixed at point. 我正在开发一个表格视图,其中需要将第一部分的标题固定在该点上。 I have set table view style as Plain. 我已将表格视图样式设置为“普通”。 The section header is now fixed upto the point where the user scrolls in section 0. As soon as section 1 appears the header also scrolls up. 现在将节标题固定到用户在第0节中滚动的位置。第1节出现后,标题也会向上滚动。 Is there any way that the header of section 0 should always be fixed to the top? 有什么办法可以将第0节的标题始终固定在顶部?

Thanks in advance! 提前致谢!

You should add UIView which looks like header and it will be at fix top position and after that view add tableview so when you scroll your UIView will not affected and remains at same position. 您应该添加看起来像标题的UIView并将其固定在顶部位置,然后在该视图之后添加tableview,以便在滚动时UIView不会受到影响并保持在相同位置。 So, you can manage your stuff like this! 因此,您可以像这样管理您的东西!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM