在滚动表格视图时,我遇到了每个集合的标题的问题,我做到了 NSString * CellIdentifier = [NSString stringWithFormat:@"CellId%d%d",indexPath.row,indexPath.section];TableViewCell * cell =(TableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];如果(!单元格){单元格= [[TableViewCell分配] initWithStyle:UITableViewCellStyleDefault重用Identifier:CellIdentifier];} 我为每个单元分配了唯一标识符,有什么建议可以帮助您吗?:)解决方案在 cellForRoAtIndexPath 方法中添加此代码 用于([单元格子视图]中的UIView * v)[v removeFromSuperview]; 告诉我是否可行:)I am developing an iPhone app that consists of UICollectionViews on UITableViewTo make each Collection scrolls horizontally . All steps are work perfectly except when I start to scroll each UICollectionView the UICollectionViewCell method is reuse andI am getting a problem with the label , the problem in the image belowI faced this issue with the title of each collection on scrolling the table view and I did this 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];}I assigned unique identifier to each cell , there is any suggestions that can help ? :) 解决方案 Add this code in cellForRoAtIndexPath methodsfor (UIView *v in [cell subviews]) [v removeFromSuperview];Tell me if its working or not :) 这篇关于UICollectionView滚动问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!