當我嘗試使用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版中看到這個東西。 –