Skip to content

Commit

Permalink
[Project 21] Add url for current webpage
Browse files Browse the repository at this point in the history
  • Loading branch information
soapyigu committed Aug 13, 2018
1 parent a8648d3 commit ce13316
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Project 21 - Browser/Browser/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class ViewController: UIViewController {
@IBOutlet weak var reloadButton: UIBarButtonItem!

// MARK: - Parameters
// TODO: Design a dynamic mechanism to always display current webpage's url.
var urlStr: String = "https://www.apple.com"

// MARK: - Lifecycle
Expand Down Expand Up @@ -74,6 +73,8 @@ extension ViewController: WKNavigationDelegate {

func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {

urlField.text = webView.url?.absoluteString

progressBar.setProgress(0.0, animated: false)
}
}
Expand Down

0 comments on commit ce13316

Please sign in to comment.