[AC-5380] scrollTo for scrollView doesn't work
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Invalid |
Resolution Date | 2017-11-16T18:02:46.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | David Illichmann |
Assignee | Shak Hossain |
Created | 2017-11-16T16:10:51.000+0000 |
Updated | 2017-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
File | Date | Size |
---|---|---|
diagnostic log.txt | 2017-11-16T16:08:07.000+0000 | 199546 |
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.