开发者

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;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜