Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"foo.png"]];
- cell.accessoryView = imageView;
- [imageView release];
- static NSString *CellIdentifier = @"Cell";
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
- }
- if(indexPath.row == 0)
- {
- cell.image = [UIImage imageNamed:@"image.png"];
- }
- else if (indexPath.row == 1)
- {
- cell.image = [UIImage imageNamed:@"image1.png"];
- }
Add Comment
Please, Sign In to add comment