Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5380] scrollTo for scrollView doesn't work

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2017-11-16T18:02:46.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
ReporterDavid Illichmann
AssigneeShak Hossain
Created2017-11-16T16:10:51.000+0000
Updated2017-11-16T18:02:46.000+0000

Description

When I try to scroll the scrollView programatically the app crashes.(iOS and Android) Sample:
$.scrollView.scrollTo(0, 400, false);
The iOS crashlog: {noformat} [ERROR] : Script Error { [ERROR] : column = 37; [ERROR] : line = 58; [ERROR] : message = "Invalid type passed to function"; [ERROR] : nativeLocation = "-[TiUIScrollViewProxy scrollTo:] (TiUIScrollViewProxy.m:347)"; [ERROR] : nativeReason = "expected: Object, was: Number"; ... [ERROR] : } {noformat}

Attachments

FileDateSize
diagnostic log.txt2017-11-16T16:08:07.000+0000199546

Comments

  1. Hans Knöchel 2017-11-16

    The third parameter is a dictionary, e.g. "{animated: false}", but you were passing a boolean (represented as an NSNumber in the obj-c bridge). Change the third parameter to the above and it will work.

JSON Source