最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

Xcode9学习笔记77 - 使用UIApplication对象打开网页(APP调用浏览器打开网页)

业界 admin 2浏览 0评论
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        
        let website = "https://lisenh/h5/liuhai"
        let url = URL(string: website)//将字符串转换成【网址对象】
        UIApplication.shared.open(url!)
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        
        let website = "https://lisenh/h5/liuhai"
        let url = URL(string: website)//将字符串转换成【网址对象】
        UIApplication.shared.open(url!)
    }

发布评论

评论列表 (0)

  1. 暂无评论