Created
July 10, 2010 08:28
-
-
Save dmnkhhn/470563 to your computer and use it in GitHub Desktop.
How to use a screenshot as a background image for a certain view.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var screenshot = win.toImage(); // make sure to change 'win' to whatever your window/view is called | |
var file = Ti.Filesystem.createTempFile(Ti.Filesystem.resourcesDirectory); // create a temporary file | |
file.write(screenshot); // write the 'screenshot' to that file. | |
var w = Ti.UI.createWindow({ | |
backgroundImage:file.nativePath // use the native path of the temp file | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment