我需要在tableViewCell中实现UICollections。如果我的自定义类的数组包含一些图像(如果没有 - 我使用简单单元格),我想使用Collection代替我的ImageView。
那么,我如何在我的单元格中添加收藏演示文稿?
if (!([oneNews.images count] > 0))
{
cell.cellTextLabel.text = oneNews.text;
cell.cellTextLabel.numberOfLines = 0;
if ([oneNews.image length] > 0)
{
NSData *imageData = [NSData dataWithContentsOfFile:[NSHomeDirectory() stringByAppendingPathComponent:oneNews.image]];
UIImage *image = [UIImage imageWithData:imageData];
cell.cellImageView.image = image;
}
cell.cellLikeLabel.text = [NSString stringWithFormat:@"%@", oneNews.likesCount];
cell.cellRepostLabel.text = [NSString stringWithFormat:@"%@", oneNews.repostsCount];
cell.cellCommentsLabel.text = [NSString stringWithFormat:@"%@", oneNews.commentsCount];
cell.cellDateLabel.text = [NSString stringWithFormat:@"%@", oneNews.pubDate];
} else {
//collection
}