Guest User

Untitled

a guest
Jun 21st, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"foo.png"]];
  2. cell.accessoryView = imageView;
  3. [imageView release];
  4.  
  5. static NSString *CellIdentifier = @"Cell";
  6. UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  7. if (cell == nil) {
  8. cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
  9.  
  10.  
  11.  
  12.  
  13. }
  14.  
  15. if(indexPath.row == 0)
  16. {
  17. cell.image = [UIImage imageNamed:@"image.png"];
  18. }
  19.  
  20. else if (indexPath.row == 1)
  21. {
  22. cell.image = [UIImage imageNamed:@"image1.png"];
  23. }
Add Comment
Please, Sign In to add comment