Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@arabdevteam
Created November 29, 2017 07:20
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 arabdevteam/121784e309236d03d85f895ecbab49c9 to your computer and use it in GitHub Desktop.
Save arabdevteam/121784e309236d03d85f895ecbab49c9 to your computer and use it in GitHub Desktop.
Adding Url.relative string to UITextField.
override func viewDidLoad() {
super.viewDidLoad()
textField.delegate = self // UITextField Delegation
myWeb.delegate = self // webView Delegation
let url = URL(string: “https://twitter.com/arabdevteam”)!
let request = URLRequest(url: url)
myWeb.loadRequest(request)
textField.text = url.relativeString // updating TextField with url string
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment