Added automatic copying of data to clipboard
This commit is contained in:
parent
b56924322c
commit
548b560582
|
@ -17,6 +17,7 @@ class ViewController: UIViewController, UINavigationControllerDelegate, UIImageP
|
|||
var responseString : String!
|
||||
@IBOutlet weak var uploadProgressBar: UIProgressView!
|
||||
@IBOutlet weak var savedPhotoImageView: UIImageView!
|
||||
let pasteBoard = UIPasteboard.general
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
@ -46,6 +47,7 @@ class ViewController: UIViewController, UINavigationControllerDelegate, UIImageP
|
|||
|
||||
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
|
||||
imagePickerController.dismiss(animated: true, completion: nil)
|
||||
imageView.contentMode = .scaleAspectFit
|
||||
imageView.image = info[UIImagePickerControllerOriginalImage] as? UIImage
|
||||
}
|
||||
|
||||
|
@ -82,10 +84,10 @@ class ViewController: UIViewController, UINavigationControllerDelegate, UIImageP
|
|||
self.responseString = String(data: data, encoding: .utf8)!
|
||||
print("responseString = \(String(describing: self.responseString))")
|
||||
DispatchQueue.main.async() {
|
||||
self.setTextInField(path: "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!))")
|
||||
self.pasteBoard.string = self.dcavTextField.text!
|
||||
}
|
||||
}
|
||||
|
||||
task.resume()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user