{ "id": "165025", "key": "TIMOB-24237", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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-01-03T15:39:44.000+0000", "created": "2016-12-15T07:05:42.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "SDK5.5.0", "qe-6.1.0" ], "versions": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-01-03T15:40:00.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": "Hi,\r\n\r\nThere is no way of setting backgroundSelected Color for ios using Appcelerator. And if i tried to do acheive same by using touchStart and touchEnd Listeners, it sowing some weird behavior. On the tap of left side corner of the device, backgroundSelected color is getting reflected little late. Listeners are getting called, but background color is not changing quickly on iPhone 7 Only.\r\n\r\nPlease help\r\nThanks\r\nPankaj Goyal", "attachment": [], "flagged": false, "summary": "iOS: Add backgroundSelectedColor property (Parity)", "creator": { "name": "goyalpankaj054@gmail.com", "key": "goyalpankaj054@gmail.com", "displayName": "Pankaj Goyal", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "goyalpankaj054@gmail.com", "key": "goyalpankaj054@gmail.com", "displayName": "Pankaj Goyal", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "APPC SDK - 5.5.1\r\nIPhone 7 only", "closedSprints": [ { "id": 784, "state": "closed", "name": "2016 Sprint 26 SDK", "startDate": "2016-12-17T01:24:57.928Z", "endDate": "2016-12-31T01:24:00.000Z", "completeDate": "2017-01-03T02:15:01.548Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "403450", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Thanks for the ticket. Can you share with how this is handled in native platform? We will consider your request. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-12-15T19:30:23.000+0000", "updated": "2016-12-15T19:30:23.000+0000" }, { "id": "403560", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Feature request accepted, it sounds like a good idea for parity. What we can do is adding the property to buttons, where we natively can control the current state. Since iOS natively doesn't support the property, we use a hack to generate an image from the color set the {{backgroundSelectedImage}} property internally. The performance is great and there are no UI glitches.\r\n\r\nPR: https://github.com/appcelerator/titanium_mobile/pull/8698\r\n\r\nTest-case:\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: 'Click me',\r\n backgroundColor: 'blue',\r\n backgroundSelectedColor: 'red',\r\n width: 300,\r\n height: 40\r\n});\r\n\r\nwin.add(btn);\r\nwin.open();\r\n{code} ", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-12-17T17:10:14.000+0000", "updated": "2016-12-17T17:10:40.000+0000" }, { "id": "403781", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "CR and FT passed! PR APPROVED!", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-12-22T06:09:46.000+0000", "updated": "2016-12-22T06:09:46.000+0000" }, { "id": "403992", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Discovered a minor issue when testing this improvement: when {{backgroundSelectedColor}} is present, the {{tintColor}} property no longer affects the color of the button's text. \r\n\r\nTested On:\r\niPhone 6 Plus 10.2 Device & Simulator\r\nMac OS Sierra (10.12.2)\r\nTi SDK:6.1.0.v20170101113815\r\nAppc Studio: 4.8.0.201611121409\r\nAppc NPM: 4.2.8\r\nApp CLI: 6.1.0-319\r\nXcode 8.2.1\r\nNode v4.4.7\r\n", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2017-01-03T15:11:44.000+0000", "updated": "2017-01-03T15:11:44.000+0000" }, { "id": "403994", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "No issue here. When setting the {{backgroundColor}}, {{backgroundSelectedColor}} or {{backgroundImage}} property on the button, the {{UIButtonTypeCustom}} button type is used internally. Otherwise, using {{UIButtonTypeSystem}} (default), the button's background would be half-translucent, which is not usable for the developer. This behavior is there since forever (the last change to that line was in 1.7.0 in 2010). I cleaned this up in [this line|https://github.com/appcelerator/titanium_mobile/pull/8698/files#diff-a555421929ad7fca502ddd144627bdaaR193] but it's still the same behavior.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-03T15:36:07.000+0000", "updated": "2017-01-03T15:36:07.000+0000" }, { "id": "403996", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Thanks for clarifying, in that case everything is working as intended, closing ticket. ", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2017-01-03T15:39:30.000+0000", "updated": "2017-01-03T15:39:30.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }