From 69e87e659eb483a6e7b9554dc39ff0167bbc7e99 Mon Sep 17 00:00:00 2001 From: wade-hawk Date: Sun, 1 Mar 2020 20:47:09 +0900 Subject: [PATCH] dismissPhotoPicker(withTLPHAssets:) delegate function rollback --- TLPhotoPicker.podspec | 2 +- TLPhotoPicker/Classes/TLPhotosPickerViewController.swift | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/TLPhotoPicker.podspec b/TLPhotoPicker.podspec index 9b72f4b8..7a186b12 100644 --- a/TLPhotoPicker.podspec +++ b/TLPhotoPicker.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'TLPhotoPicker' - s.version = '2.0.8' + s.version = '2.0.11' s.summary = 'multiple phassets picker for iOS lib. like facebook' # This description is used to generate tags and improve search results. diff --git a/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift b/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift index 310fa5a9..5d043f07 100644 --- a/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift +++ b/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift @@ -13,6 +13,7 @@ import MobileCoreServices public protocol TLPhotosPickerViewControllerDelegate: class { func dismissPhotoPicker(withPHAssets: [PHAsset]) + func dismissPhotoPicker(withTLPHAssets: [TLPHAsset]) func shouldDismissPhotoPicker(withTLPHAssets: [TLPHAsset]) -> Bool func dismissComplete() func photoPickerDidCancel() @@ -25,6 +26,7 @@ public protocol TLPhotosPickerViewControllerDelegate: class { extension TLPhotosPickerViewControllerDelegate { public func deninedAuthoization() { } public func dismissPhotoPicker(withPHAssets: [PHAsset]) { } + public func dismissPhotoPicker(withTLPHAssets: [TLPHAsset]) { } public func shouldDismissPhotoPicker(withTLPHAssets: [TLPHAsset]) -> Bool { return true } public func dismissComplete() { } public func photoPickerDidCancel() { } @@ -508,6 +510,7 @@ extension TLPhotosPickerViewController { #else self.delegate?.dismissPhotoPicker(withPHAssets: self.selectedAssets.flatMap{ $0.phAsset }) #endif + self.delegate?.dismissPhotoPicker(withTLPHAssets: self.selectedAssets) shouldDismiss = self.delegate?.shouldDismissPhotoPicker(withTLPHAssets: self.selectedAssets) ?? true self.completionWithTLPHAssets?(self.selectedAssets) #if swift(>=4.1)