{ "id": "141654", "key": "TIMOB-18245", "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": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-02-11T16:22:36.000+0000", "created": "2014-12-16T14:46:47.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "ios", "module_media", "qe-manualtest" ], "versions": [], "issuelinks": [], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-02-17T05:36:48.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": "The method *Ti.Media.takeScreenshot()* does not render the selected iOS TabbedBar element.\r\n\r\nIf an *iOS TabbedBar* is displayed on a device with at least one selected entry visible the text of the selected entry will NOT render when the *takeScreenshot* method is called and the resulting image is displayed or stored in the file system.\r\n\r\nThe problem exists on Ti SDK 3.4.1 and Ti SDK 3.5.0 beta on iOS simulators 7.1 and 8.1 in all of the devices size variations.\r\n\r\n{code:javascript|title=screenshot.js|borderStyle=solid}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'red'\r\n});\r\nvar fileName = 'testme.png';\r\nvar bb1 = Titanium.UI.createTabbedBar({\r\n labels: ['One', 'Two', 'Three'],\r\n backgroundColor: '#336699',\r\n top: 50,\r\n style: Titanium.UI.iPhone.SystemButtonStyle.BAR,\r\n height: 25,\r\n width: 200,\r\n bubble: false\r\n});\r\nwin.add(bb1);\r\nwin.addEventListener('click', function(e) {\r\n Ti.Media.takeScreenshot(function(e) {\r\n var file = Ti.Filesystem.getFile(Ti.Filesystem.getTempDirectory(), fileName);\r\n Ti.API.info(fileName + ': ' + file.resolve());\r\n file.write(e.media);\r\n file = null;\r\n });\r\n});\r\nwin.add(bb1);\r\n{code}\r\n\r\nThe problem occurs using both Alloy or non-alloy - obvious but ruled out anyway.\r\n\r\nConfirmation (and simple code snippet) provided by Stephen Feather.", "attachment": [ { "id": "53241", "filename": "alloyversion.png", "author": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "created": "2014-12-16T14:46:47.000+0000", "size": 8252, "mimeType": "image/png" }, { "id": "53240", "filename": "testme.png", "author": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "created": "2014-12-16T14:46:47.000+0000", "size": 22040, "mimeType": "image/png" } ], "flagged": false, "summary": "Ti.Media.takeScreenshot() does not render the selected iOS TabbedBar element", "creator": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "environment": "Ti SDK 3.4.1 & Ti SDK 3.5.0 Beta\r\nOSX Mavericks\r\nXcode 6.1\r\niOS Simulator 7.1 & 8.1 all device sizes", "closedSprints": [ { "id": 330, "state": "closed", "name": "2015 Sprint 03 SDK", "startDate": "2015-01-31T01:00:05.245Z", "endDate": "2015-02-14T01:00:00.000Z", "completeDate": "2015-02-16T21:01:51.914Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "342891", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "h4.Updated sample code here:\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'red'\r\n});\r\nvar fileName = 'testme.png';\r\nvar bb1 = Titanium.UI.iOS.createTabbedBar({\r\n labels: ['One', 'Two', 'Three'],\r\n backgroundColor: '#336699',\r\n top: 50,\r\n height: 25,\r\n width: 200,\r\n bubble: false\r\n});\r\n\r\nwin.add(bb1);\r\nwin.addEventListener('dblclick', function(e) {\r\n Ti.Media.takeScreenshot(function(e) {\r\n var file = Ti.Filesystem.getFile(Ti.Filesystem.getTempDirectory(), fileName);\r\n Ti.API.info(fileName + ': ' + file.resolve());\r\n file.write(e.media);\r\n file = null;\r\n });\r\n});\r\nwin.open();\r\n\r\n{code}\r\n\r\nh4.Changes made:\r\n- Replace deprecated Ti.UI.tabbedbar with Ti.UI.iOS.tabbedbar.\r\n- Removed deprecated Ti.UI.iPhone.SystemButtonStyle.BAR.\r\n- Used dblclick instead of click event to capture screenshot", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-02-11T05:30:52.000+0000", "updated": "2015-02-11T05:32:02.000+0000" }, { "id": "342894", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR Here: https://github.com/appcelerator/titanium_mobile/pull/6638", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-02-11T06:14:24.000+0000", "updated": "2015-02-11T06:14:24.000+0000" }, { "id": "343525", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The selected tab in tabbed bar is rendered in the screenshot through Ti.Media.takeScreenshot\r\nVerified on:\r\nAppc Studio: 4.0.0.201502111039\r\nTitanium SDK: 4.0.0.v20150216083136\r\nXcode: 6.1, 6.2 beta\r\nDevice: iOS Simulator v8.1, v8.2 beta, iPhone 4 (v7.1), iPhone 5S (v8.1)", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-02-17T05:36:48.000+0000", "updated": "2015-02-17T05:36:48.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }