MFMessageComposeViewController中的收件人数量是否有限制?

时间:2011-05-09 06:16:35

标签: iphone

MFMessageComposeViewController中的收件人数量是否有限制?

2 个答案:

答案 0 :(得分:5)

我认为MFMessageComposeViewController

中的收件人数量没有明确限制

正如您在下面的代码中看到的那样

toRecipients 是一个阵列所以你可以尝试填写你喜欢的联系人,以检查收件人数量的限制......

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];
}  

答案 1 :(得分:1)

根据documentation,收件人数量没有此限制。