我使用此代码为我的UIcollectionView,其工作正常在iOS6但与ios7和它不工作,因为一旦我开始滚动CollectionView整个元素方向搞砸了。 任何想法,这UICollection查看ios 7问题
- (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;
}
你能提供截图吗? –
你有快照添加。 – Alex
也只有在滚动后才会发生,否则它看起来很好并且定向。 – Alex