Skip to content

Instantly share code, notes, and snippets.

@eytanschulman
Created August 26, 2015 20:15
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 eytanschulman/1110cd95977f7e9a1a8a to your computer and use it in GitHub Desktop.
Save eytanschulman/1110cd95977f7e9a1a8a to your computer and use it in GitHub Desktop.
Will the real easy UIWebView code please stand up?
//
// ViewController.swift
// WebVIewBrad
//
// Created by Eytan Schulman on 8/26/15.
// Copyright (c) 2015 MultiEducator. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var webView: UIWebView!
override func viewDidLoad() {
super.viewDidLoad()
let url = NSURL(string: "http://www.brdth.com") //url
loadURLInWebView(url)
// Do any additional setup after loading the view, typically from a nib.
}
func loadURLInWebView(url: NSURL!) {
var urlRequest = NSURLRequest(URL: url)
webView.loadRequest(urlRequest)
}
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