mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Add scroll to page helper to ASPagerNode
This commit is contained in:
@@ -49,6 +49,14 @@
|
||||
[self setTuningParameters:renderParams forRangeType:ASLayoutRangeTypeRender];
|
||||
}
|
||||
|
||||
#pragma mark - Helpers
|
||||
|
||||
- (void)scrollToPageAtIndex:(NSInteger)index animated:(BOOL)animated
|
||||
{
|
||||
NSIndexPath *indexPath = [NSIndexPath indexPathForItem:index inSection:0];
|
||||
[self.view scrollToItemAtIndexPath:indexPath atScrollPosition:UICollectionViewScrollPositionLeft animated:animated];
|
||||
}
|
||||
|
||||
#pragma mark - ASCollectionViewDataSource
|
||||
|
||||
- (ASCellNode *)collectionView:(ASCollectionView *)collectionView nodeForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
|
||||
Reference in New Issue
Block a user