MFMessageComposeViewController显示空白/白色屏幕

if([MFMessageComposeViewController canSendText]) { MFMessageComposeViewController *controller = [[MFMessageComposeViewController alloc] init]; controller.body = @"This is a test!"; controller.recipients = [NSArray arrayWithObject:phones]; controller.messageComposeDelegate = self; [self presentViewController:controller animated:YES completion:nil]; } 

此代码使整个屏幕变白/空白。 有什么build议么?

问题在于这一行:

 controller.recipients = [NSArray arrayWithObject:phones]; 

这是一个格式不正确的手机#数组。 不知道为什么格式不正确的手机#没有提出错误,但过滤出来解决了这个问题。

我遇到了同样的问题,发现我的错误。

确保您发送给controller.recipients的电话号码是NSString。 我发送了一些很长的NSInteger,它变成了黑屏。