Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-224] Add "scrollToIndex" on table views

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2011-04-15T02:25:42.000+0000
Affected Version/sn/a
Fix Version/sBacklog
ComponentsiOS
Labelsfeature, iphone
ReporterNolan Wright
AssigneeBlain Hamon
Created2011-04-15T02:25:40.000+0000
Updated2017-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.

Comments

  1. Blain Hamon 2011-04-15

    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.

  2. Don Thorp 2011-04-15

    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.

  3. Stephen Tramer 2011-04-15

    Function exists for iOS as of 1.6.0 RC1.

  4. Blain Hamon 2011-04-15

    Changes to codebase has made this moot since then.

  5. Lee Morris 2017-03-02

    Closing as invalid.

JSON Source