
- tableView的group样式的section高度由以下两个方法返回的高度决定:
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
而tableView是不会主动调用这两个方法的,唯有实现了- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
才会调用第一个方法。实现- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
才会调用第二个方法.
当需要设置间距为0时,一般设置第一和第二方法的返回值为CGFLOAT_MIN(设置为0可能不起作用)
|
|
转载请注明出处:@lzx1995




近期评论