ios注意事项

    xiaoxiao2021-03-25  93

    1.tableview顶部留白问题

    当cell的类型是plaint类型时,直接设置self.automaticallyAdjustsScrollViewInsets=NO;应该就可以的

    当cell的类型是group类型时,此时要去掉tableView顶部的空白需要两步: 1.设置tableView的tableHeaderView高度为0.5; self.MenuTable.tableHeaderView=[[UIview alloc] initWithFrame:(CGRectMake(0,20,82,0.5))]; 2.设置heightForHeaderInSection的高度为0.5 -(CGFloat)tableView:(UItableView *)tableView heightForHeaderInSection(NSInteger)section{ return 0.5;

    }

    2.navigation坐标问题

    self.navigationController.navigationBar.translucent = NO;

    转载请注明原文地址: https://ju.6miu.com/read-14878.html

    最新回复(0)