Skip to content

Instantly share code, notes, and snippets.

@328
Created April 5, 2018 05:50
Show Gist options
  • Save 328/5a550faddd97c9c16fb09ed297d18535 to your computer and use it in GitHub Desktop.
Save 328/5a550faddd97c9c16fb09ed297d18535 to your computer and use it in GitHub Desktop.
UIWebViewテスト
import UIKit
class ViewController: UIViewController {
var webView = UIWebView()
override func loadView() {
view = webView
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
webView.scalesPageToFit = true
let url = URL(string: "http://localhost:8080/refrects")!
let request = URLRequest(url: url)
webView.loadRequest(request)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment