From 8269c234ad9e88873a36bb931078918bc9e3b8a1 Mon Sep 17 00:00:00 2001 From: tilltue Date: Thu, 26 Sep 2019 23:48:47 +0900 Subject: [PATCH] Bug Fixed: #219 --- TLPhotoPicker.podspec | 2 +- TLPhotoPicker/Classes/TLAlbumPopView.swift | 10 ++++------ TLPhotoPicker/Classes/TLCollectionTableViewCell.swift | 6 +++--- .../Classes/TLPhotosPickerViewController.swift | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/TLPhotoPicker.podspec b/TLPhotoPicker.podspec index f5d03c49..39d4dc12 100644 --- a/TLPhotoPicker.podspec +++ b/TLPhotoPicker.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'TLPhotoPicker' - s.version = '2.0.0' + s.version = '2.0.1' 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/TLAlbumPopView.swift b/TLPhotoPicker/Classes/TLAlbumPopView.swift index cca639ea..3352afac 100644 --- a/TLPhotoPicker/Classes/TLAlbumPopView.swift +++ b/TLPhotoPicker/Classes/TLAlbumPopView.swift @@ -66,14 +66,12 @@ open class TLAlbumPopView: UIView,PopupViewProtocol { open override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { super.traitCollectionDidChange(previousTraitCollection) - if - #available(iOS 13.0, *), - let userInterfaceStyle = previousTraitCollection?.userInterfaceStyle - { + if #available(iOS 13.0, *) { + let userInterfaceStyle = self.traitCollection.userInterfaceStyle if userInterfaceStyle.rawValue == 2 { - self.popupView.backgroundColor = UIColor.systemBackground + self.popupView.backgroundColor = .systemBackground }else { - self.popupView.backgroundColor = UIColor.white + self.popupView.backgroundColor = .white } } } diff --git a/TLPhotoPicker/Classes/TLCollectionTableViewCell.swift b/TLPhotoPicker/Classes/TLCollectionTableViewCell.swift index dca0fc63..b60fec66 100644 --- a/TLPhotoPicker/Classes/TLCollectionTableViewCell.swift +++ b/TLPhotoPicker/Classes/TLCollectionTableViewCell.swift @@ -22,10 +22,10 @@ open class TLCollectionTableViewCell: UITableViewCell { open override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { super.traitCollectionDidChange(previousTraitCollection) - if #available(iOS 12.0, *) { - let userInterfaceStyle = traitCollection.userInterfaceStyle + if #available(iOS 13.0, *) { + let userInterfaceStyle = self.traitCollection.userInterfaceStyle if userInterfaceStyle.rawValue == 2 { - self.contentView.backgroundColor = .black + self.contentView.backgroundColor = .systemBackground }else { self.contentView.backgroundColor = .white } diff --git a/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift b/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift index 270fe5ff..04a1aae9 100644 --- a/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift +++ b/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift @@ -222,7 +222,7 @@ open class TLPhotosPickerViewController: UIViewController { open override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { super.traitCollectionDidChange(previousTraitCollection) if #available(iOS 13.0, *) { - let userInterfaceStyle = traitCollection.userInterfaceStyle + let userInterfaceStyle = self.traitCollection.userInterfaceStyle let image = TLBundle.podBundleImage(named: "pop_arrow") if userInterfaceStyle.rawValue == 2 { self.popArrowImageView.image = image?.colorMask(color: .systemBackground)