Created
March 30, 2013 06:45
-
-
Save wanderwaltz/5275665 to your computer and use it in GitHub Desktop.
Print contents of an UIWebView
This file contains 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
UIPrintInteractionController *controller = | |
[UIPrintInteractionController sharedPrintController]; | |
UIPrintInfo *printInfo = [UIPrintInfo printInfo]; | |
printInfo.outputType = UIPrintInfoOutputGeneral; | |
controller.printInfo = printInfo; | |
controller.printFormatter = [_webView viewPrintFormatter]; | |
controller.showsPageRange = YES; | |
void (^completionHandler)(UIPrintInteractionController *, BOOL, NSError *) = | |
^(UIPrintInteractionController *printController, BOOL completed, NSError *error) | |
{ | |
}; | |
[controller presentAnimated: YES | |
completionHandler: completionHandler]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment