Я использую UIDocumentInteractionController
для открытия документов в своем приложении. Я использовал метод ниже для предварительного просмотра файла в формате PDF: -Открытие файла UIDocumentInteractionController
- (IBAction)previewDocument:(id)sender
{
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"pdf"];
// Initialize Document Interaction Controller
self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:filePath]];
// Configure Document Interaction Controller
[self.documentInteractionController setDelegate:self];
// Preview PDF
[self.documentInteractionController presentOptionsMenuFromRect:down.frame inView:self.view animated:YES];
}
Я прочитал, что мы можем читать файлы в приложение из другого приложения тоже по UIDocumentInteractionController
.
В моем приложении, как я могу читать файлы из другого приложения, используя UIDocumentInteractionController
? Как все это происходит?