开发者

How to print an image in iOS 4.2?

开发者 https://www.devze.com 2023-02-04 09:22 出处:网络
I find the Apple documentation difficult to read through.Perhaps someone ou开发者_运维百科t there is willing to share some code on how to easily print a JPG or PNG file in iOS 4.2?There are three basi

I find the Apple documentation difficult to read through. Perhaps someone ou开发者_运维百科t there is willing to share some code on how to easily print a JPG or PNG file in iOS 4.2?


There are three basic steps:

  1. Instantiate an NSData object from your file.
  2. Create a UIPrintInfo object that contains the job specs.
  3. Send the data to a UIPrintInteractionController, which will begin the process.

See this article for a code sample.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号