【发布时间】:2013-12-03 05:05:27
【问题描述】:
我希望我的 UICollectionView 自动滚动到底部。我的 viewDidAppear 中有这段代码,但是当我运行它时,在显示视图和集合视图滚动到底部之间总是有半秒的暂停。我阅读了其他问题,但尚未找到答案。有人有想法吗?
- (void)viewDidAppear:(BOOL)animated{
NSInteger numbersOfItems = self.photoAssets.count - 1;
NSLog(@"%i", [self.collectionView numberOfItemsInSection:0]);
[self.collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:numbersOfItems inSection:0] atScrollPosition:UICollectionViewScrollPositionCenteredVertically animated:NO];
}
【问题讨论】:
标签: ios iphone objective-c uicollectionview