我对 iOS 很陌生。我现在创建PDF
并加载它
这次我想在 iPhone 中保存或下载它PDF
,当我们点击下载按钮然后所有退出支持者显示就像打开 ibook 一样,在 chrome 中打开。这种类型的选项会显示,但是当我们点击任何一个时,我的应用程序就会关闭。UIWebView
PDF
PDF
-(void)show_Button
{
NSArray *docDirectories = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *docDirectory = [docDirectories objectAtIndex:0];
NSString *filePAth = [docDirectory stringByAppendingPathComponent:@"myPDF.pdf"];
NSLog(@"filePath = %@", filePAth);
NSURL *url2 = [NSURL fileURLWithPath:filePAth];
NSLog(@"url2 = %@", url2);
UIDocumentInteractionController *docContr = [UIDocumentInteractionController
interactionControllerWithURL:url2];
docContr.delegate=self;
[docContr presentOpenInMenuFromRect:CGRectZero inView:self.view animated:YES];
}
那么如何在Iphone中保存或下载此pdf请解决此问题....