2

を使用してファイルをプレビューしていますUIDocumentInteractionControllerが、iPad のすべての領域を占有しています。Split View Controllerの詳細ビューに表示させたいです。UIViewView Controller がすべての画面を占有していないことを確認しました。何か案は?documentInteractionControllerRectForPreview:が呼び出されていることを確認しました。

-(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;
}
4

0 に答える 0