如题,在三方中打开自己的文档
- (void)butClick:(UIButton *)sender
{
NSString * docPath = [[NSBundle mainBundle]pathForResource:@"1" ofType:@"rtf"];
NSURL * url = [NSURL URLWithString:docPath];
// 需要用三方程序打开的文件位置
UIDocumentInteractionController * interactionController = [UIDocumentInteractionController interactionControllerWithURL:url];
// 文件的类型,详情请参考官方文档 https://developer.apple.com/library/mac/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html
interactionController.UTI = @"public.rtf";
// 打开方式,有几种
[interactionController presentOpenInMenuFromRect:sender.frame inView:self.view animated:YES];
}