//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];
使用此代码也只有相同的结果