Permalink
Browse files

Merge pull request #88 from nhinze/patch-2

If iOS preview cannot open file, show "Open In..." menu
  • Loading branch information...
2 parents f99c9a9 + 4f74996 commit 28e0ef7602aeaf6f5252bf85fd9a0ef31ade43a4 @alex-epifanoff alex-epifanoff committed Sep 11, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 platform/iphone/Classes/AppManager/AppManager.m
View
9 platform/iphone/Classes/AppManager/AppManager.m
@@ -441,12 +441,17 @@ - (void)openDocInteractCommand:(NSString*)url {
BOOL result = [docController presentPreviewAnimated:YES];
if (!result) {
+ CGPoint centerPoint = [Rhodes sharedInstance].window.center;
+ CGRect centerRec = CGRectMake(centerPoint.x, centerPoint.y, 0, 0);
+ BOOL isValid = [docController presentOpenInMenuFromRect:centerRec inView:[Rhodes sharedInstance].window animated:YES];
}
}
}
-
-
+- (void)documentInteractionControllerDidEndPreview:(UIDocumentInteractionController *)docController
+{
+ [docController autorelease];
+}
- (void)openDocInteract:(NSString*)url {
[self performSelectorOnMainThread:@selector(openDocInteractCommand:) withObject:url waitUntilDone:NO];

0 comments on commit 28e0ef7

Please sign in to comment.