Committed by
David PHAM-VAN
Update PrintJob.swift
Adding DispatchQueue to resolve issue with iOS crashing after canceling print job and relaunching.
Showing
1 changed file
with
1 additions
and
1 deletions
@@ -75,7 +75,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | @@ -75,7 +75,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | ||
75 | 75 | ||
76 | let printInfo = UIPrintInfo.printInfo() | 76 | let printInfo = UIPrintInfo.printInfo() |
77 | printInfo.jobName = jobName! | 77 | printInfo.jobName = jobName! |
78 | - printInfo.outputType = .general | 78 | + DispatchQueue.main.async { printInfo.outputType = .general } |
79 | if orientation != nil { | 79 | if orientation != nil { |
80 | printInfo.orientation = orientation! | 80 | printInfo.orientation = orientation! |
81 | orientation = nil | 81 | orientation = nil |
-
Please register or login to post a comment