From 2974ccc4d9fdc79febfe4068d0351f02421f6d8f Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Sun, 10 Mar 2019 20:21:17 +0100 Subject: [PATCH] - Fix editor dismiss picker --- Example/Podfile.lock | 4 ++-- .../PNImagePickerViewController.podspec.json | 4 ++-- Example/Pods/Manifest.lock | 4 ++-- PNImagePickerViewController.podspec | 2 +- Pod/Classes/PNImagePickerViewController.m | 9 +++++---- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 121f95f..67a0a17 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -24,7 +24,7 @@ PODS: - FBSnapshotTestCase/Core (~> 2.0) - Specta (~> 1.0) - FBSnapshotTestCase/Core (2.1.4) - - PNImagePickerViewController (1.0): + - PNImagePickerViewController (1.0.2): - CLImageEditor/AllTools - DGActivityIndicatorView - PureLayout @@ -58,7 +58,7 @@ SPEC CHECKSUMS: Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5 "Expecta+Snapshots": dcff217eef506dabd6dfdc7864ea2da321fafbb8 FBSnapshotTestCase: 094f9f314decbabe373b87cc339bea235a63e07a - PNImagePickerViewController: 38f4dff617354431e0b6071a52bd3136b79e3ef3 + PNImagePickerViewController: 418255d2d3b65cc52d9a47f891a831e8c9d11d6f PureLayout: f08c01b8dec00bb14a1fefa3de4c7d9c265df85e Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66 diff --git a/Example/Pods/Local Podspecs/PNImagePickerViewController.podspec.json b/Example/Pods/Local Podspecs/PNImagePickerViewController.podspec.json index 108f62a..d9d5fb1 100644 --- a/Example/Pods/Local Podspecs/PNImagePickerViewController.podspec.json +++ b/Example/Pods/Local Podspecs/PNImagePickerViewController.podspec.json @@ -1,6 +1,6 @@ { "name": "PNImagePickerViewController", - "version": "1.0", + "version": "1.0.2", "summary": "PNImagePickerViewController is a fork of jacobsieradzki/JSImagePickerController with iOS8+ PhotoKit support.", "homepage": "https://github.com/giuseppenucifora/PNImagePickerViewController", "license": "MIT", @@ -9,7 +9,7 @@ }, "source": { "git": "https://github.com/giuseppenucifora/PNImagePickerViewController.git", - "tag": "1.0" + "tag": "1.0.2" }, "platforms": { "ios": "8.0" diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 121f95f..67a0a17 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -24,7 +24,7 @@ PODS: - FBSnapshotTestCase/Core (~> 2.0) - Specta (~> 1.0) - FBSnapshotTestCase/Core (2.1.4) - - PNImagePickerViewController (1.0): + - PNImagePickerViewController (1.0.2): - CLImageEditor/AllTools - DGActivityIndicatorView - PureLayout @@ -58,7 +58,7 @@ SPEC CHECKSUMS: Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5 "Expecta+Snapshots": dcff217eef506dabd6dfdc7864ea2da321fafbb8 FBSnapshotTestCase: 094f9f314decbabe373b87cc339bea235a63e07a - PNImagePickerViewController: 38f4dff617354431e0b6071a52bd3136b79e3ef3 + PNImagePickerViewController: 418255d2d3b65cc52d9a47f891a831e8c9d11d6f PureLayout: f08c01b8dec00bb14a1fefa3de4c7d9c265df85e Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66 diff --git a/PNImagePickerViewController.podspec b/PNImagePickerViewController.podspec index 4368347..d7b13ea 100644 --- a/PNImagePickerViewController.podspec +++ b/PNImagePickerViewController.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = "PNImagePickerViewController" - s.version = "1.0.1" + s.version = "1.0.2" s.summary = "PNImagePickerViewController is a fork of jacobsieradzki/JSImagePickerController with iOS8+ PhotoKit support." # This description is used to generate tags and improve search results. diff --git a/Pod/Classes/PNImagePickerViewController.m b/Pod/Classes/PNImagePickerViewController.m index 33d223a..26f9840 100644 --- a/Pod/Classes/PNImagePickerViewController.m +++ b/Pod/Classes/PNImagePickerViewController.m @@ -551,11 +551,12 @@ - (void)imageEditor:(CLImageEditor*)editor didFinishEditingWithImage:(UIImage*)image { - if ([delegate respondsToSelector:@selector(imagePicker:didSelectImage:)]) { - [delegate imagePicker:self didSelectImage:image]; - } - [self dismissAnimated:YES]; + [editor dismissViewControllerAnimated:YES completion:^{ + if ([self->delegate respondsToSelector:@selector(imagePicker:didSelectImage:)]) { + [self->delegate imagePicker:self didSelectImage:image]; + } + }]; } @end