How to create a UIPrintPaper to test UIPrintInteractionControllerDelegate
问题 Having written a UIPrintInteractionControllerDelegate , I wish to unit test its paper selection functionality in printInteractionController:choosePaper: Its declaration is: optional func printInteractionController(_ printInteractionController: UIPrintInteractionController, choosePaper paperList: [UIPrintPaper]) -> UIPrintPaper It is a simple matter of calling it with predefined UIPrintPaper values and checking the output. However I am unable to create UIPrintPaper instances. Here is how