简体   繁体   English

TableView-标头和节不正确

[英]TableView - Header and section are not correct

在此处输入图片说明

I have some issues with header and section here. 我在这里的标题和部分有一些问题。 My view is below: 我的看法如下:

  • Custom navigation with transparent. 自定义导航具有透明性。

  • TableView frame = screen bounds, contentInset top = 64. TableView框架=屏幕边界,contentInset顶部= 64。

  • TableView with header clear color. 具有标题清晰颜色的TableView。

  • TableView has 1 section view (view has 3 tab). TableView具有1个剖视图(视图具有3个选项卡)。

    When I scroll tableview, section keep under navigation (perfect), but cells are scroll from section to top screen. 当我滚动tableview时,该部分保持导航状态(完美),但是单元格从该部分滚动到顶部屏幕。 I want cells only scroll in section, not to top and under navigation bar. 我希望单元格仅在部分中滚动,而不在导航栏的顶部和下方滚动。

    Can I help me? 我可以帮我吗? Thank you so much. 非常感谢。

This is because the table view clipsToBounds by default is false, which means it will be rendered outside the table view bounds. 这是因为默认情况下,表视图clipsToBounds为false,这意味着它将在表视图范围之外呈现。

A solution: 一个解法:

tableView.clipsToBounds = true

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

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