如何找到所有可以在iPad中打开相同内容类型的应用程序?
如何找到所有可以在iPad中打开相同内容类型的应用程序?有什么API可以发现这一点吗 您可以按以下方式使用如何找到所有可以在iPad中打开相同内容类型的应用程序?,ipad,Ipad,如何找到所有可以在iPad中打开相同内容类型的应用程序?有什么API可以发现这一点吗 您可以按以下方式使用UIDocumentInteractionController: NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"pdfName" ofType:@"pdf"]]; _docController = [[UIDocumentInteractionController interact
UIDocumentInteractionController
:
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"pdfName" ofType:@"pdf"]];
_docController = [[UIDocumentInteractionController interactionControllerWithURL:url] retain];
BOOL isValid = [_docController presentOpenInMenuFromRect:CGRectMake(980, 52, 0, 0) inView:self animated:YES];
它将打开一个包含所有选项的菜单来读取该文件。您还可以使用其委托
UIDocumentInteractionControllerDelegate
对其进行更多控制