|
@@ -730,4 +730,19 @@ NSMutableDictionary *fileStreams = nil;
|
730
|
730
|
}
|
731
|
731
|
}
|
732
|
732
|
|
|
733
|
+# pragma mark - open file with UIDocumentInteractionController and delegate
|
|
734
|
+
|
|
735
|
+- (void) openFile:(NSString *) uri
|
|
736
|
+{
|
|
737
|
+ NSURL * url = [[NSURL alloc] initWithString:uri];
|
|
738
|
+ UIDocumentInteractionController * docCtrl = [UIDocumentInteractionController interactionControllerWithURL:url];
|
|
739
|
+ docCtrl.delegate = self;
|
|
740
|
+ [docCtrl presentPreviewAnimated:YES];
|
|
741
|
+
|
|
742
|
+}
|
|
743
|
+
|
|
744
|
+- (UIViewController *) documentInteractionControllerViewControllerForPreview: (UIDocumentInteractionController *) controller {
|
|
745
|
+ return self;
|
|
746
|
+}
|
|
747
|
+
|
733
|
748
|
@end
|