[TIMOB-224] Add "scrollToIndex" on table views
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2011-04-15T02:25:42.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Backlog |
Components | iOS |
Labels | feature, iphone |
Reporter | Nolan Wright |
Assignee | Blain Hamon |
Created | 2011-04-15T02:25:40.000+0000 |
Updated | 2017-03-02T18:13:45.000+0000 |
Description
Add ability to scroll to a particular point in a table view - e.g.,
tableView.scrollToIndex(rowNumber);
where rowNumber is 0-based.
The native API has two other arguments. Animated (boolean) and scroll position (enum). Scroll position is Top, Middle, Bottom, and None, where the first three is the position the row will take onscreen. If the scroll position is chosen to be 'None', the behavior is to scroll only until the row is visible; if the row is already visible, no scrolling is done. None is listed by Apple to be the default.
Proposal: optional second argument, where the default is effectively:
tableView.scrollToIndex(rowNumber,{'animated':false,'position':Ti.UI.ROW_POSITION_NONE}
Question: should animated be default false or default true? Name of row position constants.
Adding.
Titanium.UI.TABLEVIEW_POSITION_TOP
Titanium.UI.TABLEVIEW_POSITION_MIDDLE
Titanium.UI.TABLEVIEW_POSITION_BOTTOM
Titanium.UI.TABLEVIEW_POSITION_ANY
where:
- ANY moves the row to TOP if not visible and above the visible area - ANY moves the row to BOTTOM if not visible and below the visible area - ANY does nothing if the row is already visible.
Function exists for iOS as of 1.6.0 RC1.
Changes to codebase has made this moot since then.
Closing as invalid.