本文介绍了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];
}
此代码使整个屏幕变白/变黑。有建议吗?
This code makes the entire screen white/blank. Any suggestions?
推荐答案
问题出在这一行:
controller.recipients = [NSArray arrayWithObject:phones];
这是一个格式错误的电话#阵列。不确定格式错误的电话#为何没有引发错误,但是将其过滤掉可以解决问题。
It was a malformed phone # array. Not sure why the malformed phone # didn't raise an error, but filtering it out fixed the problem.
这篇关于MFMessageComposeViewController显示黑屏/白屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!