我正在开发一个由UICollectionViews
UITableView
组成的iPhone应用
使每个Collection水平滚动。所有步骤都可以正常工作,除非我开始滚动每个UICollectionView
UICollectionViewCell
方法是重用并且
我的标签问题,
我在滚动表视图时遇到了每个集合的标题,我做了这个
NSString *CellIdentifier = [NSString stringWithFormat:@"CellId%d%d",indexPath.row,indexPath.section];
TableViewCell *cell = (TableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if(!cell)
{
cell = [[TableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
我为每个单元格分配了唯一标识符,有什么建议可以帮助吗? :)
答案 0 :(得分:2)
在cellForRoAtIndexPath
方法
for (UIView *v in [cell subviews])
[v removeFromSuperview];
告诉我它是否正常工作:)