сначала нужно добавить UIDocumentInteractionControllerDelegate в вашем файле .h
т.е.:
@interface MyDocumentViewController : UIViewController <UIDocumentInteractionControllerDelegate>
в файле .m вы добавляете протокол, который позволяет вам узнать, что происходит .. .
- (void)documentInteractionController:(UIDocumentInteractionController *)controller willBeginSendingToApplication:(NSString *)application{
NSLog(@"Send to App %@ ...", application);
}
- (void)documentInteractionController:(UIDocumentInteractionController *)controller didEndSendingToApplication:(NSString *)application{
NSLog(@"Finished sending to app %@ ...", application);
}
- (void)documentInteractionControllerDidDismissOpenInMenu:(UIDocumentInteractionController *)controller{
NSLog(@"Bye");
}
, конечно, вы должны установить делегат UIDocumentInteractionController к этому модулю. Я решил так:
-(BOOL)canOpenDocumentWithURL:(NSURL*)url inView:(UIView*)view {
BOOL canOpen = NO;
UIDocumentInteractionController* tmpDocController = [UIDocumentInteractionController
interactionControllerWithURL:url];
if (tmpDocController)
{
tmpDocController.delegate = self;
canOpen = [tmpDocController presentOpenInMenuFromRect:CGRectZero
inView:self.view animated:NO];
[tmpDocController dismissMenuAnimated:NO];
}
return canOpen;
}
Ответ есть в следующем посте http://stackoverflow.com/questions/6741565/docinteraction-sample-code-uidocumentinteractioncontroller-broken-on-ios-4 -3-е – ArunaFromLK