{ "id": "161896", "key": "TIMOB-23666", "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": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-02-02T21:55:50.000+0000", "created": "2016-07-20T23:54:32.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "imageview", "ios", "qe-6.0.0", "remoteurl" ], "versions": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "issuelinks": [], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-02-03T17:56:01.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": "Setting the backgroundImage property with a remote image doesn't appear to be working.\r\n\r\n*Demo Code:*\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\n \r\nvar url = Ti.UI.createButton({\r\n title: \"URL Image\",\r\n\ttop: 100,\r\n height: 100,\r\n\tbackgroundImage: \"http://www.devnetwork.com/wp-content/uploads/2015/07/Appcelerator-logo.png\",\r\n});\r\n \r\nvar local = Ti.UI.createButton({\r\n\ttitle: \"Local Image\",\r\n bottom: 100,\r\n height: 100,\r\n\tbackgroundImage: \"images/appcelerator_small.png\",\r\n});\r\n\r\nsetTimeout(function() {\r\n url.setBackgroundImage(\"https://upload.wikimedia.org/wikipedia/commons/a/ab/Logo_TV_2015.png\");\r\n local.setBackgroundImage(\"images/atlanta.jpg\");\r\n},2000); \r\n\r\nwin.add(local)\r\nwin.add(url);\r\nwin.open();\r\n{code}\r\n\r\n*Test Case:*\r\nRun the app and take a picture. \r\n*Expected Result:*\r\nThe two buttons should all have a backgroundImage one containing a local image, another containing an image from a URL.\r\n*Actual Results*\r\nPassing in a url or local path doesn't work with setBackgroundImage. ", "attachment": [], "flagged": false, "summary": "iOS: Button setting remote backgroundImage doesn't appear to work", "creator": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 682, "state": "closed", "name": "2016 Sprint 15 SDK", "startDate": "2016-07-16T00:19:20.819Z", "endDate": "2016-07-30T00:19:00.000Z", "completeDate": "2016-08-01T04:40:11.421Z", "originBoardId": 114 }, { "id": 796, "state": "closed", "name": "2017 Sprint 02 SDK", "startDate": "2017-01-15T00:00:41.845Z", "endDate": "2017-01-29T00:00:00.000Z", "completeDate": "2017-01-30T21:10:44.640Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "391146", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR:https://github.com/appcelerator/titanium_mobile/pull/8149", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-07-20T23:58:57.000+0000", "updated": "2016-07-20T23:58:57.000+0000" }, { "id": "397038", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, using a remote resource to set {{backgroundImage}} & {{setBackgroundImage}} for a Button element now works correctly.\r\n\r\nTested On:\r\niPhone 6 Plus 10.0.1 Device & Simulator\r\niPhone 5S 9.3.5 Device\r\nMac OSX El Capitan 10.11.6\r\nTi SDK: 6.0.0.v20160922165510\r\nAppc Studio: 4.8.0.201609101003\r\nAppc NPM: 4.2.8-6\t\r\nApp CLI: 6.0.0-51\r\nXcode 8.0 \r\nNode v4.4.7\r\n\r\n*Closing ticket.*", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-09-23T12:56:32.000+0000", "updated": "2016-09-23T12:56:32.000+0000" }, { "id": "402256", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Reopening this original issue, since this caused multiple other issues in 6.0.x.\r\n\r\nPR (master): https://github.com/appcelerator/titanium_mobile/pull/8644\r\nPR (6_0_X): https://github.com/appcelerator/titanium_mobile/pull/8645", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-30T10:33:27.000+0000", "updated": "2016-11-30T10:33:27.000+0000" }, { "id": "403410", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master) : https://github.com/appcelerator/titanium_mobile/pull/8691\r\n\r\nThis change will affect background image setting for TIUIiOSToolbar, TIUISearchbar, TIUITabGroup, TiUITextField and TIUIiOSStepper and TIUIButton's all state(selected , highlighted etc).\r\nIf images are not cached, it will download image from remote .\r\n\r\n{code:java}\r\nvar win = Ti.UI.createWindow();\r\nvar container = Ti.UI.createView({\r\n\tbackgroundColor: 'white',\r\n\ttop:100,\r\n\tlayout:'vertical',\r\n\twidth:450\r\n});\r\n \r\nvar button = Ti.UI.createButton({\r\n\ttop:0,\r\n\tbackgroundTopCap:10,\r\n\tbackgroundLeftCap:10,\r\n\twidth:450,\r\n\theight:100,\r\n\tbackgroundImage:'images/button_background.png',\r\n});\r\n\r\nvar send = Titanium.UI.createButton({\r\n title: 'Send',\r\n width: 225,\r\n style: Titanium.UI.iOS.SystemButtonStyle.DONE,\r\n});\r\n\r\nvar camera = Titanium.UI.createButton({\r\n\twidth: 225,\r\n systemButton: Titanium.UI.iOS.SystemButton.CAMERA,\r\n});\r\nvar toolBar = Ti.UI.iOS.createToolbar({\r\n\titems:[send,camera],\r\n top:50,\r\n\tbackgroundTopCap:10,\r\n\tbackgroundLeftCap:10,\r\n\twidth:450,\r\n\theight:100,\r\n\tbackgroundImage:'images/button_background.png',\r\n});\r\n \r\nvar view = Ti.UI.createView({\r\n\ttop:50,\r\n\tbackgroundImage:'images/button_background.png',\r\n\tbackgroundTopCap:10,\r\n\tbackgroundLeftCap:10,\r\n\twidth:450,\r\n\theight:100\r\n});\r\n \r\n setTimeout(function() {\r\n \t toolBar.setBackgroundImage(\"http://www.devnetwork.com/wp-content/uploads/2015/07/Appcelerator-logo.png\");\r\n //view.setBackgroundImage(\"http://www.devnetwork.com/wp-content/uploads/2015/07/Appcelerator-logo.png\");\r\n button.setBackgroundImage(\"https://upload.wikimedia.org/wikipedia/commons/a/ab/Logo_TV_2015.png\");\r\n},5000);\r\n\r\ncontainer.add(button);\r\ncontainer.add(view);\r\ncontainer.add(toolBar);\r\nwin.add(container);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-15T07:19:05.000+0000", "updated": "2016-12-15T07:19:58.000+0000" }, { "id": "406285", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Can verify that Toolbar background, View background and Button background all changed after to 5 seconds to remote images. This was tested with;\r\niPhone 7 and Simulator (10.2)\r\nMacOS 10.11.6 (15G31)\r\nStudio 4.8.1.201612050850\r\nTi SDK 6.1.0.v20170202120400\r\nAppc NPM 4.2.8\r\nAppc CLI 6.2.0-12\r\nTi CLI 5.0.11\r\nAlloy 1.9.6\r\nArrow 1.10.2\r\nXcode 8.2 (8C38)\r\nNode v4.6.0\r\nJava 1.7.0_80", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-02-03T17:55:58.000+0000", "updated": "2017-02-03T17:55:58.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }