2

我正在使用以下代码显示应用内短信。我的应用没有状态栏。(我在纵向视图中使用 320x480 像素的屏幕)。

问题是当我加载控制器时,屏幕变黑,如您从图像中看到的那样......

http://desmond.imageshack.us/Himg211/scaled.php?server=211&filename=schermata092456187alle1.png&res=landing

这是代码:

            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];
4

1 回答 1

2

模拟器当前不支持测试 MFMessageComposeViewController。MFMailComposeViewController 是。

在实际设备上试用您的代码,它会起作用。

于 2012-09-16T15:54:20.217 回答