Skip to content

Instantly share code, notes, and snippets.

@darkredz
Created July 15, 2012 10:42
Show Gist options
  • Save darkredz/3116224 to your computer and use it in GitHub Desktop.
Save darkredz/3116224 to your computer and use it in GitHub Desktop.
Capture bitmap of UIWebView
//img is a spark Image class in Flex
//capture full page content screen shot
img.source = nativeWeb.captureScreenShotAsByteArray();
//capture current visible only
img.source = nativeWeb.captureScreenShotAsByteArray(true);
//capture full page content screen shot but return bitmap data
img.source = nativeWeb.captureScreenShotAsBitmapData();
img.source = nativeWeb.captureScreenShotAsBitmapData(true);
//Capture in JPEG format, with compression level
nativeWeb.captureScreenShotAsByteArray(false, true, 0.6);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment