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. */