Created
November 29, 2017 07:20
-
-
Save arabdevteam/121784e309236d03d85f895ecbab49c9 to your computer and use it in GitHub Desktop.
Adding Url.relative string to UITextField.
This file contains 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
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