collectionview scrollToItemAtIndexPath不使用分页

时间:2016-04-14 08:25:43

标签: ios objective-c xcode uicollectionview

//Scroll to top
NSIndexPath *index=[NSIndexPath indexPathForRow:0 inSection:0];
[self.collectionview scrollToItemAtIndexPath:index atScrollPosition:UICollectionViewScrollPositionBottom animated:YES];

我尝试了这段代码,但它无效

[self.collectionview setContentOffset:CGPointMake(0,250) animated:YES];

使用此代码也只有相同的结果

0 个答案:

没有答案
相关问题