[self.view layoutIfNeeded];
NSIndexPath *path=[NSIndexPath indexPathForItem:self.index inSection:0];
[_collectionView scrollToItemAtIndexPath:path atScrollPosition:UICollectionViewScrollPositionCenteredHorizontally animated:NO];
注意:一定要加上layoutIfNeeded