swift3.0最新拨打电话方法
2017-04-28 09:59
363 查看
let alertVC :
UIAlertController =
UIAlertController.init(title:
"是否拨打报警电话:10086", message:
"", preferredStyle: .alert)
let falseAA :
UIAlertAction = UIAlertAction.init(title:
"取消", style: .cancel, handler:
nil)
let trueAA :
UIAlertAction = UIAlertAction.init(title:
"确定", style: .default) { (alertAction)
in
//拨打电话进行报警
UIApplication.shared.openURL(NSURL.init(string:
"tel://10086")! as
URL)
}
alertVC.addAction(falseAA)
alertVC.addAction(trueAA)
self.present(alertVC, animated:
true, completion:
nil)
UIAlertController =
UIAlertController.init(title:
"是否拨打报警电话:10086", message:
"", preferredStyle: .alert)
let falseAA :
UIAlertAction = UIAlertAction.init(title:
"取消", style: .cancel, handler:
nil)
let trueAA :
UIAlertAction = UIAlertAction.init(title:
"确定", style: .default) { (alertAction)
in
//拨打电话进行报警
UIApplication.shared.openURL(NSURL.init(string:
"tel://10086")! as
URL)
}
alertVC.addAction(falseAA)
alertVC.addAction(trueAA)
self.present(alertVC, animated:
true, completion:
nil)
相关文章推荐
- Swift 3.0 拨打电话
- Swift3.0拨打电话,获取通话状态(接通,挂断...)<CoreTelephony,CallKit.CXCallObserver>
- 使用 Gmail 拨打国内电话,通话双方均免费的方法
- wap拨打电话的几种方法尝试及其他常用操作
- openURL 直接拨打电话或打开网址 - swift
- iOS拨打电话的三种方法
- 最新的swift 没有了fromraw方法,该如何获取初始值为x的枚举值
- 用Gmail拨打国内电话,通话双方均免费的方法(下载)
- swift 拨打电话
- iOS拨打电话(三种方法)
- IOS拨打电话方法
- 电话激活Office 2013的方法--使用Skype拨打英国电话
- 使用 Gmail 拨打国内电话,通话双方均免费的方法
- WAP网页中点击链接直接拨打电话的方法
- iphone 拨打电话的 两种方法
- iOS拨打电话(三种方法)
- 使用 Gmail 拨打国内电话,通话双方均免费的方法
- iphone 拨打电话的 两种方法
- jquery mobile实现拨打电话功能的几种方法
- iOS 拨打电话三种方式 和 发短信的两种方法