问题描述
|
如何找出所有可以在iPad中打开相同内容类型的应用程序?有没有API可以找到这个?
解决方法
您可以按以下方式使用“ 0”:
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@\"pdfName\" ofType:@\"pdf\"]];
_docController = [[UIDocumentInteractionController interactionControllerWithURL:url] retain];
BOOL isValid = [_docController presentOpenInMenuFromRect:CGRectMake(980,52,0) inView:self animated:YES];
它将打开一个包含所有选项的菜单,以读取该文件。您也可以使用其delegate
UIDocumentInteractionControllerDelegate
来对其进行更多控制。