UIApplication.sharedApplication().openURL(NSURL(string: "http://www.163.com")!) //浏览器打开
UIApplication.sharedApplication().openURL(NSURL(string: "mailto://xxx@gmail.com")!)//发送邮件
UIApplication.sharedApplication().openURL(NSURL(string: "sms://182XXXXXXXX")!)//发送短信
UIApplication.sharedApplication().openURL(NSURL(string: "tel://182XXXXXXXX")!)//打电话
原文链接:https://www.f2er.com/swift/325682.html