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

@@ -104,6 +104,17 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType;
/**
* Scrolls the table to the given row.
*
* @param indexPath The index path of the row.
* @param scrollPosition Where the row 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)scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated;
/**
* Reload everything from scratch, destroying the working range and all cached nodes.
*