The default height is too high for me. How to change the height between two sections?
==================================================== ============================
Sorry for my poor English ... I mean, the gap between the two sections is too wide. How to change it?
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { CGRect frame = CGRectMake(0, 0, tableView.frame.size.width, 2.0f); UIView *view = [[[UIView alloc] initWithFrame:frame] autorelease]; view.backgroundColor = [UIColor blueColor]; return view; } - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { CGRect frame = CGRectMake(0, 0, tableView.frame.size.width, 2.0f); UIView *view = [[[UIView alloc] initWithFrame:frame] autorelease]; view.backgroundColor = [UIColor redColor]; return view; }
I changed the presentation of the header and footer of each section. And here is the result: 
I think there may be a minimum clearance height because I set the height of the header and footer to 2px, but the gap between the two sections is still so wide.
ios iphone
理想 评论 学派
source share