gpt4 book ai didi

iphone - 将 PDF 发送到 iBooks

转载 作者:行者123 更新时间:2023-12-03 18:42:14 24 4
gpt4 key购买 nike

现在 iBooks 支持 PDF。我的应用程序可以访问许多 PDF 文件。是否可以从我的应用程序将 PDF 发送到 iBooks(或其他 PDF 阅读器,如 GoodReader 和 iAnnotate PDF)?

最佳答案

//get path to file you want to open 

NSString *fileToOpen = [[NSBundle mainBundle] pathForResource:@"readme" ofType:@"pdf"];

//create NSURL to that path

NSURL *url = [NSURL fileURLWithPath:fileToOpen];

//use the UIDocInteractionController API to get list of devices that support the file type

docController = [UIDocumentInteractionController interactionControllerWithURL:url];

[docController retain];

//present a drop down list of the apps that support the file type, click an item in the list will open that app while passing in the file.

BOOL isValid = [docController presentOpenInMenuFromRect:CGRectZero inView:self.view animated:YES];

关于iphone - 将 PDF 发送到 iBooks,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3098342/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com