How to print an image in iOS 4.2?
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:
- Instantiate an
NSData
object from your file. - Create a
UIPrintInfo
object that contains the job specs. - Send the data to a
UIPrintInteractionController
, which will begin the process.
See this article for a code sample.
精彩评论