Dans l'aperçu avant impression iPad ne montrant pas UILabels. Lorsque j'effectue un zoom avant sur l'aperçu avant impression, il s'affiche correctement. Lorsque j'ai modifié la propriété UILabel opaque
à true
, l'arrière-plan d'UILabel devient noir et s'affiche dans l'aperçu avant impression. C'est le code que j'ai utilisé pour afficher l'aperçu avant impression.Aperçu avant impression couleur ne pas afficher UILabels
let printController = UIPrintInteractionController.shared
let printInfo = UIPrintInfo(dictionary:nil)
printInfo.outputType = UIPrintInfoOutputType.general
printInfo.jobName = "Print"
printInfo.duplex = UIPrintInfoDuplex.none
printInfo.orientation = UIPrintInfoOrientation.portrait
printController.printPageRenderer = nil
printController.printingItems = nil
printController.printingItem = printUrl
printController.printInfo = printInfo
printController.showsNumberOfCopies = true
printController.showsPaperSelectionForLoadedPapers = true
printController.present(animated: true, completionHandler: nil)
Quand je change UIPrintInfoOutputType.general
-UIPrintInfoOutputType.grayscale
il affiche les UILabels, mais je dois impression couleur. Niveaux de gris est seulement pour l'impression blanche & noir.