Strange problem with UIDocumentInteractionController

Posted by Tùng Ð? on Stack Overflow See other posts from Stack Overflow or by Tùng Ð?
Published on 2010-05-26T07:11:44Z Indexed on 2010/05/28 4:11 UTC
Read the original article Hit count: 864

Filed under:
|
|

I don't know what wrong with this code but everytime when I run the app, after the Menu is shown, the app crash.

    NSString * path = [[NSBundle mainBundle] pathForResource:@"tung" ofType:@"doc"];

    UIDocumentInteractionController *docController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:path]];

    docController.delegate = self;

    //[docController presentPreviewAnimated:YES];

    CGRect rect = CGRectMake(0, 0, 300, 300);
    [docController presentOptionsMenuFromRect:rect inView:self.view animated:YES];

Error I got:

* Terminating app due to uncaught exception 'NSGenericException', reason: '-[UIPopoverController dealloc] reached while popover is still visible.'

What should I do now ?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about ipad