Skip to content

Commit

Permalink
Merge pull request #88 from nhinze/patch-2
Browse files Browse the repository at this point in the history
If iOS preview cannot open file, show "Open In..." menu
  • Loading branch information
alex-epifanoff committed Sep 11, 2012
2 parents f99c9a9 + 4f74996 commit 28e0ef7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions platform/iphone/Classes/AppManager/AppManager.m
Expand Up @@ -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];
Expand Down

0 comments on commit 28e0ef7

Please sign in to comment.