Home > OS >  Distance between IOS section and section
Distance between IOS section and section

Time:06-27

static cell style:grouped enter image description here

enter image description here

There is always a gap between the group and the navigation bar(I use red mark in the picture)

None of the following methods work: enter image description here enter code here

Is there any way to cancel the spacing between the group and the navigation bar, and set the direct spacing between the group and the group to 0 ?

CodePudding user response:

I have found a solution to the direct distance between the group and the navigation bar, like this:

self.tableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, CGFLOAT_MIN)];

According to the help of netizens, I understand that I only need to set the height of the header and footer to 0.1 instead of 0

  • Related