我使用以下代码来显示应用内短信。我的应用程序没有状态栏。 (我在纵向 View 中使用 320x480 像素屏幕)。
问题是,当我加载 Controller 时,屏幕变黑,正如您从图像中看到的那样......
这是代码:
MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init];
picker.messageComposeDelegate = self;
picker.recipients = [NSArray arrayWithObject:@"123456789"]; // your recipient number or self for testing
picker.body = @"test";
[self presentModalViewController:picker animated:YES];
最佳答案
模拟器当前不支持测试 MFMessageComposeViewController。但 MFMailComposeViewController 是。
在实际设备上尝试您的代码,它会起作用。
关于iphone - MFMessageComposeViewControllerDelegate 错误 - 黑屏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12448212/