{ "id": "98413", "key": "AC-3088", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-08-01T13:59:07.000+0000", "created": "2012-07-31T07:28:27.000+0000", "labels": [], "versions": [], "issuelinks": [ { "id": "33907", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "91409", "key": "TIMOB-9007", "fields": { "summary": "iOS: UI.Switch - does not display if value is not set when rendered", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:48:08.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "h2. The problem\r\n\r\nSwitch control in not shown on the screen unless its \"value\" property is not set to some value.\r\n\r\n\r\nh2. Test case\r\n\r\nTo see the issue, run this example:\r\n\r\n{code}\r\n(function() {\r\n      \r\n    var win = Ti.UI.createWindow({\r\n\t\tnavBarHidden: true,\r\n\t\tbackgroundColor: '#000'\r\n\t});\r\n\t\r\n\twin.add(Ti.UI.createSwitch());\r\n\t\r\n\twin.open();\r\n\t\r\n})();\r\n{code}\r\n\r\nSwitch shouldn't be present on the screen.\r\n\r\n\r\nh2. Expected behaviour\r\n\r\n\r\nSwitch should be show on the screen even without a need to set \"value\" property to some value.\r\n\r\n\r\nh2. Workaround\r\n\r\nSet \"value\" property to some initial value: win.add(Ti.UI.createSwitch({ value: false }));", "attachment": [], "flagged": false, "summary": "iOS: Switch is not show on the screen if its \"value\" property is not set", "creator": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "* Titanium SDK version: 2.2.0 (07/30/12 21:21 e382067)\r\n* iOS simulator 5.1\r\n* XCode 4.4\r\n* OSX ML", "comment": { "comments": [ { "id": "211075", "author": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It is a mandatory property for iOS. its also mentioned in the docs.\r\n\r\nhttp://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.UI.Switch", "updateAuthor": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-01T13:58:51.000+0000", "updated": "2012-08-01T13:58:51.000+0000" }, { "id": "211175", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Can it be set to \"false\" by default (because of parity with other platforms)?", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-08-02T00:24:06.000+0000", "updated": "2012-08-02T00:24:06.000+0000" }, { "id": "211231", "author": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-02T11:17:29.000+0000", "updated": "2012-08-02T11:17:29.000+0000" }, { "id": "211355", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "OK, thanks.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-08-03T00:37:47.000+0000", "updated": "2012-08-03T00:37:47.000+0000" }, { "id": "286043", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-12-28T00:56:58.000+0000", "updated": "2013-12-28T00:56:58.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }