Add scrollToItem: Method to Node, Handle Section Index Paths (#2462)

* Add scrollToItem: method to node, handle section index paths

* Update ASPagerNode.mm to use the node version

* Add some docs
This commit is contained in:
Adlai Holler
2016-10-26 12:48:25 -07:00
committed by GitHub
parent d4af95c9f1
commit 627d146a5a
11 changed files with 122 additions and 49 deletions

View File

@@ -136,6 +136,17 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType;
/**
* Scrolls the collection to the given item.
*
* @param indexPath The index path of the item.
* @param scrollPosition Where the item should end up after the scroll.
* @param animated Whether the scroll should be animated or not.
*
* This method must be called on the main thread.
*/
- (void)scrollToItemAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UICollectionViewScrollPosition)scrollPosition animated:(BOOL)animated;
#pragma mark - Editing
/**