首页 > 移动平台 > 详细

iOS 发短信

时间:2014-11-02 00:25:57      阅读:364      评论:0      收藏:0      [点我收藏+]

1. 导入库:

MessageUI.framework

2. 声明代理类:

MFMessageComposeViewControllerDelegate

3. 功能函数的实现:

比如:

    MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init];

    picker.messageComposeDelegate = self;

    picker.navigationBar.tintColor = [UIColor blackColor];

    picker.body = @"";

    picker.recipients = [NSArray arrayWithArray:phoneArr];

    [self presentViewController:picker animated:YES completion:nil];

4. 必须实现的代理函数:

- (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result

{

[self dismissViewControllerAnimated:YES completion:nil];

}

 

iOS 发短信

原文:http://www.cnblogs.com/zhaodazhou/p/4067913.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!