I cannot comment yet so I'm answering instead :-)
You should give QuickLook framework a try. In my case, I searched all over how to customize UIDocumentInteractionController and failed to find anything useful. I achieved what I wanted (in my case, having a preview "view" inside another view) using QuickLook. Here's a sample code, to have a QLPreviewController as a child controller (being able to create the parent controller freely, which will do the trick in your case).
self.previewController = [[QLPreviewController alloc]init];
self.previewController.delegate=self;
self.previewController.dataSource=self;
[self addChildViewController:self.previewController];
self.previewController.view.frame = CGRectMake(0, 0, self.previewView.frame.size.width, self.previewView.frame.size.height);
[self.previewView addSubview:self.previewController.view];
[self.previewController didMoveToParentViewController:self];
You will also need some delegates: QLPreviewControllerDataSource and QLPreviewControllerDelegate
and also some need to implement:
- (id <QLPreviewItem>)previewController: (QLPreviewController *)controller previewItemAtIndex:(NSInteger)index
return NSURL to the resource
- (NSInteger) numberOfPreviewItemsInPreviewController: (QLPreviewController *) controller
return the number of items to preview (in my case, 1)
UIActionSheet
contains:Email this..
,Open with..
,Open with Phone Galary..
, why you insist to include all these in the menu ofUIDocumentInteractionController
? – Insightful