From e4738a306ed48ec6e52efae44ba39cd6b6625517 Mon Sep 17 00:00:00 2001 From: Alexander Munch-hansen Date: Tue, 1 Aug 2017 13:38:18 +0200 Subject: [PATCH 1/4] Added ability to save photo and made an animation for it --- dcav-uploader.xcodeproj/project.pbxproj | 11 +++++++-- dcav-uploader/Assets.xcassets/Contents.json | 6 +++++ .../savedImage.imageset/Contents.json | 21 ++++++++++++++++++ .../savedImage.imageset/saved_image.png | Bin 0 -> 17564 bytes dcav-uploader/Base.lproj/Main.storyboard | 10 ++++++++- dcav-uploader/Info.plist | 8 +++---- dcav-uploader/ViewController.swift | 15 +++++++++++++ 7 files changed, 64 insertions(+), 7 deletions(-) create mode 100644 dcav-uploader/Assets.xcassets/Contents.json create mode 100644 dcav-uploader/Assets.xcassets/savedImage.imageset/Contents.json create mode 100644 dcav-uploader/Assets.xcassets/savedImage.imageset/saved_image.png diff --git a/dcav-uploader.xcodeproj/project.pbxproj b/dcav-uploader.xcodeproj/project.pbxproj index a1be6b7..c430cbe 100644 --- a/dcav-uploader.xcodeproj/project.pbxproj +++ b/dcav-uploader.xcodeproj/project.pbxproj @@ -149,6 +149,7 @@ TargetAttributes = { ACAAF0011F2F93C600271C26 = { CreatedOnToolsVersion = 8.3.3; + DevelopmentTeam = HU6WPE737K; ProvisioningStyle = Automatic; }; ACAAF0151F2F93C600271C26 = { @@ -345,11 +346,14 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEVELOPMENT_TEAM = HU6WPE737K; INFOPLIST_FILE = "dcav-uploader/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "space.guava.dcav-uploader"; + PRODUCT_BUNDLE_IDENTIFIER = "space.guava-"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 3.0; }; name = Debug; @@ -358,11 +362,14 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEVELOPMENT_TEAM = HU6WPE737K; INFOPLIST_FILE = "dcav-uploader/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "space.guava.dcav-uploader"; + PRODUCT_BUNDLE_IDENTIFIER = "space.guava-"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 3.0; }; name = Release; diff --git a/dcav-uploader/Assets.xcassets/Contents.json b/dcav-uploader/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/dcav-uploader/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/dcav-uploader/Assets.xcassets/savedImage.imageset/Contents.json b/dcav-uploader/Assets.xcassets/savedImage.imageset/Contents.json new file mode 100644 index 0000000..acb6c00 --- /dev/null +++ b/dcav-uploader/Assets.xcassets/savedImage.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "saved_image.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/dcav-uploader/Assets.xcassets/savedImage.imageset/saved_image.png b/dcav-uploader/Assets.xcassets/savedImage.imageset/saved_image.png new file mode 100644 index 0000000000000000000000000000000000000000..d291a833e63a7daba52f8777ce73aea6606b509d GIT binary patch literal 17564 zcmeIaRa}#Q{5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ey!0?JsiT^Hu=#C&O$YI7L;?G(^Fg?JAN_TkE z|Cl}N_og7wzsd23@$cCG8Qect`xj*Xh1Y+H - + @@ -76,6 +76,10 @@ + @@ -88,6 +92,7 @@ + @@ -118,4 +123,7 @@ + + + diff --git a/dcav-uploader/Info.plist b/dcav-uploader/Info.plist index 4102788..4ab9e43 100644 --- a/dcav-uploader/Info.plist +++ b/dcav-uploader/Info.plist @@ -20,6 +20,10 @@ 1 LSRequiresIPhoneOS + NSCameraUsageDescription + Need to access camera lol + NSPhotoLibraryUsageDescription + Plz give access UILaunchStoryboardName LaunchScreen UIMainStoryboardFile @@ -39,9 +43,5 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - NSPhotoLibraryUsageDescription - Plz give access - NSCameraUsageDescription - Need to access camera lol diff --git a/dcav-uploader/ViewController.swift b/dcav-uploader/ViewController.swift index d241865..acff9ff 100644 --- a/dcav-uploader/ViewController.swift +++ b/dcav-uploader/ViewController.swift @@ -16,6 +16,7 @@ class ViewController: UIViewController, UINavigationControllerDelegate, UIImageP @IBOutlet weak var dcavTextField: UITextField! var responseString : String! @IBOutlet weak var uploadProgressBar: UIProgressView! + @IBOutlet weak var savedPhotoImageView: UIImageView! override func viewDidLoad() { super.viewDidLoad() @@ -53,6 +54,20 @@ class ViewController: UIViewController, UINavigationControllerDelegate, UIImageP } @IBAction func onSaveButton(_ sender: Any) { + UIImageWriteToSavedPhotosAlbum(imageView.image!, nil, nil, nil); + + UIView.animate(withDuration: 0.5, delay:0.0, options:UIViewAnimationOptions.transitionFlipFromTop, animations: { + self.savedPhotoImageView.isHidden = false + self.savedPhotoImageView.alpha = 1 + + }, completion: { finished in + UIView.animate(withDuration: 0.5, delay:1, options:UIViewAnimationOptions.transitionCrossDissolve, animations: { + self.savedPhotoImageView.alpha = 0 + + }, completion: { finished in + self.savedPhotoImageView.isHidden = true + }) + }) } @IBAction func onUploadButton(_ sender: Any) { From dba18dd5d79e501747a81ed25ff8bb53d2efdff4 Mon Sep 17 00:00:00 2001 From: Alexander Munch-hansen Date: Tue, 1 Aug 2017 13:44:48 +0200 Subject: [PATCH 2/4] Fixed animation slightly --- dcav-uploader/ViewController.swift | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dcav-uploader/ViewController.swift b/dcav-uploader/ViewController.swift index acff9ff..5f130ba 100644 --- a/dcav-uploader/ViewController.swift +++ b/dcav-uploader/ViewController.swift @@ -56,12 +56,16 @@ class ViewController: UIViewController, UINavigationControllerDelegate, UIImageP @IBAction func onSaveButton(_ sender: Any) { UIImageWriteToSavedPhotosAlbum(imageView.image!, nil, nil, nil); - UIView.animate(withDuration: 0.5, delay:0.0, options:UIViewAnimationOptions.transitionFlipFromTop, animations: { - self.savedPhotoImageView.isHidden = false + + self.savedPhotoImageView.alpha = 0 + self.savedPhotoImageView.isHidden = false + + UIView.animate(withDuration: 0.3, delay:0.0, options:UIViewAnimationOptions.transitionCrossDissolve, animations: { + self.savedPhotoImageView.alpha = 1 }, completion: { finished in - UIView.animate(withDuration: 0.5, delay:1, options:UIViewAnimationOptions.transitionCrossDissolve, animations: { + UIView.animate(withDuration: 0.3, delay:1, options:UIViewAnimationOptions.transitionCrossDissolve, animations: { self.savedPhotoImageView.alpha = 0 }, completion: { finished in From b56924322c952b53b2529d378a6657012d44e600 Mon Sep 17 00:00:00 2001 From: Alexander Munch-hansen Date: Tue, 1 Aug 2017 14:15:59 +0200 Subject: [PATCH 3/4] Changed UI a bit! --- dcav-uploader/Base.lproj/Main.storyboard | 64 +++++++++++++++++------- dcav-uploader/ViewController.swift | 42 ++++++++-------- 2 files changed, 67 insertions(+), 39 deletions(-) diff --git a/dcav-uploader/Base.lproj/Main.storyboard b/dcav-uploader/Base.lproj/Main.storyboard index b65c1d7..a002128 100644 --- a/dcav-uploader/Base.lproj/Main.storyboard +++ b/dcav-uploader/Base.lproj/Main.storyboard @@ -21,8 +21,8 @@ - diff --git a/dcav-uploader/ViewController.swift b/dcav-uploader/ViewController.swift index 5f130ba..70072ce 100644 --- a/dcav-uploader/ViewController.swift +++ b/dcav-uploader/ViewController.swift @@ -52,27 +52,6 @@ class ViewController: UIViewController, UINavigationControllerDelegate, UIImageP func setTextInField(path: String) { dcavTextField.text = path } - - @IBAction func onSaveButton(_ sender: Any) { - UIImageWriteToSavedPhotosAlbum(imageView.image!, nil, nil, nil); - - - self.savedPhotoImageView.alpha = 0 - self.savedPhotoImageView.isHidden = false - - UIView.animate(withDuration: 0.3, delay:0.0, options:UIViewAnimationOptions.transitionCrossDissolve, animations: { - - self.savedPhotoImageView.alpha = 1 - - }, completion: { finished in - UIView.animate(withDuration: 0.3, delay:1, options:UIViewAnimationOptions.transitionCrossDissolve, animations: { - self.savedPhotoImageView.alpha = 0 - - }, completion: { finished in - self.savedPhotoImageView.isHidden = true - }) - }) - } @IBAction func onUploadButton(_ sender: Any) { guard let username : String = UserDefaults.standard.string(forKey: "username_preference") else { @@ -149,6 +128,27 @@ class ViewController: UIViewController, UINavigationControllerDelegate, UIImageP return request } + @IBAction func onSaveButton(_ sender: UIButton) { + + UIImageWriteToSavedPhotosAlbum(imageView.image!, nil, nil, nil); + + self.savedPhotoImageView.alpha = 0 + self.savedPhotoImageView.isHidden = false + + UIView.animate(withDuration: 0.3, delay:0.0, options:UIViewAnimationOptions.transitionCrossDissolve, animations: { + + self.savedPhotoImageView.alpha = 1 + + }, completion: { finished in + UIView.animate(withDuration: 0.3, delay:1, options:UIViewAnimationOptions.transitionCrossDissolve, animations: { + self.savedPhotoImageView.alpha = 0 + + }, completion: { finished in + self.savedPhotoImageView.isHidden = true + }) + }) + } + //MARK:Update progress bar func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) { uploadProgressBar.progress = Float(totalBytesSent) / Float(totalBytesExpectedToSend) From 548b5605827d46ae0d5d8cfde3ba637d1c83734b Mon Sep 17 00:00:00 2001 From: Alexander Munch-hansen Date: Tue, 1 Aug 2017 14:39:45 +0200 Subject: [PATCH 4/4] Added automatic copying of data to clipboard --- dcav-uploader/ViewController.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dcav-uploader/ViewController.swift b/dcav-uploader/ViewController.swift index 70072ce..a26db80 100644 --- a/dcav-uploader/ViewController.swift +++ b/dcav-uploader/ViewController.swift @@ -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() }