Skip to content

Instantly share code, notes, and snippets.

@ronnieV3
Created September 10, 2010 22:05
Show Gist options
  • Save ronnieV3/574452 to your computer and use it in GitHub Desktop.
Save ronnieV3/574452 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 {
if(footerView == nil) {
footerView = [[[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, 0.0, 0.0)] autorelease];
[footerView setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight];
[footerView setContentMode:UIViewContentModeTopLeft];
UIImageView *footer = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"footer_gradient.png"]] autorelease];
[footerView addSubview:footer];
footerView.frame = CGRectMake(0, 0, 320, 40);
}
//return the view for the footer
return footerView;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment