iPhone WebApp Question

Posted by Henry D'Andrea on Stack Overflow See other posts from Stack Overflow or by Henry D'Andrea
Published on 2010-05-25T04:57:07Z Indexed on 2010/05/25 5:01 UTC
Read the original article Hit count: 215

I have this code-

/** Save the web view as a screenshot. Currently only supports saving to the photo library. / - (void)saveScreenshot:(NSArray)arguments withDict:(NSDictionary*)options { CGRect screenRect = [[UIScreen mainScreen] bounds]; CGRect imageRect = CGRectMake(0, 0, CGRectGetWidth(screenRect), CGRectGetHeight(screenRect));

UIGraphicsBeginImageContext(imageRect.size);
[webView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage, self, nil, nil);

UIAlertView *alert= [[UIAlertView alloc] initWithTitle:nil

message:@"Image Saved" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; [alert release];

}

This is for saving whatever you drew in my app. How would I add the button for this in the HTML code. How do i call from it?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about iphone