Kaz*_*zmi 4 iphone mfmailcomposeviewcontroller
由于某种原因,发送和取消按钮没有出现,我甚至在appdelegate中的应用程序开始时粘贴了以下代码,只是当应用程序启动但仍无法正常工作时.任何人都可以帮忙,谢谢
mailController = [[MFMailComposeViewController alloc] init];
mailController.mailComposeDelegate = self;
[mailController setToRecipients:[strToEmailAddresses componentsSeparatedByString:@","]];
[mailController setSubject:@"An Invite from MyGuide"];
[mailController setMessageBody:@"Join me and your other friends now for free." isHTML:NO];
if(mailController == nil)
NSLog(@"Nil");
else
[self presentModalViewController:mailController animated:YES];
Run Code Online (Sandbox Code Playgroud)
我自己偶然发现了这个问题,对我来说答案是按钮有一个白色(因为我的应用程序有白色tintColor),这使得它们在导航栏背景下看不见!所以他们实际上在那里,但颜色使他们看不见.如果这也是你的问题,那么当MailComposer被推入堆栈时,你需要暂时将navigationBar的tintColor设置为其他东西.