From 83fcdc86128629163b9f01451110ef7acac88d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Katzer?= Date: Wed, 11 Dec 2013 13:38:01 +0100 Subject: [PATCH] Small code changes --- src/ios/APPPrinter.m | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ios/APPPrinter.m b/src/ios/APPPrinter.m index eb1f3da..987bddb 100755 --- a/src/ios/APPPrinter.m +++ b/src/ios/APPPrinter.m @@ -47,7 +47,7 @@ CDVPluginResult* pluginResult; pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK - messageAsBool:[self isPrintServiceAvailable]]; + messageAsBool:[self isPrintServiceAvailable]]; [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; } @@ -71,9 +71,7 @@ [self adjustSettingsForPrintController:controller]; [self loadContent:content intoPrintController:controller]; - [controller presentAnimated:YES completionHandler:^(UIPrintInteractionController* printController, BOOL completed, NSError* error) { - - }]; + [self openPrintController:controller]; [self commandDelegate]; } @@ -119,6 +117,16 @@ controller.showsPageRange = YES; } +/** + * Zeigt den PrintController an. + */ +- (void) openPrintController:(UIPrintInteractionController*)controller +{ + //[self.commandDelegate runInBackground:^{ + [controller presentAnimated:YES completionHandler:NULL]; + //}]; +} + /** * Überprüft, ob der Drucker-Dienst verfügbar ist. */