{ "id": "62852", "key": "TIMOB-2220", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2012-07-13T09:53:19.000+0000", "created": "2011-04-15T03:13:52.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api" ], "versions": [], "issuelinks": [], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T22:45:34.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

I have an iPhone app that uses a ScrollableView with usually 3\r\nImageView's as its views. In 1.4.1.1 it works great. But, in at\r\nleast the two 1.5.0 builds I've tried, the scrollability just\r\ndoesn't work. The view appears to be there, as I see the paging\r\ncontrol at the bottom, but I can't scroll amongst my views. I've\r\ntried adding the views in a variety of ways (create views first,\r\nadd as array when creating ScrollableView, add after creation, with\r\nscrollable.addView, with scrollable.setViews, etc.). The\r\nKitchenSink's ScrollableView doesn't seem to suffer from this.

\r\n

I figured since this works in 1.4.1.1, but not in 1.5 that's a\r\nchange, and thus potentially a bug. Below is how I'm creating the\r\nScrollableView. One additional note is that I now have to\r\nexplicitly set the top and height values on the ImageViews,\r\notherwise it seems to center them in the scrollview (and thus they\r\noverlap the paging control a bit):

\r\n
\r\n    win = Ti.UI.createWindow({\r\n      backgroundColor: '#000',\r\n      barColor: '#000',\r\n      translucent: true,\r\n      tabBarHidden: true,\r\n      backButtonTitle: 'Back',\r\n      title: hotel.name\r\n    });\r\n    scrollView = Ti.UI.createScrollableView({\r\n      views: photos.map(function(photo) {\r\n        return Ti.UI.createImageView({\r\n          image: photo,\r\n          backgroundColor: '#000',\r\n          top: 0,\r\n          height: 460\r\n        });\r\n      }),\r\n      backgroundColor: '#000',\r\n      showPagingControl: true,\r\n      pagingControlHeight: 20,\r\n      bottom: 0,\r\n      height: 480\r\n    });\r\n\r\n    win.add(this.scrollView);\r\n
{html}", "attachment": [], "flagged": false, "summary": "iOS: ScrollableView doesn't work on first display (change from 1.4.1.1 to 1.5)", "creator": { "name": "chris1", "key": "chris1", "displayName": "chris", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "chris1", "key": "chris1", "displayName": "chris", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "127857", "author": { "name": "chris1", "key": "chris1", "displayName": "chris", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Note, as you may have guessed, the above code is extracted out\nof mine, as is part of a class, etc. So, the last line should\nreally be \"win.add(scrollview)\" to be a bit more accurate.

{html}", "updateAuthor": { "name": "chris1", "key": "chris1", "displayName": "chris", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:13:53.000+0000", "updated": "2011-04-15T03:13:53.000+0000" }, { "id": "127858", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Actually, this now causes a crash.

\n
\nwin = Ti.UI.createWindow({\n      backgroundColor: '#000',\n      barColor: '#000',\n      translucent: true,\n      tabBarHidden: true,\n      backButtonTitle: 'Back',\n      title:\"fuuuuu\"\n    });\n    var views = [];\n    for (var i=0; i< 10; i++) {\n        views[i] = Ti.UI.createImageView({\n          image: 'images/flower.jpg',\n          backgroundColor: '#000',\n          top: 0,\n          height: 460\n        });\n    }\n    scrollView = Ti.UI.createScrollableView({\n      views:views,\n      backgroundColor: '#000',\n      showPagingControl: true,\n      pagingControlHeight: 20,\n      bottom: 0,\n      height: 480\n    });\n\n    win.add(scrollView);\n    win.open();\n
{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:13:53.000+0000", "updated": "2011-04-15T03:13:53.000+0000" }, { "id": "127859", "author": { "name": "tamasdaniel", "key": "tamasdaniel", "displayName": "Tamas Daniel", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I can confirm the issue appears when you try to use views in\nconstructor even for 1.7.0

\n

An workaround is to add the views after you build the\nscrollableView.

{html}", "updateAuthor": { "name": "tamasdaniel", "key": "tamasdaniel", "displayName": "Tamas Daniel", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:13:54.000+0000", "updated": "2011-04-15T03:13:54.000+0000" }, { "id": "203135", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The issues to seems not exist in the latest master\r\n\r\nTried reproducing the issue on iPhone Sim 4.3 , 5.0 and 5.1 and on Device iPhone 3GS running 5.1\r\n\r\nTesting Environment \r\n\r\nMac OSX 10.7.3 \r\nXcode 4.3 \r\nSim 4.3, 5.0, 5.1\r\nDevice iPhone 3GS (5.1)\r\nSDK Build: 2.2.0, githash ac2ec17(master on July 13, 2012)\r\n\r\nMarking ticket as cannot reproduce.", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-13T09:53:09.000+0000", "updated": "2012-07-13T09:53:09.000+0000" }, { "id": "410827", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T22:45:34.000+0000", "updated": "2017-03-09T22:45:34.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }