Project: titanium
Issue TIMOB-18245: Ti.Media.takeScreenshot() does not render the selected iOS TabbedBar element
The method *Ti.Media.takeScreenshot()* does not render the selected iOS TabbedBar element. If 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. The 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. {code:javascript|title=screenshot.js|borderStyle=solid} var win = Ti.UI.createWindow({ backgroundColor: 'red' }); var fileName = 'testme.png'; var bb1 = Titanium.UI.createTabbedBar({ labels: ['One', 'Two', 'Three'], backgroundColor: '#336699', top: 50, style: Titanium.UI.iPhone.SystemButtonStyle.BAR, height: 25, width: 200, bubble: false }); win.add(bb1); win.addEventListener('click', function(e) { Ti.Media.takeScreenshot(function(e) { var file = Ti.Filesystem.getFile(Ti.Filesystem.getTempDirectory(), fileName); Ti.API.info(fileName + ': ' + file.resolve()); file.write(e.media); file = null; }); }); win.add(bb1); {code} The problem occurs using both Alloy or non-alloy - obvious but ruled out anyway. Confirmation (and simple code snippet) provided by Stephen Feather.
Story points: 8