- (void)sendSMS:(NSString *)bodyOfMessage recipientList:(NSArray *)recipients

{   
    MFMessageComposeViewController *controller = [[[MFMessageComposeViewController alloc] init] autorelease];
   
    if([MFMessageComposeViewController canSendText])
    {
        controller.body = bodyOfMessage;  
        controller.recipients = recipients;
        controller.messageComposeDelegate = self;
        [self presentModalViewController:controller animated:YES];
    }
   
}

 

            NSArray * array = [[NSArray alloc]initWithObjects:phone, nil];
                       
           
            [self sendSMS:@"这里是短信内容" recipientList:array];

相关文章:

  • 2022-12-23
  • 2021-11-14
  • 2021-07-28
  • 2021-11-27
  • 2022-01-07
  • 2021-11-05
  • 2022-12-23
  • 2021-05-28
猜你喜欢
  • 2022-01-11
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2021-06-29
  • 2022-12-23
相关资源
相似解决方案