UIPrintInteractionController (Swift) 最多可以执行多少次打印?

How many maximum printings can UIPrintInteractionController (Swift) execute?

UIPrintInteractionController (Swift) 最多可以执行多少次打印?

我目前正在为一个项目做 AirPrint。 想知道如何在使用Printer Simulator中进行批量打印的压力测试。

干杯,

来自文档:

1- var printingItems:[任何]? { 设置 } 采用一组打印就绪对象(NSURL、NSData、UIImage 或 ALAsset)。该文档未引用任何限制,因此我们假设该限制是您的体系结构中 unsigned int 的值。

2-打印开始和结束有2个委托方法: 打印作业的开始和结束

func printInteractionControllerWillStartJob(UIPrintInteractionController)
//Tells the delegate that the print job is about to start.
func printInteractionControllerDidFinishJob(UIPrintInteractionController)
//Tells the delegate that the print job has ended.

您可以使用它们来获取 IsPrinting 状态。 (在第一和第二之间)。

3- 文档没有提供任何委托方法来获取队列中的等待

4- 您可以使用以下方式自定义警报:

printInfo UIPrintInfo: The aforementioned print job configuration.
printPaper UIPrintPaper: A simple type that describes the physical and printable size of a paper type; except for specialized applications, this will be handled for you by UIKit.
showsNumberOfCopies Bool: When true, lets the user choose the number of copies.
showsPageRange Bool: When true, lets the user choose a sub-range from the printed material. This only makes sense with multi-page content—it’s turned off by default for images.
showsPaperSelectionForLoadedPapers Bool: When this is true and the selected printer has multiple paper options, the UI will let the user choose which paper to print on.

关于使用Swift进行打印的详细说明,请参考以下link: UIPrint​Interaction​Controller - Written by Nate Cook

如果此回复对您有帮助并且满足您的需求,请不要忘记验证它:)。

祝你的应用程序好运。