supersr--打电话/短信分享/邮件分享
// Created by apple on 15/6/17.
// Copyright (c) 2015年 Super All rights reserved.
//
#import "LCShareController.h"
@end
NSLog(@"dealloc");
}
- (UIWebView *)webView{
if (_webView == nil) {
_webView = [UIWebView new];
}
return _webView;
}
- (void)setData{
__weak typeof(self) weakSelf = self;
// NSURL *url = [NSURL URLWithString:@"tel://1008611"];
//打电话之前会有提示 回到当前应用 私有的api
// NSURL *url = [NSURL URLWithString:@"telprompt://10086"];
// [[UIApplication sharedApplication] openURL:url];
NSURL *url = [NSURL URLWithString:@"tel://10086"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[weakSelf.webView loadRequest:request];
}];
//发完短信之后。会到短信界面
// NSURL *url = [NSURL URLWithString:@"sms://哈哈哈"];
// [[UIApplication sharedApplication] openURL:url];
//判断设备是否能发送信息
if (![MFMessageComposeViewController canSendText]) {
return;
}
MFMessageComposeViewController *vc = [MFMessageComposeViewController new];
//收件人列表
vc.recipients = @[@"10000",@"10086"];
vc.body = @"推荐一个nb的游戏 http://www.nbcoder.com/test";
vc.subject = @"biaoti";
//设置代理
vc.messageComposeDelegate = weakSelf;
[weakSelf presentViewController:vc animated:YES completion:nil];
}];
//判断是否能发送邮件
if (![MFMailComposeViewController canSendMail]) {
return;
}
MFMailComposeViewController *vc = [MFMailComposeViewController new];
vc.mailComposeDelegate = weakSelf;
//设置收件人
[vc setToRecipients:@[@"super1250@126.cn",@"2222@126.cn"]];
//密送
// [vc setBccRecipients:<#(NSArray *)#>]
//抄送
// [vc setCcRecipients:<#(NSArray *)#>]
[vc setSubject:@"收福利了"];
[vc setMessageBody:@"送美女" isHTML:NO];
//
UIImage *img = [UIImage imageNamed:@"aa"];
NSData *data = UIImagePNGRepresentation(img);
[vc addAttachmentData:data mimeType:@"image/png" fileName:@"cls.png"];
[weakSelf presentViewController:vc animated:YES completion:nil];
}];
//controller(self) --> self.groups --> group --> item --> option --> self
}
- (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error{
[controller dismissViewControllerAnimated:YES completion:nil];
}
- (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result{
[controller dismissViewControllerAnimated:YES completion:nil];
}
supersr--打电话/短信分享/邮件分享的更多相关文章
- iOS调用系统发送短信和邮件分享
//发送邮件 -(void)sendMail:(NSString*)subject content:(NSString*)content{ MFMailComposeViewController*co ...
- ios 设置亮度、声音;调用发短信、邮件、打电话
一,设置亮度 [[UIScreen mainScreen] setBrightness:0.5];//0.0~1.0 二,设置声音 1,添加 MediaPlayer.framework 框架 2,在需 ...
- Android实例-打电话、发短信和邮件,取得手机IMEI号(XE8+小米2)
结果: 1.不提示发短信卡住,点击没有反映,我猜想,可能是因为我用的是小米手机吧. 2.接收短信报错,我猜想可能是我改了里面的方法吧(哪位大神了解,求指教). 3.project -->opti ...
- IOS中调用系统的电话、短信、邮件、浏览功能
iOS开发系列--通讯录.蓝牙.内购.GameCenter.iCloud.Passbook系统服务开发汇总 2015-01-13 09:16 by KenshinCui, 26990 阅读, 35 评 ...
- ios开发——实用技术篇Swift篇&地址薄、短信、邮件
//返回按钮事件 @IBAction func backButtonClick() { self.navigationController?.popViewControllerAnimated(tru ...
- react-native-communications 电话、短信、邮件、浏览器
第一种方法:Linking:调用系统的电话.短信.邮件.浏览器等功能 Linking.canOpenURL(this.props.url).then(supported => { if (!su ...
- HTML5的头部、拨号、短信、邮件(转)
HTML5[语法要点] 一.头部设置 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 <!--页面窗口自动调整到设备 ...
- iOS学习笔记28-系统服务(一)短信和邮件
一.系统应用 在开发某些应用时,我们可能希望能够调用iOS系统内置的电话.短信.邮件.浏览器应用,或者直接调用安装的第三方应用,这个要怎么实现呢? 这里统一使用UIApplication的一个对象方法 ...
- MVC使用ASP.NET Identity 2.0实现用户身份安全相关功能,比如通过短信或邮件发送安全码,账户锁定等
本文体验在MVC中使用ASP.NET Identity 2.0,体验与用户身份安全有关的功能: →install-package Microsoft.AspNet.Identity.Samples - ...
- app后端设计(3)--短信,邮件,推送服务(2014.12.05更新)
在app的后端设计中,免不了消息的推送,短信,邮件等服务,下面就个人的开发经验谈谈这方面. (1)最重要的是,各种推送一定要放在队列系统中处理,不然会严重影响api的响应时间. (2)短信方面 以前我 ...
随机推荐
- C#之规格说明书
1. Statement My Note Problem Statement Version 1.0 Revision History Date Issue Description Author ...
- gcc 4.8.3 install centos
http://blog.csdn.net/xlx921027/article/details/17382643
- C语言各种标准的
[K&R C] 1978 年,Dennis Ritchie 和 Brian Kernighan 合作推出了<The C Programming Language>的第一版(按照惯例 ...
- FineUI第十七天---- 表格之扩展列
{ sb.AppendFormat(]); 1.通过表格的SelectedRowIndexArray获得选中行的索引号列表: 2.通过表格的DataKeys(二维数组)获取本行的数据 ...
- JQuery data方法的使用-遁地龙卷风
(-1)说明 我用的是chrome49,这个方法涉及到JQuery版本问题,我手里有3.0的,有1.9.1,后面将1.9.1及其以前的称为低版本,3.0称为高版本 测试例子用到的showMessage ...
- 深入理解Java虚拟机之读书笔记三 内存分配策略
一般的内存分配是指堆上的分配,但也可能经过JIT编译后被拆散为标量类型并间接地在栈上分配.对象主要分配在新生代的Eden区上,如果启动了本地线程分配缓冲,将按线程优先在TLAB上分配,少数情况下直接分 ...
- phpstorm的调试工具xdebug
1.需求 知道xdebug的使用方法 2.安装xdebug http://www.awaimai.com/1290.html 3.配置phpstorm http://www.awaimai.com/1 ...
- ion-slide-box,无限循环
ion-slide-box网络加载图片,及时更新,无限循环 does-continue:是否循环切换,开头的幻灯页只能向左滑动,最后的幻灯页只能向右滑动. 将does-continue属性值设为tru ...
- 不安装Oracle客户端使用PLSQL
要连接Oracle往往需要安装上百兆的ORACLE客户端,显得十分麻烦.先就介绍如何通过使用精简客户端,且不需要安装的客户端,配合PLSQL连接oracle数据库. 其实这些操作都很简单,写在这里 ...
- HDU 2861 四维dp打表
Patti and Terri run a bar in which there are 15 stools. One day, Darrell entered the bar and found t ...