Skip to content

Instantly share code, notes, and snippets.

@netshade
Forked from ronnieV3/tableviewfooter
Created September 10, 2010 22:08
Show Gist options
  • Save netshade/574455 to your computer and use it in GitHub Desktop.
Save netshade/574455 to your computer and use it in GitHub Desktop.
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
return 40;
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
UIView * fv = [[[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, 0.0, 0.0)] autorelease];
[fv setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight];
[fv setContentMode:UIViewContentModeTopLeft];
[UIImageView *footer = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"footer_gradient.png"]] autorelease];
[fv addSubview:footer];
fv.frame = CGRectMake(0, 0, 320, 40);
//return the view for the footer
return fv;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment