当我尝试使用MFMessageComposeViewController发送大型收件人列表(例如多于40个)时,出现问题。在iOS7中,在显示SMS撰写视图之前,它会显示20秒或更长时间的空白屏幕。 iOS5和iOS6不会发生这种情况。MFMessageComposeViewController在iOS7中显示空白屏幕
下面是现有的代码,我使用,
NSArray * recipients;
for (NSIndexPath * index in selectedRows)
{
NSDictionary *dictionary = [data objectAtIndex:index.row];
NSString *phoneNum = [dictionary objectForKey:@"contactNum"];
recipients = [NSArray arrayWithObjects:phoneNum, nil]];
}
MFMessageComposeViewController *controller = [[MFMessageComposeViewController alloc] init];
if([MFMessageComposeViewController canSendText])
{
controller.body = bodyOfMessage;
controller.recipients = recipients;
controller.messageComposeDelegate = self ;
controller.wantsFullScreenLayout = NO;
[(id)_delegate presentModalViewController:controller animated:YES];
[[UIApplication sharedApplication] setStatusBarHidden:YES];
}
下面是当我尝试发送到很多,我收到的输出消息。
timed out waiting for fence barrier from com.apple.mobilesms.compose
Received memory warning.
Received memory warning.
Received memory warning.
Received memory warning.
Received memory warning.
Received memory warning.
Received memory warning.
Received memory warning.
Received memory warning.
我有同样的问题。 我已经在bugreport.apple中打开了一个错误报告。com与ID#14994563 两天后,苹果工程师问我一个控制台日志,我已附加它,但是,现在什么都没有发生。我写了许多线程在苹果开发者论坛没有找到任何解决方案...今天我写信给蒂姆厨师.. – mi0772
这是一个奇怪的错误。在我测试过的4个iPhone5设备中,有2个遇到了这个问题,而另外2个则立即显示了SMS撰写视图。我很困惑。 – LDWP
我遇到了与我交付的应用程序相同的问题。似乎低于30左右接触,但逐渐延长的时间超过了这个时间。 86根本没有回报!最好的猜测是,这涉及到联系人现在根据将用于发送它们的方法进行着色的方式。在iPad上,您现在可以看到一系列的旋转器出现在每个联系人上,因为无论他们是否知道iMessage。我不确定这是否是iOS7的后期补充,但我没有在beta版中看到这个东西。 –