{ "id": "125284", "key": "TIMOB-16294", "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": "15922", "description": "2014 Sprint 03", "name": "2014 Sprint 03", "archived": true, "released": true, "releaseDate": "2014-02-14" }, { "id": "15923", "description": "2014 Sprint 03 API", "name": "2014 Sprint 03 API", "archived": true, "released": true, "releaseDate": "2014-02-14" } ], "resolution": { "id": "6", "description": "", "name": "Hold" }, "resolutiondate": "2014-02-05T22:44:53.000+0000", "created": "2014-01-23T09:24:54.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "supportTeam" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-17T18:16:26.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": "h2. Description\r\nWhen we implement ToImage functionality over a view which contains a tabbedbar/buttonbar, then the resulting image that is generated doesn't show the text on the selected index of the tab.\r\n\r\nh2. Steps to Reproduce\r\n\r\n1. Run the app in simulator\r\n2. tap on the button \"Click me\"\r\n3. Go to the application documents directory in iphone simulator folder on the path \"/Users//Library/Application Support/iPhone Simulator/7.0/Applications//Documents\"\r\n4. check out the image \"test.png\"\r\n\r\nh2. Test Code\r\n{code}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({\r\n\r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab1 = Titanium.UI.createTab({\r\n\r\n icon:'KS_nav_views.png',\r\n title:'Tab 1',\r\n window:win1\r\n});\r\n var buttonbar = Titanium.UI.createButtonBar({\r\n left : 20,\r\n right : 20,\r\n height : 24,\r\n labels : [L('spc_1d'), L('spc_1m'), L('spc_3m'), L('spc_6m'), L('spc_1y'), L('spc_3y'), L('spc_5y')],\r\n style : Titanium.UI.iPhone.SystemButtonStyle.BAR,\r\n backgroundColor : '#86c037',\r\n index:3,\r\n font:{fontWeight:'bold'}\r\n });\r\n win1.add(buttonbar);\r\n\r\nvar button = Ti.UI.createButton({\r\n title:\"click me\",\r\n text:\"click here\",\r\n backgroundColor:'black',\r\n top:20\r\n});\r\nwin1.add(button);\r\nbutton.addEventListener(\"click\",function(e){\r\n Ti.API.info(\"you got clicked\");\r\n var imageFile = Ti.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, 'test.png');\r\n imageFile.write(win1.toImage());\r\n});\r\n\r\n//\r\n// create controls tab and root window\r\n//\r\nvar win2 = Titanium.UI.createWindow({\r\n\r\n title:'Tab 2',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab2 = Titanium.UI.createTab({\r\n\r\n icon:'KS_nav_ui.png',\r\n title:'Tab 2',\r\n window:win2\r\n});\r\n\r\nvar label2 = Titanium.UI.createLabel({\r\n color:'#999',\r\n text:'I am Window 2',\r\n font:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n textAlign:'center',\r\n width:'auto'\r\n});\r\n\r\nwin2.add(label2);\r\n\r\n//\r\n// add tabs\r\n//\r\ntabGroup.addTab(tab1);\r\n\r\ntabGroup.addTab(tab2);\r\n\r\n// open tab group\r\ntabGroup.open();\r\n{code}", "attachment": [ { "id": "45316", "filename": "test.png", "author": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-23T09:26:21.000+0000", "size": 20543, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: ToImage() functionality on TabbedBar/ButtonBar removes text of the selected tab in image", "creator": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS 7", "comment": { "comments": [ { "id": "291523", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "We use renderInContext method to create a UIImage object from a UIView.\r\n\r\nIn iOS7 iOS has changed the way the selected segment is displayed. The selected segment now has a compositingFilter (which older versions of iOS did not). renderInContext implementation does not support the entire Core Animation composition model.\r\n\r\ncompostingFilter is one of the unsupported elements. \r\n\r\nGoing to mark this as \"HOLD\" until we have a good alternative to renderInContext.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-02-05T22:44:53.000+0000", "updated": "2014-02-05T22:44:53.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }