iPhone: Set backgroud on a UITableView


/ Published in: Java
Save to your folder(s)



Copy this code and paste it in your HTML
  1. UIImageView* background = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"listBackground.png"] ] autorelease];
  2. background.contentMode = UIViewContentModeCenter; // don't stretch
  3.  
  4. // Only on 3.2 onwards..
  5. if ([self.tableView respondsToSelector:@selector(setBackgroundView:)] ) {
  6. self.tableView.backgroundView = background;
  7. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.