Skip to content

Instantly share code, notes, and snippets.

@brandonbeecroft
Created April 12, 2015 02:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brandonbeecroft/41396bd8fe0bf9811ac9 to your computer and use it in GitHub Desktop.
Save brandonbeecroft/41396bd8fe0bf9811ac9 to your computer and use it in GitHub Desktop.
Swift UIWebView
@IBOutlet weak var webview: UIWebView!
var URLPath = "http://genealogistux.com/time/privacy.html"
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
loadURL()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
func loadURL(){
let requestURL = NSURL(string: URLPath)
let request = NSURLRequest(URL:requestURL!)
webview.loadRequest(request)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment