how to add one or more images in UITableViewCell?
I need to display one or more different images from array in one cell of UITableView like grid view wi开发者_JS百科thout using any API for example three20 etc . Please give solution for my question.
This will put an image at the beginning of the cell:
[cell.imageView setImage:[UIImage imageNamed:@"whatever.png"]];
This image you can place anywhere on the cell by altering the frame:
UIImage *accessoryImage = [UIImage imageNamed:@"whatever.png"];
UIImageView *accImageView = [[UIImageView alloc] initWithImage:accessoryImage];
accImageView.userInteractionEnabled = YES;
[accImageView setFrame:CGRectMake(self.tableView.frame.size.width-70, 5, 28.0, 28.0)];
[cell.contentView addSubview:accImageView];
精彩评论