基本上我有uiDynamics的uicollection视图,我将文本输入到每个单元格。当我跑步时,一切看起来都很棒!直到我滚动然后文本看起来变形了!
这是我插入文本的方式
UILabel *title = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, cell.bounds.size.width, 20)];
// title.backgroundColor = [UIColor blueColor];
title.tag = 1;
[title setText:@"Title"];
title.font = [UIFont fontWithName:@"Corbert-Regular" size:13];
[cell.contentView addSubview:title];
UILabel *description = [[UILabel alloc]initWithFrame:CGRectMake(0, 20, cell.bounds.size.width-100, 40)];
description.tag = 2;
[description setText:@"description"];
description.font = [UIFont fontWithName:@"Corbert-Regular" size:16];
[cell.contentView addSubview:description];
滚动后: