[IOS 开发] 关于ios打印(AirPrint)
来源:互联网 发布:淘宝拍摄布光 编辑:程序博客网 时间:2024/04/29 16:35
导入 UIPrintInteractionController 类
在.h中实现它的代理Delegate <UIPrintInteractionControllerDelegate>
例子:
UIPrintInteractionController *pic = [UIPrintInteractionController sharedPrintController]; if (pic) { pic.delegate = self; UIPrintInfo *printInfo = [UIPrintInfo printInfo]; printInfo.outputType = UIPrintInfoOutputGeneral; printInfo.jobName = @"111"; printInfo.duplex = UIPrintInfoDuplexLongEdge; pic.printInfo = printInfo; pic.showsPageRange = YES; //可以是多张图片 pic.printingItems = dataArr; void (^completionHandler)(UIPrintInteractionController *, BOOL, NSError *) =^(UIPrintInteractionController *pic, BOOL completed, NSError *error) {if (!completed && error)NSLog(@"FAILED! due to error in domain %@ with error code %u", error.domain, error.code);}; if (iPad) { [pic presentFromRect:sender.frame inView:self.window animated:YES completionHandler:completionHandler]; }else { [pic presentAnimated:YES completionHandler:completionHandler]; } }
0 0
- [IOS 开发] 关于ios打印(AirPrint)
- iOS 无线打印功能(AirPrint)
- IOS AirPrint功能
- IOS 4.2 AirPrint调用
- 在iOS上使用AirPrint实现无线打印功能
- 在Windows电脑中实现iPhone4 iOS 4.2.1 AirPrint(无线打印)功能
- 《iOS Human Interface Guidelines》——AirPrint
- iOS开发 打印
- iOS开发- 日志打印(常见)
- iOS开发- 日志打印(常见)
- iOS开发- 常见日志打印
- 关于iOS应用开发
- iOS 关于音频开发
- 关于ios开发证书
- iOS 关于音频开发
- iOS 关于音频开发
- iOS 关于音频开发
- ios开发关于block
- prim poj1789
- 使用atomikos处理ActiveMQ在Spring环境的XA事务
- java.util.concurrent.CountDownLatch
- 小注意点~
- Linux下如何修改用户默认目录
- [IOS 开发] 关于ios打印(AirPrint)
- iPad开发之Popover
- 【Unity开发】Unity5.x版本的AssetBundle打包
- gearmand分布
- 写在前面
- 【django】搭建博客教程(2)——Template的使用
- 【JavaEE】SSH+Spring Security基础上配置AOP+log4j
- centos6.4修改mysql默认密码方式
- Java集合---ArrayList的实现原理