java多线程    Java入门    vsftp    ftp    linux配置    centos    FRP教程    HBase    Html5缓存    webp    zabbix    分布式    neo4j图数据库    

swift加载浏览器

swift加载浏览器
页面上拉个控件

 @IBOutlet weak var web: UIWebView!
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        var url = NSURL(string: "http://baidu.com");
        var request = NSURLRequest(URL: url!);
        web.loadRequest(request);
    }

纯代码实现

 
        var webView = UIWebView()
        webView.delegate = self
        
        var url = NSURL(string:"http://localhost//list.php")
        
        var urlRequest = NSURLRequest(URL:url!)
        webView.frame = CGRectMake(0, 20, sizewebview, posywebview)
        webView.loadRequest(urlRequest)
        self.view.addSubview(webView)


This entry was posted in Xcode and tagged , , . Bookmark the permalink.
月小升QQ 2651044202, 技术交流QQ群 178491360
首发地址:月小升博客https://java-er.com/blog/swift-load-brower/
无特殊说明,文章均为月小升原创,欢迎转载,转载请注明本文地址,谢谢
您的评论是我写作的动力.

Leave a Reply