Added dispatch.async.. Should update text field.
This commit is contained in:
parent
dc7848120c
commit
898cb3f65b
|
@ -46,7 +46,12 @@ class ViewController: UIViewController, UINavigationControllerDelegate, UIImageP
|
||||||
imagePickerController.dismiss(animated: true, completion: nil)
|
imagePickerController.dismiss(animated: true, completion: nil)
|
||||||
imageView.image = info[UIImagePickerControllerOriginalImage] as? UIImage
|
imageView.image = info[UIImagePickerControllerOriginalImage] as? UIImage
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func setTextInField(path: String) {
|
||||||
|
dcavTextField.text = path
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@IBAction func onSaveButton(_ sender: Any) {
|
@IBAction func onSaveButton(_ sender: Any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,8 +81,9 @@ class ViewController: UIViewController, UINavigationControllerDelegate, UIImageP
|
||||||
}
|
}
|
||||||
self.responseString = String(data: data, encoding: .utf8)!
|
self.responseString = String(data: data, encoding: .utf8)!
|
||||||
print("responseString = \(String(describing: self.responseString))")
|
print("responseString = \(String(describing: self.responseString))")
|
||||||
|
DispatchQueue.main.async() {
|
||||||
self.dcavTextField.text = "https://dcav.pw/\(String(describing: self.labell.text![(self.labell.text!.startIndex)]))\(String(describing: self.responseString!))"
|
self.setTextInField(path: "https://dcav.pw/\(String(describing: self.labell.text![(self.labell.text!.startIndex)]))\(String(describing: self.responseString!))")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task.resume()
|
task.resume()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user