• ios-->短信发送


    - (void)toSend:(NSArray *)recipient content:(NSString *)content
    {
        MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init];
        picker.messageComposeDelegate = self;
    //    picker.navigationBar.tintColor = [UIColor blackColor];
        picker.body = content;
        picker.recipients = recipient;
        [self presentViewController:picker animated:YES completion:nil];
        [picker release];
    }

    - (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result;
    {
        NSLog(@"didFinishWithResult, %d", result);
        [self dismissViewControllerAnimated:YES completion:nil];
    }

    - (IBAction)send:(id)sender
    {
        NSArray *recipient = [NSArray arrayWithObjects:@"5325236", @"325325235", @"325235323523523523", nil];
        [self toSend:recipient content:m_tfText.text];
    }

    - (IBAction)sendBySystem:(id)sender
    {
        NSString *number = @"32523523";
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"sms://%@", number]]];
    }

  • 相关阅读:
    医疗器械那些事
    内审员学习1
    BA
    GMP文件分类与编码管理规程
    杂-电工学
    产品学习1
    模拟电子技术1
    电路组装1
    Unable to simultaneously satisfy constraints.
    xcode
  • 原文地址:https://www.cnblogs.com/ftrako/p/3285282.html
Copyright © 2020-2023  润新知