Showing
2 changed files
with
3 additions
and
2 deletions
@@ -206,7 +206,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | @@ -206,7 +206,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | ||
206 | 206 | ||
207 | let activityViewController = UIActivityViewController(activityItems: [fileURL, body as Any], applicationActivities: nil) | 207 | let activityViewController = UIActivityViewController(activityItems: [fileURL, body as Any], applicationActivities: nil) |
208 | activityViewController.setValue(subject, forKey: "subject") | 208 | activityViewController.setValue(subject, forKey: "subject") |
209 | - if UI_USER_INTERFACE_IDIOM() == .pad { | 209 | + if UIDevice.current.userInterfaceIdiom == .pad { |
210 | let controller: UIViewController? = UIApplication.shared.keyWindow?.rootViewController | 210 | let controller: UIViewController? = UIApplication.shared.keyWindow?.rootViewController |
211 | activityViewController.popoverPresentationController?.sourceView = controller?.view | 211 | activityViewController.popoverPresentationController?.sourceView = controller?.view |
212 | activityViewController.popoverPresentationController?.sourceRect = rect | 212 | activityViewController.popoverPresentationController?.sourceRect = rect |
@@ -290,7 +290,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | @@ -290,7 +290,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | ||
290 | result(data) | 290 | result(data) |
291 | } | 291 | } |
292 | 292 | ||
293 | - if UI_USER_INTERFACE_IDIOM() == .pad { | 293 | + if UIDevice.current.userInterfaceIdiom == .pad { |
294 | let viewController: UIViewController? = UIApplication.shared.keyWindow?.rootViewController | 294 | let viewController: UIViewController? = UIApplication.shared.keyWindow?.rootViewController |
295 | if viewController != nil { | 295 | if viewController != nil { |
296 | controller.present(from: rect, in: viewController!.view, animated: true, completionHandler: pickPrinterCompletionHandler) | 296 | controller.present(from: rect, in: viewController!.view, animated: true, completionHandler: pickPrinterCompletionHandler) |
-
Please register or login to post a comment