ScrollView#scrollTo()

scrollTo(y: number | { x?: number, y?: number, animated?: boolean }, x: number, animated: boolean)

Scrolls to a given x, y offset, either immediately or with a smooth animation.

Syntax:

scrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true})

Note: The weird argument signature is due to the fact that, for historical reasons, the function also accepts separate arguments as as alternative to the options object. This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.

doc_React_Native
2016-06-23 04:25:13
Comments
Leave a Comment

Please login to continue.