未看到 MFMailComposeViewController 取消和发送按钮

MFMailComposeViewController cancel and send button not seen

我曾尝试使用 MFMailComposeViewController,但是当显示视图时,看不到取消和发送按钮。 VC 为白色。我还尝试更改 navigationBar 的一些色调,但没有任何效果。 使用的设备 iPhone 8

任何正确方向的帮助都会有所帮助

下面是相同的代码。

MFMailComposeViewController *mailVC = [[MFMailComposeViewController alloc] init];

    mailVC.mailComposeDelegate = self;
    [mailVC setSubject:@"Looko App!"];
    [mailVC setMessageBody:@"Found and sent using Demo App!" isHTML:NO];

           [mailVC setToRecipients:@[@"myTestEmail@myEmail.com"]];

    [self presentViewController:mailVC animated:YES completion:nil];

委托回调如下

- (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error
{

    switch (result) {
     case MFMailComposeResultSent:
        NSLog(@"Email sent");
        break;
    case MFMailComposeResultSaved:
        NSLog(@"Email saved");
        break;
    case MFMailComposeResultCancelled:
        NSLog(@"Email cancelled");
        break;
    case MFMailComposeResultFailed:
        NSLog(@"Email failed");
        break;
    default:
        NSLog(@"Error occured during email creation");
        break;
}

[self dismissViewControllerAnimated:YES completion:NULL];
}  

尝试在启动 MFMailComposeViewController 之前设置导航栏外观:

[UINavigationBar appearance].tintColor = [UIColor yourColor];
 MFMailComposeViewController *mailVC = [[MFMailComposeViewController alloc] init];
 //...