{ "id": "89405", "key": "TIMOB-8499", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13406", "description": "Sprint 2012-10 API", "name": "Sprint 2012-10 API", "archived": true, "released": true, "releaseDate": "2012-05-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-05-10T13:47:38.000+0000", "created": "2012-04-03T09:23:30.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "module_scrollview", "parity", "qe-testadded" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "issuelinks": [ { "id": "21846", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "102991", "key": "TIMOB-11331", "fields": { "summary": "Android: ScrollView - \"ScrollToBottom\" method doesn't work on Android", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-11-19T06:15:28.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": "h1. New Feature / Parity Issue\r\nAndroid has a \"scrollToBottom()\" method that iOS does not have. It's a common interaction, so I think it's a good idea to add it to iOS as well.\r\n\r\nOpened an APIDoc ticket for this as well: [TIDOC-538]\r\n\r\nh2. What It Does\r\n\r\nScrolls to the bottom. For horizontal scroll views, this means the rightmost point of the scroll view.\r\n\r\nh2. Signature\r\n{code}\r\nvar scroll = Ti.UI.createScrollView();\r\n/* no ret val */ scroll.scrollToBottom();\r\n{code}\r\n\r\nh2. Example\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\nvar scroll = Ti.UI.createScrollView({\r\n contentHeight: '2000',\r\n scrollType: 'vertical'\r\n});\r\nscroll.add(Ti.UI.createLabel({\r\n text: 'Welcome to the top! Touch anywhere to scroll to bottom.', textAlign: 'center',\r\n color: '#000',\r\n width: Ti.UI.SIZE, height: Ti.UI.SIZE,\r\n top: 0\r\n}));\r\nscroll.add(Ti.UI.createLabel({\r\n text: 'Welcome to the bottom!', textAlign: 'center',\r\n color: '#000',\r\n width: Ti.UI.SIZE, height: Ti.UI.SIZE,\r\n bottom: 0\r\n}));\r\nscroll.addEventListener('click', function (evt) {\r\n if (!scroll.scrollToBottom) {\r\n alert('Whoops! scrollToBottom() does not exist on this platform.');\r\n }\r\n else {\r\n scroll.scrollToBottom();\r\n }\r\n});\r\nwin.add(scroll);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: ScrollView scrollToBottom exists on Android", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "194042", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Updated Test case to include more type of scrollviews and scrollToBottom behavior.\r\n\r\n{code:javascript|title:app.js}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\n\r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'vertical',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab1 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\r\n title:'vertical',\r\n window:win1\r\n});\r\n\r\n\r\n\r\n//\r\n// create controls tab and root window\r\n//\r\nvar win2 = Titanium.UI.createWindow({ \r\n title:'horziontal',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab2 = Titanium.UI.createTab({ \r\n icon:'KS_nav_ui.png',\r\n title:'horziontal',\r\n window:win2\r\n});\r\n\r\n//\r\n// create controls tab and root window\r\n//\r\nvar win3 = Titanium.UI.createWindow({ \r\n title:'combined',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab3 = Titanium.UI.createTab({ \r\n icon:'KS_nav_ui.png',\r\n title:'combined',\r\n window:win3\r\n});\r\n\r\n\r\n//\r\n// add tabs\r\n//\r\ntabGroup.addTab(tab1); \r\ntabGroup.addTab(tab2); \r\ntabGroup.addTab(tab3);\r\n\r\n// create horizontal scrollview case\r\nvar scroll1 = Ti.UI.createScrollView({\r\n contentHeight: '1000',\r\n //scrollType: 'vertical' Not available in iOS\r\n});\r\nscroll1.add(Ti.UI.createLabel({\r\n text: 'top!.', textAlign: 'center',\r\n color: '#000',\r\n width: Ti.UI.SIZE, height: Ti.UI.SIZE,\r\n top: 0\r\n}));\r\nscroll1.add(Ti.UI.createLabel({\r\n text: 'bottom!', textAlign: 'center',\r\n color: '#000',\r\n width: Ti.UI.SIZE, height: Ti.UI.SIZE,\r\n bottom: 0,\r\n \r\n}));\r\nscroll1.addEventListener('click', function (evt) {\r\n if (!scroll1.scrollToBottom) {\r\n alert('Whoops! scrollToBottom() does not exist on this platform.');\r\n }\r\n else {\r\n scroll1.scrollToBottom();\r\n }\r\n});\r\nwin1.add(scroll1);\r\n\r\n//create the vertical scrollview\r\nvar scroll2 = Ti.UI.createScrollView({\r\n contentWidth: '2000',\r\n //scrollType: 'vertical'\r\n});\r\nscroll2.add(Ti.UI.createLabel({\r\n text: 'Left!.', textAlign: 'center',\r\n color: '#000',\r\n width: Ti.UI.SIZE, height: Ti.UI.SIZE,\r\n left: 0\r\n}));\r\nscroll2.add(Ti.UI.createLabel({\r\n text: 'right!', textAlign: 'center',\r\n color: '#000',\r\n width: Ti.UI.SIZE, height: Ti.UI.SIZE,\r\n right: 0 \r\n}));\r\nscroll2.addEventListener('click', function (evt) {\r\n if (!scroll2.scrollToBottom) {\r\n alert('Whoops! scrollToBottom() does not exist on this platform.');\r\n }\r\n else {\r\n scroll2.scrollToBottom();\r\n }\r\n});\r\nwin2.add(scroll2);\r\n\r\n// combined case\r\n\r\nvar scroll3 = Ti.UI.createScrollView({\r\n contentWidth: '2000',\r\n contentHeight: '2000'\r\n //scrollType: 'vertical'\r\n});\r\nscroll3.add(Ti.UI.createLabel({\r\n text: 'Left!.', textAlign: 'center',\r\n color: '#000',\r\n width: Ti.UI.SIZE, height: Ti.UI.SIZE,\r\n left: 0\r\n}));\r\nscroll3.add(Ti.UI.createLabel({\r\n text: 'Top!.', textAlign: 'center',\r\n color: '#000',\r\n width: Ti.UI.SIZE, height: Ti.UI.SIZE,\r\n top: 0\r\n}));\r\nscroll3.add(Ti.UI.createLabel({\r\n text: 'right!', textAlign: 'center',\r\n color: '#000',\r\n width: Ti.UI.SIZE, height: Ti.UI.SIZE,\r\n right: 0,\r\n center:0\r\n}));\r\nscroll3.add(Ti.UI.createLabel({\r\n text: 'bottom!', textAlign: 'center',\r\n color: '#000',\r\n width: Ti.UI.SIZE, height: Ti.UI.SIZE,\r\n bottom: 0,\r\n \r\n}));\r\nscroll3.add(Ti.UI.createLabel({\r\n text: 'Bottom Right!', textAlign: 'center',\r\n color: '#000',\r\n width: Ti.UI.SIZE, height: Ti.UI.SIZE,\r\n bottom: 0,\r\n right:0\r\n \r\n}));\r\nscroll3.addEventListener('click', function (evt) {\r\n if (!scroll3.scrollToBottom) {\r\n alert('Whoops! scrollToBottom() does not exist on this platform.');\r\n }\r\n else {\r\n scroll3.scrollToBottom();\r\n }\r\n});\r\nwin3.add(scroll3);\r\n\r\n\r\n// open tab group\r\ntabGroup.open();\r\n{code}", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-07T17:10:30.000+0000", "updated": "2012-05-07T17:10:30.000+0000" }, { "id": "194044", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[Pull pending|https://github.com/appcelerator/titanium_mobile/pull/2145]", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-07T17:14:18.000+0000", "updated": "2012-05-07T17:14:18.000+0000" }, { "id": "194428", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull merged.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-10T13:47:38.000+0000", "updated": "2012-05-10T13:47:38.000+0000" }, { "id": "198279", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing issue\r\n\r\nTested with Ti Studio build 2.1.0.201206111802\r\nTi Mobile SDK 2.1.0.v20120612102301 hash refeef019\r\nOSX Lion 10.7.3\r\niPhone 4S OS 5.1\r\n\r\nPressing the scroll view scrolls the view to the bottom", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-12T17:23:02.000+0000", "updated": "2012-06-12T17:23:02.000+0000" }, { "id": "280131", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "anvil test case added\nPR Link:\nhttps://github.com/appcelerator/titanium_mobile/pull/4958", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-19T06:15:28.000+0000", "updated": "2013-11-19T06:15:28.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }