【发布时间】:2015-10-06 13:14:44
【问题描述】:
我已经从我的项目中完全删除了PSTCollectionView,在某一时刻,我收到以下错误,PSTCollectionViewItemTypeCell 未找到。我知道,我需要用 UICollectionView 提供的东西替换它,但我自己没有找到它。
有没有人经历过这两种情况 (PSTCollectionView/UICollectionView) 那么请给我建议一个替代方案来实现代码的和平。
从 iOS 6.0 及更高版本开始,这是一个罕见的问题 - 人们可以升级到 UICollectionViewsmoothly。但是,我正在运行一个旧项目,需要针对 iOS 9.0 进行完全重组。
请帮忙。
这是有问题的代码:
- (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath
{
UICollectionViewLayoutAttributes *attributes = (UICollectionViewLayoutAttributes *)[super layoutAttributesForItemAtIndexPath:indexPath];
if ([attributes representedElementCategory] == PSTCollectionViewItemTypeCell) {
//some good code.
}
return attributes;
}
【问题讨论】:
标签: ios objective-c uicollectionview pstcollectionview