UIDocumentInteractionController没有出现在iPad上但在iPhone上工作

Can*_*ğlu 2 ipad ios uidocumentinteraction ios6

我正在尝试UIDocumentInteractionController在我的应用上显示一个.一切都在iPhone上完美运行,但iPad上什么也没发生.这是我的代码:

    interactionController = [UIDocumentInteractionController interactionControllerWithURL:imageFile];
    interactionController.UTI = @"com.instagram.photo";
    interactionController.annotation = [NSDictionary dictionaryWithObject:[self commentForInstagram] forKey:@"InstagramCaption"];
    [interactionController presentOpenInMenuFromRect:self.view.frame inView:self.view animated:YES];
Run Code Online (Sandbox Code Playgroud)

interactionController是对实例的强引用,并且imageFile存在.在iPhone上,它会显示"打开方式..."对话框并且Instagram存在.在iPad上,上述代码运行时绝对没有任何反应.是的,我确实安装了Instagram并在我的iPad上工作.

可能是代码执行时没有发生任何事情的原因?self.view并且self.view.frame是有效的对象(在调试时测试).

谢谢,可以.

Vas*_*huk 7

在iPad UIDocumentInteractionController上出现像Pop Up尝试这样的事情:

-(void)shareClick:(UIButton*)sender {
   /*some code*/
   CGRect rectForAppearing = [sender.superview convertRect:sender.frame toView:self.view];
   [interactionController presentOptionsMenuFromRect:rect inView:self.view animated:YES];
}
Run Code Online (Sandbox Code Playgroud)