Skip to content

Instantly share code, notes, and snippets.

@zld
Created June 17, 2015 04:22
Show Gist options
  • Save zld/d2579141a0e21ed0e223 to your computer and use it in GitHub Desktop.
Save zld/d2579141a0e21ed0e223 to your computer and use it in GitHub Desktop.
Change space between sections in tableView
-(CGFloat)tableView:(UITableView*)tableView heightForHeaderInSection:(NSInteger)section
{
if(section == 0)
return 6;
return 1.0;
}
-(CGFloat)tableView:(UITableView*)tableView heightForFooterInSection:(NSInteger)section
{
return 5.0;
}
-(UIView*)tableView:(UITableView*)tableView viewForHeaderInSection:(NSInteger)section
{
return [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)];
}
-(UIView*)tableView:(UITableView*)tableView viewForFooterInSection:(NSInteger)section
{
return [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment