【发布时间】:2013-09-25 17:08:20
【问题描述】:
我正在将此代码用于我的 UIcollectionView,它在 iOS6 中工作正常,但在 ios7 中它不工作,因为一旦我开始滚动 CollectionView,整个元素的方向就搞砸了。 对此有任何想法
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
{
return 1;
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return self.filteredNewsItems.count;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
NewsItemCell *cell = (NewsItemCell *)[collectionView dequeueReusableCellWithReuseIdentifier:reuseIdentifier forIndexPath:indexPath];
cell.autoresizingMask = UIViewAutoresizingNone;
[cell loadWithArticle:self.filteredNewsItems[indexPath.item]];
return cell;
}
【问题讨论】:
-
你能提供截图吗?
-
添加了快照。
-
这也只发生在 scroll 之后,否则它看起来很好并且有方向性。
标签: ios objective-c ios7 uicollectionview