Is there any limit to the number of recipients in MFMessageComposeViewController?开发者_Go百科
I think, there is no definite limit on number of recipients in MFMessageComposeViewController
As you could see in the below code
toRecipients is an array So you could try with filling as many as contacts you prefer to check the limit on number of recipients ...
void sendSMS
{
if ([MFMessageComposeViewController canSendText]) {
MFMessageComposeViewController *myMessageComposeViewController = [[MFMessageComposeViewController alloc] init];
myMessageComposeViewController.messageComposeDelegate = self;
NSString *bodyString = nil;
NSMutableArray *toRecipients = [[NSMutableArray alloc]init];
[toRecipients addObject:@"0933660805"];
[myMessageComposeViewController setRecipients:(NSArray *)toRecipients];
[toRecipients release];
bodyString = [NSString stringWithFormat: @"Message body"];
[myMessageComposeViewController setBody:bodyString];
[self presentModalViewController:myMessageComposeViewController animated:YES];
[myMessageComposeViewController release];
}
Based on the documentation, there is no such limit on the number of recipients.
精彩评论