UIDocumentInteractionController on the detailView
I'm previewing a file using UIDocumentInteractionController
, but it is occupying all the area of the iPad. I would like it to appear on the detail view of the split view controller. I've checked that the UIView
of my view controller doesn't occupy all the screen. Any ideas? I checked that the documentInteractionControllerRectForPreview:
is called.
-(void)requestExecutedWithSuccess:(Model *)model {
UIDocumentInteractionController *docInteractionCont = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:model.filePath]];
self.docInteractionController = docInteractionCont;
self.docInteractionController.delegate = self;
BOOL attachmentShown = [self.docInteractionController presentPreviewAnimated:YES];
...
}
- (UIViewController *) documentInteractionControllerViewControllerForPreview开发者_如何转开发: (UIDocumentInteractionController *) controller {
return [self navigationController];
}
- (UIView *)documentInteractionControllerViewForPreview:(UIDocumentInteractionController *)controller
{
return self.view;
}
- (CGRect)documentInteractionControllerRectForPreview:(UIDocumentInteractionController *)controller
{
return self.view.frame;
}
精彩评论