Automatically copy any url in the pasteboard to the feed field for feed adds

This commit is contained in:
Maurice Parker 2019-09-02 15:54:49 -05:00
parent c5fed06581
commit 93b702f170
1 changed files with 6 additions and 0 deletions

View File

@ -34,6 +34,12 @@ class AddFeedViewController: UITableViewController, AddContainerViewControllerCh
super.viewDidLoad()
if initialFeed == nil, let urlString = UIPasteboard.general.string as NSString? {
if urlString.rs_stringMayBeURL() {
initialFeed = urlString.rs_normalizedURL()
}
}
urlTextField.autocorrectionType = .no
urlTextField.autocapitalizationType = .none
urlTextField.text = initialFeed