0
我已經將聯繫號碼存儲在一個數組中,然後將該數組傳遞給消息控制器,如下面的代碼,並打印controller.recipients
的值並顯示null。如何使用數組中的號碼發送短信?
MFMessageComposeViewController *controller = [[MFMessageComposeViewController alloc] init];
NSArray *arr = [NSArray arrayWithArray:selContacts];
controller.recipients = arr;
NSLog(@"received:- %@",controller.recipients);
controller.messageComposeDelegate = self;
controller.body [email protected]"https://itunes.apple.com/in/app/Click Here to Download!";
if([MFMessageComposeViewController canSendText])
{
[self presentModalViewController:controller animated:YES];
}
打印[NSArray的arrayWithArray:selContacts]是否有任何接觸? –
您正在調試哪個設備? –
是的,5〜6個觸點是有 –