English 中文(简体)
UIDocument InteractionController on the details 观点
原标题:UIDocumentInteractionController on the detailView
  • 时间:2011-09-26 16:37:27
  •  标签:
  • ipad

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;
}
问题回答

暂无回答




相关问题
What is the iPad user agent?

From what I gather, the iPad is using iPhone OS, but with a different screen resolution from the iPhone and iPod touch. So many sites may have to change their user agent detection to adapt to the iPad....

iPhone OS 3.2 on the iPhone?

I have edited this OS 3.2 question based on advice that it could infringe Apple s NDA which is something I have no desire to do. For what its worth I didn t reveal anything likely to upset their ...

Does cocos2d framework work on iPad?

Does Cocos2d iPhone framework work on iPad? My guess would be yes, but wanted to check if someone has a definitive answer after porting iPhone project with cocos2d to iPad, or starting a new one.

Run iPhone SDK on iPad

I was wondering if anyone knows if you can run the iPhone SDK on an iPad. Tried looking through apple.com, but didn t find anything useful... I want to be able to develop -- from start to finish -- ...

What s new in iPhone SDK 3.2?

Apparently it is available (www.apple.com/ipad/sdk/), but I can t find a changelog... Not used to apple.com though. Does anybody have detailed information? What I would like to know is : are there ...

iPhone App Icons - Exact Radius?

I m trying to create the icon for my iPhone app, but don t know how to get the exact radius that the iPhone s icons use. I ve searched and searched for a tutorial or a template but can t find one. I ...

热门标签