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

  • 相关阅读:
    反射
    left join 多个表关联时,将表值置换
    distinct 与 group by 去重
    常见错误
    字符串的处理
    排版样式
    VS低版本打开高版本解决方案(如08打开10、12、13版本vs编译的项目)
    Dw CS 破解
    VS2013如何避开安装时IE10的限制
    UVa540 Team Queue
  • 原文地址:https://www.cnblogs.com/ftrako/p/3285282.html
Copyright © 2020-2023  润新知