短信,电话,邮件,提示框
来源:互联网 发布:java 图片合成 模板 编辑:程序博客网 时间:2024/06/04 18:37
+ (void)alert:(NSString *)msg
{
UIAlertView *alertView = [[[UIAlertView alloc] initWithTitle:msg message:@"" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil] autorelease];
[alertView showWithBackground];
}
+ (void) makeCall:(NSString *)phoneNumber
{
if ([DeviceDetection isIPodTouch]){
[UIUtils alert:kCallNotSupportOnIPod];
return;
}
NSString* numberAfterClear = [UIUtils cleanPhoneNumber:phoneNumber];
NSURL *phoneNumberURL = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", numberAfterClear]];
//NSURL *phoneNumberURL = [NSURL URLWithString:[NSString stringWithFormat:@"atel:%@", numberAfterClear]];
NSLog(@"make call, URL=%@", phoneNumberURL);
[[UIApplication sharedApplication] openURL:phoneNumberURL];
}
+ (void) sendSms:(NSString *)phoneNumber
{
if ([DeviceDetection isIPodTouch]){
[UIUtils alert:kSmsNotSupportOnIPod];
return;
}
NSString* numberAfterClear = [UIUtils cleanPhoneNumber:phoneNumber];
NSURL *phoneNumberURL = [NSURL URLWithString:[NSString stringWithFormat:@"sms:%@", numberAfterClear]];
NSLog(@"send sms, URL=%@", phoneNumberURL);
[[UIApplication sharedApplication] openURL:phoneNumberURL];
}
+ (void) sendEmail:(NSString *)phoneNumber
{
NSURL *phoneNumberURL = [NSURL URLWithString:[NSString stringWithFormat:@"mailto:%@", phoneNumber]];
NSLog(@"send sms, URL=%@", phoneNumberURL);
[[UIApplication sharedApplication] openURL:phoneNumberURL];
}
+ (void) sendEmail:(NSString *)to cc:(NSString*)cc subject:(NSString*)subject body:(NSString*)body
{
NSString* str = [NSString stringWithFormat:@"mailto:%@?cc=%@&subject=%@&body=%@",
to, cc, subject, body];
str = [str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
}
{
UIAlertView *alertView = [[[UIAlertView alloc] initWithTitle:msg message:@"" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil] autorelease];
[alertView showWithBackground];
}
+ (void) makeCall:(NSString *)phoneNumber
{
if ([DeviceDetection isIPodTouch]){
[UIUtils alert:kCallNotSupportOnIPod];
return;
}
NSString* numberAfterClear = [UIUtils cleanPhoneNumber:phoneNumber];
NSURL *phoneNumberURL = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", numberAfterClear]];
//NSURL *phoneNumberURL = [NSURL URLWithString:[NSString stringWithFormat:@"atel:%@", numberAfterClear]];
NSLog(@"make call, URL=%@", phoneNumberURL);
[[UIApplication sharedApplication] openURL:phoneNumberURL];
}
+ (void) sendSms:(NSString *)phoneNumber
{
if ([DeviceDetection isIPodTouch]){
[UIUtils alert:kSmsNotSupportOnIPod];
return;
}
NSString* numberAfterClear = [UIUtils cleanPhoneNumber:phoneNumber];
NSURL *phoneNumberURL = [NSURL URLWithString:[NSString stringWithFormat:@"sms:%@", numberAfterClear]];
NSLog(@"send sms, URL=%@", phoneNumberURL);
[[UIApplication sharedApplication] openURL:phoneNumberURL];
}
+ (void) sendEmail:(NSString *)phoneNumber
{
NSURL *phoneNumberURL = [NSURL URLWithString:[NSString stringWithFormat:@"mailto:%@", phoneNumber]];
NSLog(@"send sms, URL=%@", phoneNumberURL);
[[UIApplication sharedApplication] openURL:phoneNumberURL];
}
+ (void) sendEmail:(NSString *)to cc:(NSString*)cc subject:(NSString*)subject body:(NSString*)body
{
NSString* str = [NSString stringWithFormat:@"mailto:%@?cc=%@&subject=%@&body=%@",
to, cc, subject, body];
str = [str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
}
- 短信,电话,邮件,提示框
- 短信,电话,邮件,提示框
- iPhone开发教程之短信,电话,邮件,提示框
- iPhone调用发短信,电话,邮件,提示框的方法之一
- 电话短信和邮件
- iOS 邮件 电话 短信 safari
- iOS 电话 短信 邮件等等
- iOS 电话 短信 邮件 详解
- iOS调用电话、短信、邮件
- 邮件、短信分享 推荐、电话
- iOS 调用短信、电话、邮件、浏览器等
- APP拨打电话&发短信&发邮件
- iOS 电话 短信 邮件 跳转到AppStore
- UIApplication openURL 电话 短信 发邮件
- 在iphone程序中调用 电话,短信,网页,邮件功能
- 在iphone程序中调用 电话,短信,网页,邮件功能
- iPhone调用发短信,电话,邮件的方法
- Windows Phone 7 Dev 短信_电话_邮件
- 用例设计 (Excle方式)
- 中国宣告涡扇发动机成功:50年血汗没有白流
- Android zip文件压缩解压缩
- UIImageView实现图片幻灯片
- windows8. 微软要颠覆PC传统模式
- 短信,电话,邮件,提示框
- mvc1,mvc2,mvc3都有什么区别
- 外部Magento代码操作数据库
- 应该知道的System.exit()
- retain和copy还有assign的区别
- VIM命令 备忘
- linux sourceinsight 安装
- 保护SQL语句不被Sql Profiler / 事件探查器 捕获跟踪到
- Web开发人员速查卡