Created
April 5, 2018 05:50
-
-
Save 328/5a550faddd97c9c16fb09ed297d18535 to your computer and use it in GitHub Desktop.
UIWebViewテスト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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