1.打电话
UIApplication *app = [UIApplication sharedApplication];
[app openURL:[åNSURL URLWithString:@"tel://10086"]];
2.发短信
[app openURL:[NSURL URLWithString:@"sms://10086"]];
3.发邮件
[app openURL:[NSURL URLWithString:@"mailto://447640819@qq.com"]];
4.打开一个网页资源
[app openURL:[NSURL URLWithString:@"http://m.baidu.com"]];
5.可以通过设置UIApplication的idleTimerDisabled属性来指定iOS是否锁频:
// 禁用休闲时钟
[[UIApplication sharedApplication] setIdleTimerDisabled: YES];
[UIApplication sharedApplication].idleTimerDisabled = YES;
网友评论