邮件编辑器不会从 UIPreviewAction 启动

Mail Composer Won't Launch From UIPreviewAction

在我的应用的 Peek 视图的视图控制器中,我有:

- (NSArray*)previewActionItems {  

    /  
    UIPreviewAction *action1 = [UIPreviewAction actionWithTitle:@"Post to Facebook" style:UIPreviewActionStyleDefault handler:^(UIPreviewAction * _Nonnull action, UIViewController * _Nonnull previewViewController) {  


    }];  

    UIPreviewAction *action2 = [UIPreviewAction actionWithTitle:@"Message" style:UIPreviewActionStyleDefault handler:^(UIPreviewAction * _Nonnull action, UIViewController * _Nonnull previewViewController) {  


    }];  

    UIPreviewAction *action3 = [UIPreviewAction actionWithTitle:@"Email" style:UIPreviewActionStyleDefault handler:^(UIPreviewAction * _Nonnull action, UIViewController * _Nonnull previewViewController) {  
        [self displayComposerSheet];  


    }];  

    /  
    NSArray *actions = @[action1, action2, action3];  

    /  
    return actions;  
} 

这使我能够在 3D Touch 后成功地启动 sheet 预览操作。 displayComposerSheet 是:

-(void)displayComposerSheet  
{  
    NSLog(@"Mail Button Pressed");
    MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];  
    picker.mailComposeDelegate = self;  

    [picker setSubject:@"Check out this article from Fritch"];  


    /  
    NSArray *toRecipients = [NSArray arrayWithObject:@"friend@example.com"];  

    [picker setToRecipients:toRecipients];  

    /  
    NSString *emailBody = self.finalObject.articleImage;  
    [picker setMessageBody:emailBody isHTML:YES];  

    [self presentViewController:picker animated:YES completion:nil];  
    [picker release];  
} 

但是,邮件编辑器从未出现过。请帮忙

问题可能是Peek视图显示时视图层级不正常。

尝试使用根视图控制器呈现选择器:

[[UIApplication sharedApplication].delegate.window.rootViewController presentViewController:picker animated:YES completion:nil];