简体   繁体   中英

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 with header clear color.

  • TableView has 1 section view (view has 3 tab).

    When I scroll tableview, section keep under navigation (perfect), but cells are scroll from section to top screen. 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.

A solution:

tableView.clipsToBounds = true

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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