【发布时间】:2014-04-25 11:54:11
【问题描述】:
我正在使用此代码为用户发送电子邮件:
MFMailComposeViewController *vc = [MFMailComposeViewController new];
[vc setSubject:@"Test Subject"];
[vc setMessageBody:@"Test Body" isHTML:NO];
[vc setMailComposeDelegate:self];
[self presentViewController:vc animated:YES completion:nil];
这会打开一个ViewController,其中包含您发送电子邮件所需的所有内容,但它会完全清除用户之前使用的ViewController 中的所有内容。它只删除了subviews,因为根视图仍然存在,因为backgroundColor 仍然相同。
我已经尝试过initWithRootViewController:,但它崩溃了。
发生了什么?
【问题讨论】:
-
你的意思是解雇后?
self是什么? -
self 是显示 mailVC ofc 的视图控制器。
标签: ios uiviewcontroller mfmailcomposeviewcontroller