Showing
1 changed file
with
17 additions
and
17 deletions
| @@ -262,25 +262,25 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | @@ -262,25 +262,25 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | ||
| 262 | 262 | ||
| 263 | let pickPrinterCompletionHandler: UIPrinterPickerController.CompletionHandler = { | 263 | let pickPrinterCompletionHandler: UIPrinterPickerController.CompletionHandler = { |
| 264 | (printerPickerController: UIPrinterPickerController, completed: Bool, error: Error?) in | 264 | (printerPickerController: UIPrinterPickerController, completed: Bool, error: Error?) in |
| 265 | - if !completed, error != nil { | ||
| 266 | - print("Unable to pick printer: \(error?.localizedDescription ?? "unknown error")") | ||
| 267 | - result(nil) | ||
| 268 | - return | ||
| 269 | - } | 265 | + if !completed, error != nil { |
| 266 | + print("Unable to pick printer: \(error?.localizedDescription ?? "unknown error")") | ||
| 267 | + result(nil) | ||
| 268 | + return | ||
| 269 | + } | ||
| 270 | 270 | ||
| 271 | - if printerPickerController.selectedPrinter == nil { | ||
| 272 | - result(nil) | ||
| 273 | - return | ||
| 274 | - } | 271 | + if printerPickerController.selectedPrinter == nil { |
| 272 | + result(nil) | ||
| 273 | + return | ||
| 274 | + } | ||
| 275 | 275 | ||
| 276 | - let printer = printerPickerController.selectedPrinter! | ||
| 277 | - let data: NSDictionary = [ | ||
| 278 | - "url": printer.url.absoluteString as Any, | ||
| 279 | - "name": printer.displayName as Any, | ||
| 280 | - "model": printer.makeAndModel as Any, | ||
| 281 | - "location": printer.displayLocation as Any, | ||
| 282 | - ] | ||
| 283 | - result(data) | 276 | + let printer = printerPickerController.selectedPrinter! |
| 277 | + let data: NSDictionary = [ | ||
| 278 | + "url": printer.url.absoluteString as Any, | ||
| 279 | + "name": printer.displayName as Any, | ||
| 280 | + "model": printer.makeAndModel as Any, | ||
| 281 | + "location": printer.displayLocation as Any, | ||
| 282 | + ] | ||
| 283 | + result(data) | ||
| 284 | } | 284 | } |
| 285 | 285 | ||
| 286 | if UI_USER_INTERFACE_IDIOM() == .pad { | 286 | if UI_USER_INTERFACE_IDIOM() == .pad { |
-
Please register or login to post a comment