macOS Printing in Swift
问题 Please note this is not an iOS question. I have an NSView-based app (i.e. not document-based), and I’d like to bolt on a printing subsystem. I can get NSViews in my main controller to print ok. However, I want to have a special view constructed just for printing. The view should not show in the app’s window. The view contains two NSTextFields, two NSTextViews, and 5 labels. I cannot seem to figure out a way to do this. I have tried various forms of these examples: Add an NSView to my main