Skip to content

Commit

Permalink
adding configure options allowedAlbumCloudShared
Browse files Browse the repository at this point in the history
  • Loading branch information
tilltue committed Jul 24, 2018
1 parent 28472c9 commit 717725f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Example/TLPhotoPicker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = "<group>"; };
83E119F9CCBD6D384998CB57 /* Pods_TLPhotoPicker_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TLPhotoPicker_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
AED71020F992B2D2D76C0DCD /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
DF35E7F382136F073D03D766 /* TLPhotoPicker.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = TLPhotoPicker.podspec; path = ../TLPhotoPicker.podspec; sourceTree = "<group>"; };
DF35E7F382136F073D03D766 /* TLPhotoPicker.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = TLPhotoPicker.podspec; path = ../TLPhotoPicker.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
F047F54580DD32436AB0F8F6 /* Pods-TLPhotoPicker_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TLPhotoPicker_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TLPhotoPicker_Example/Pods-TLPhotoPicker_Example.debug.xcconfig"; sourceTree = "<group>"; };
FF774390FCDE758A51AF70EF /* Pods-TLPhotoPicker_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TLPhotoPicker_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-TLPhotoPicker_Example/Pods-TLPhotoPicker_Example.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ public struct TLPhotosPickerConfigure {
public var usedPrefetch = false
public var allowedLivePhotos = true
public var allowedVideo = true
public var allowedAlbumCloudShared = false
public var allowedVideoRecording = true //for camera : allow this option when you want to recording video.
public var recordingVideoQuality: UIImagePickerControllerQualityType = .typeMedium //for camera : recording video quality
public var maxVideoDuration:TimeInterval? = nil //for camera : max video recording duration
Expand Down
2 changes: 1 addition & 1 deletion TLPhotoPicker.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'TLPhotoPicker'
s.version = '1.7.1'
s.version = '1.7.2'
s.summary = 'multiple phassets picker for iOS lib. like facebook'

# This description is used to generate tags and improve search results.
Expand Down
6 changes: 3 additions & 3 deletions TLPhotoPicker/Classes/TLPhotoLibrary.swift
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ extension TLPhotoLibrary {
func getAlbum(subType: PHAssetCollectionSubtype, result: inout [TLAssetsCollection]) {
let fetchCollection = PHAssetCollection.fetchAssetCollections(with: .album, subtype: subType, options: nil)
var collections = [PHAssetCollection]()
fetchCollection.enumerateObjects { (collection, index, _) in
//Why this? : Can't getting image for cloud shared album
if collection.assetCollectionSubtype != .albumCloudShared {
fetchCollection.enumerateObjects { (collection, index, _) in
if configure.allowedAlbumCloudShared == false && collection.assetCollectionSubtype == .albumCloudShared {
}else {
collections.append(collection)
}
}
Expand Down
1 change: 1 addition & 0 deletions TLPhotoPicker/Classes/TLPhotosPickerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public struct TLPhotosPickerConfigure {
public var usedPrefetch = false
public var allowedLivePhotos = true
public var allowedVideo = true
public var allowedAlbumCloudShared = false
public var allowedVideoRecording = true
public var recordingVideoQuality: UIImagePickerControllerQualityType = .typeMedium
public var maxVideoDuration:TimeInterval? = nil
Expand Down

0 comments on commit 717725f

Please sign in to comment.