Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/ios.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarinofaggiana <marino@marinofaggiana.com>2019-09-26 10:32:28 +0300
committermarinofaggiana <marino@marinofaggiana.com>2019-09-26 10:32:28 +0300
commit185580f085ddcce2af4c87a1d020640f0dd3372b (patch)
tree0e7fc5ba16d1efbc44cb37995cc3debeba6358e2 /Carthage
parent5da5e0599349ae0d5ea3d3e5971d53c63a181054 (diff)
#944
Diffstat (limited to 'Carthage')
-rw-r--r--Carthage/Checkouts/Sheeeeeeeeet/Fastlane/Fastfile2
-rw-r--r--Carthage/Checkouts/Sheeeeeeeeet/Sheeeeeeeeet.podspec2
-rw-r--r--Carthage/Checkouts/Sheeeeeeeeet/Sheeeeeeeeet/Info.plist2
-rw-r--r--Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker.podspec2
-rw-r--r--Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLAlbumPopView.swift14
-rw-r--r--Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLCollectionTableViewCell.swift12
-rw-r--r--Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotoLibrary.swift15
-rw-r--r--Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift38
8 files changed, 78 insertions, 9 deletions
diff --git a/Carthage/Checkouts/Sheeeeeeeeet/Fastlane/Fastfile b/Carthage/Checkouts/Sheeeeeeeeet/Fastlane/Fastfile
index fd4ffeb99..c28652141 100644
--- a/Carthage/Checkouts/Sheeeeeeeeet/Fastlane/Fastfile
+++ b/Carthage/Checkouts/Sheeeeeeeeet/Fastlane/Fastfile
@@ -25,6 +25,8 @@ platform :ios do
git_commit(
path: [
+ "Sheeeeeeeeet/Info.plist",
+ "SheeeeeeeeetDemo/Info.plist",
"Sheeeeeeeeet.podspec",
"Fastlane/"
],
diff --git a/Carthage/Checkouts/Sheeeeeeeeet/Sheeeeeeeeet.podspec b/Carthage/Checkouts/Sheeeeeeeeet/Sheeeeeeeeet.podspec
index 18e539db8..acf8209ba 100644
--- a/Carthage/Checkouts/Sheeeeeeeeet/Sheeeeeeeeet.podspec
+++ b/Carthage/Checkouts/Sheeeeeeeeet/Sheeeeeeeeet.podspec
@@ -2,7 +2,7 @@
Pod::Spec.new do |s|
s.name = 'Sheeeeeeeeet'
- s.version = '2.1.1'
+ s.version = '2.1.4'
s.summary = 'Sheeeeeeeeet is a Swift library for custom iOS action sheets.'
s.description = <<-DESC
diff --git a/Carthage/Checkouts/Sheeeeeeeeet/Sheeeeeeeeet/Info.plist b/Carthage/Checkouts/Sheeeeeeeeet/Sheeeeeeeeet/Info.plist
index c0701a3d7..303ddae0c 100644
--- a/Carthage/Checkouts/Sheeeeeeeeet/Sheeeeeeeeet/Info.plist
+++ b/Carthage/Checkouts/Sheeeeeeeeet/Sheeeeeeeeet/Info.plist
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>$(MARKETING_VERSION)</string>
+ <string>2.1.4</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSPrincipalClass</key>
diff --git a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker.podspec b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker.podspec
index 74e696d0d..f5d03c49d 100644
--- a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker.podspec
+++ b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker.podspec
@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = 'TLPhotoPicker'
- s.version = '1.9.7'
+ s.version = '2.0.0'
s.summary = 'multiple phassets picker for iOS lib. like facebook'
# This description is used to generate tags and improve search results.
diff --git a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLAlbumPopView.swift b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLAlbumPopView.swift
index 9fce3d13e..cca639ea7 100644
--- a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLAlbumPopView.swift
+++ b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLAlbumPopView.swift
@@ -64,6 +64,20 @@ open class TLAlbumPopView: UIView,PopupViewProtocol {
// print("deinit TLAlbumPopView")
}
+ open override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
+ super.traitCollectionDidChange(previousTraitCollection)
+ if
+ #available(iOS 13.0, *),
+ let userInterfaceStyle = previousTraitCollection?.userInterfaceStyle
+ {
+ if userInterfaceStyle.rawValue == 2 {
+ self.popupView.backgroundColor = UIColor.systemBackground
+ }else {
+ self.popupView.backgroundColor = UIColor.white
+ }
+ }
+ }
+
override open func awakeFromNib() {
super.awakeFromNib()
self.popupView.layer.cornerRadius = 5.0
diff --git a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLCollectionTableViewCell.swift b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLCollectionTableViewCell.swift
index 66639d40a..dca0fc634 100644
--- a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLCollectionTableViewCell.swift
+++ b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLCollectionTableViewCell.swift
@@ -19,4 +19,16 @@ open class TLCollectionTableViewCell: UITableViewCell {
self.thumbImageView.accessibilityIgnoresInvertColors = true
}
}
+
+ open override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
+ super.traitCollectionDidChange(previousTraitCollection)
+ if #available(iOS 12.0, *) {
+ let userInterfaceStyle = traitCollection.userInterfaceStyle
+ if userInterfaceStyle.rawValue == 2 {
+ self.contentView.backgroundColor = .black
+ }else {
+ self.contentView.backgroundColor = .white
+ }
+ }
+ }
}
diff --git a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotoLibrary.swift b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotoLibrary.swift
index b437e2734..ab4685484 100644
--- a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotoLibrary.swift
+++ b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotoLibrary.swift
@@ -131,9 +131,13 @@ extension PHFetchOptions {
//MARK: - Load Collection
extension TLPhotoLibrary {
func getOption(configure: TLPhotosPickerConfigure) -> PHFetchOptions {
-
- let options = configure.fetchOption ?? PHFetchOptions()
- options.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: false)]
+ let options: PHFetchOptions
+ if let fetchOption = configure.fetchOption {
+ options = fetchOption
+ }else {
+ options = PHFetchOptions()
+ options.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: false)]
+ }
if let mediaType = configure.mediaType {
let mediaPredicate = NSPredicate(format: "mediaType = %i", mediaType.rawValue)
options.merge(predicate: mediaPredicate)
@@ -179,6 +183,7 @@ extension TLPhotoLibrary {
for collection in collections {
if !result.contains(where: { $0.localIdentifier == collection.localIdentifier }) {
var assetsCollection = TLAssetsCollection(collection: collection)
+ assetsCollection.title = configure.customLocalizedTitle[assetsCollection.title] ?? assetsCollection.title
assetsCollection.fetchResult = PHAsset.fetchAssets(in: collection, options: options)
if assetsCollection.count > 0 {
result.append(assetsCollection)
@@ -202,6 +207,7 @@ extension TLPhotoLibrary {
result.contains(where: { $0.localIdentifier == collection.localIdentifier }) == false
{
var assetsCollection = TLAssetsCollection(collection: collection)
+ assetsCollection.title = configure.customLocalizedTitle[assetsCollection.title] ?? assetsCollection.title
assetsCollection.fetchResult = PHAsset.fetchAssets(in: collection, options: options)
if assetsCollection.count > 0 || useCameraButton {
result.append(assetsCollection)
@@ -232,7 +238,7 @@ extension TLPhotoLibrary {
useCameraButton: useCameraButton,
result: &assetCollections)
if var cameraRoll = camerarollCollection {
- cameraRoll.title = configure.customLoclizedTitle[cameraRoll.title] ?? cameraRoll.title
+ cameraRoll.title = configure.customLocalizedTitle[cameraRoll.title] ?? cameraRoll.title
cameraRoll.useCameraButton = useCameraButton
assetCollections[0] = cameraRoll
DispatchQueue.main.async {
@@ -259,6 +265,7 @@ extension TLPhotoLibrary {
albumsResult.enumerateObjects({ (collection, index, stop) -> Void in
guard let collection = collection as? PHAssetCollection else { return }
var assetsCollection = TLAssetsCollection(collection: collection)
+ assetsCollection.title = configure.customLocalizedTitle[assetsCollection.title] ?? assetsCollection.title
assetsCollection.fetchResult = PHAsset.fetchAssets(in: collection, options: options)
if assetsCollection.count > 0, !assetCollections.contains(where: { $0.localIdentifier == collection.localIdentifier }) {
assetCollections.append(assetsCollection)
diff --git a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift
index 5ff0cc10b..270fe5ff1 100644
--- a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift
+++ b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift
@@ -50,7 +50,7 @@ extension TLPhotosPickerLogDelegate {
}
public struct TLPhotosPickerConfigure {
- public var customLoclizedTitle: [String: String] = ["Camera Roll": "Camera Roll"]
+ public var customLocalizedTitle: [String: String] = ["Camera Roll": "Camera Roll"]
public var tapHereToChange = "Tap here to change"
public var cancelTitle = "Cancel"
public var doneTitle = "Done"
@@ -219,6 +219,23 @@ open class TLPhotosPickerViewController: UIViewController {
return self.configure.supportedInterfaceOrientations
}
+ open override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
+ super.traitCollectionDidChange(previousTraitCollection)
+ if #available(iOS 13.0, *) {
+ let userInterfaceStyle = traitCollection.userInterfaceStyle
+ let image = TLBundle.podBundleImage(named: "pop_arrow")
+ if userInterfaceStyle.rawValue == 2 {
+ self.popArrowImageView.image = image?.colorMask(color: .systemBackground)
+ self.view.backgroundColor = .black
+ self.collectionView.backgroundColor = .black
+ }else {
+ self.popArrowImageView.image = image?.colorMask(color: .white)
+ self.view.backgroundColor = .white
+ self.collectionView.backgroundColor = .white
+ }
+ }
+ }
+
override open func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
self.stopPlay()
@@ -342,7 +359,7 @@ extension TLPhotosPickerViewController {
self.indicator.startAnimating()
let tapGesture = UITapGestureRecognizer(target: self, action: #selector(titleTap))
self.titleView.addGestureRecognizer(tapGesture)
- self.titleLabel.text = self.configure.customLoclizedTitle["Camera Roll"]
+ self.titleLabel.text = self.configure.customLocalizedTitle["Camera Roll"]
self.subTitleLabel.text = self.configure.tapHereToChange
self.cancelButton.title = self.configure.cancelTitle
self.doneButton.title = self.configure.doneTitle
@@ -1118,3 +1135,20 @@ extension Array where Element == PopupConfigure {
return result
}
}
+
+extension UIImage {
+ public func colorMask(color:UIColor) -> UIImage {
+ var result: UIImage?
+ let rect = CGRect(x:0, y:0, width:size.width, height:size.height)
+ UIGraphicsBeginImageContextWithOptions(rect.size, false, scale)
+ if let c = UIGraphicsGetCurrentContext() {
+ self.draw(in: rect)
+ c.setFillColor(color.cgColor)
+ c.setBlendMode(.sourceAtop)
+ c.fill(rect)
+ result = UIGraphicsGetImageFromCurrentImageContext()
+ }
+ UIGraphicsEndImageContext()
+ return result ?? self
+ }
+}