UICollectionView是网格表视图,比如抖音的喜欢列表
自定义一个UICollectionViewCell,
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
//设置CollectionViewCell中的图像框
self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.frame), CGRectGetWidth(self.frame))];
[self addSubview:self.imageView];
//文本框
self.label = [[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetMaxX(self.imageView.frame) + 10, CGRectGetWidth(self.frame), 15)];
self.label.font = [UIFont systemFontOfSize:13];
self.label.textC