{ "id": "149210", "key": "AC-1578", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2015-08-12T06:59:45.000+0000", "created": "2015-06-29T02:44:41.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ahossain", "key": "ahossain", "displayName": "Amimul Hossain", "active": false, "timeZone": "Asia/Dhaka" }, "updated": "2016-03-08T07:38:02.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": [], "description": "I want to toggle two different style of Button in between {{normal}} status or {{selected}} status with {{color}}, {{borderColor}} and {{backgroundColor}}, but I got a problem in switching {{borderColor}} on iOS, please check it out:\r\n\r\nTSS:\r\n{code}\r\n\".normal\": {\r\n color: '#FFFFFF',\r\n borderColor: '#8BD8D2',\r\n backgroundColor: '#000000'\r\n}\r\n\r\n\".selected\": {\r\n color: '#37A9AA',\r\n borderColor: '#FFFFFF',\r\n backgroundColor: '#FFFFFF'\r\n}\r\n\r\n{code}\r\n\r\nJS:\r\n{code}\r\nif (selected) {\r\n $.resetClass(view, 'normal');\r\n} else {\r\n $.resetClass(view, 'selected');\r\n}\r\n{code}\r\n\r\nOn iOS, changing the {{color}} and {{backgroundColor}} works fine but {{borderColor}} seems disappear.\r\nOn Android, everything works fine.", "attachment": [], "flagged": false, "summary": "iOS: Button border will not toggled", "creator": { "name": "ethancfchen", "key": "ethancfchen", "displayName": "Ethan Chen", "active": true, "timeZone": "Asia/Taipei" }, "subtasks": [], "reporter": { "name": "ethancfchen", "key": "ethancfchen", "displayName": "Ethan Chen", "active": true, "timeZone": "Asia/Taipei" }, "environment": "Titanium: 4.0.1, \r\nAlloy: 1.6.0, \r\nTitanium SDK: 4.0.0.GA, \r\nPlatform: iPhone 5 (v8.3) Simulator, Genymotion Android 5.1.0 Emulator", "comment": { "comments": [ { "id": "356374", "author": { "name": "ahossain", "key": "ahossain", "displayName": "Amimul Hossain", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~ethancfchen], The code you provided above has errors. For both \"backgroundColor\" and \"borderColor\" the value is same. So the color will be same in selected condition. Change the \"borderColor\" value to a different one in selected condition. \r\n\r\nh5. SAMPLE \r\n{code}\r\nvar self = Ti.UI.createWindow();\r\n\r\nvar button = Titanium.UI.createButton({\r\n\ttitle : 'Hello',\r\n\ttop : 100,\r\n\twidth : 400,\r\n\theight : 200,\r\n\tborderRadius: 40,\r\n\tborderWidth : 10,\r\n\tcolor : '#34847D',\r\n\tborderColor : '#8D5F4B',\r\n\tbackgroundColor : '#818D4B'\r\n});\r\n\r\nbutton.addEventListener('click', function(e) {\r\n\tbutton.color= '#000000';\r\n button.borderColor = '#D74E13';\r\n button.backgroundColor= '#FFFFFF';\r\n\r\n});\r\nself.add(button);\r\nself.open();\r\n{code}\r\n\r\nThanks.", "updateAuthor": { "name": "ahossain", "key": "ahossain", "displayName": "Amimul Hossain", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2015-06-30T07:54:28.000+0000", "updated": "2015-06-30T07:54:28.000+0000" }, { "id": "356384", "author": { "name": "ethancfchen", "key": "ethancfchen", "displayName": "Ethan Chen", "active": true, "timeZone": "Asia/Taipei" }, "body": "I think it's not the problem, and I found it.\r\nIf I set {{borderWidth}} to {{'2dp'}}, the border will display on both styles.", "updateAuthor": { "name": "ethancfchen", "key": "ethancfchen", "displayName": "Ethan Chen", "active": true, "timeZone": "Asia/Taipei" }, "created": "2015-06-30T08:40:40.000+0000", "updated": "2015-06-30T08:40:40.000+0000" }, { "id": "356731", "author": { "name": "ethancfchen", "key": "ethancfchen", "displayName": "Ethan Chen", "active": true, "timeZone": "Asia/Taipei" }, "body": "Any update here?", "updateAuthor": { "name": "ethancfchen", "key": "ethancfchen", "displayName": "Ethan Chen", "active": true, "timeZone": "Asia/Taipei" }, "created": "2015-07-02T14:09:54.000+0000", "updated": "2015-07-02T14:09:54.000+0000" }, { "id": "357510", "author": { "name": "ahossain", "key": "ahossain", "displayName": "Amimul Hossain", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, [~ethancfchen], Did you followed my instruction? I have checked with \"borderWidth\" to '2dp', It's the same result. If you are still facing the problem please follow my previous response. Provide \"backgroundColor\" and \"borderColor\" different value in selected condition. Also provide screenshots of the problem you view. Thanks.", "updateAuthor": { "name": "ahossain", "key": "ahossain", "displayName": "Amimul Hossain", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2015-07-11T05:41:04.000+0000", "updated": "2015-07-11T05:41:04.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }