diff --git a/Package.swift b/Package.swift new file mode 100644 index 00000000..894defe8 --- /dev/null +++ b/Package.swift @@ -0,0 +1,31 @@ +// swift-tools-version:5.3 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "TLPhotoPicker", + platforms: [ + .iOS(.v10) + ], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "TLPhotoPicker", + targets: ["TLPhotoPicker"] + ), + ], + targets: [ + .target( + name: "TLPhotoPicker", + path: "TLPhotoPicker", + exclude: ["Classes/TLBundle.swift"], + resources: [ + .process("TLPhotoPicker/Classes/TLCollectionTableViewCell.xib"), + .process("TLPhotoPicker/Classes/TLPhotoCollectionViewCell.xib"), + .process("TLPhotoPicker/Classes/TLPhotosPickerViewController.xib"), + .process("TLPhotoPicker/Assets.xcassets") + ] + ) + ] +) diff --git a/README.md b/README.md index 10625d2d..5fb1ef35 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,16 @@ Specify TLPhotoPicker into your project's Cartfile: github "tilltue/TLPhotoPicker" ``` +### Swift Package Manager + +The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It is in early development, but TLPhotoPicker does support its use on supported platforms. + +Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the dependencies value of your Package.swift. + +dependencies: [ + .package(url: "https://github.com/tilltue/TLPhotoPicker.git", .upToNextMajor(from: "2.1.0")) +] + > Don't forget the Privacy Description in `info.plist`. diff --git a/TLPhotoPicker.podspec b/TLPhotoPicker.podspec index f7609580..26ff6f50 100644 --- a/TLPhotoPicker.podspec +++ b/TLPhotoPicker.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'TLPhotoPicker' - s.version = '2.0.12' + s.version = '2.1.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/Assets.xcassets/Contents.json b/TLPhotoPicker/Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/TLPhotoPicker/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TLPhotoPicker/Assets.xcassets/arrow.imageset/Contents.json b/TLPhotoPicker/Assets.xcassets/arrow.imageset/Contents.json new file mode 100644 index 00000000..4ce84168 --- /dev/null +++ b/TLPhotoPicker/Assets.xcassets/arrow.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "arrow.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TLPhotoPicker/Assets.xcassets/arrow.imageset/arrow.png b/TLPhotoPicker/Assets.xcassets/arrow.imageset/arrow.png new file mode 100644 index 00000000..94910cf0 Binary files /dev/null and b/TLPhotoPicker/Assets.xcassets/arrow.imageset/arrow.png differ diff --git a/TLPhotoPicker/Assets.xcassets/camera.imageset/Contents.json b/TLPhotoPicker/Assets.xcassets/camera.imageset/Contents.json new file mode 100644 index 00000000..d5ba6f34 --- /dev/null +++ b/TLPhotoPicker/Assets.xcassets/camera.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "camera@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TLPhotoPicker/Assets.xcassets/camera.imageset/camera@3x.png b/TLPhotoPicker/Assets.xcassets/camera.imageset/camera@3x.png new file mode 100644 index 00000000..2c7ebe0c Binary files /dev/null and b/TLPhotoPicker/Assets.xcassets/camera.imageset/camera@3x.png differ diff --git a/TLPhotoPicker/Assets.xcassets/insertPhotoMaterial.imageset/Contents.json b/TLPhotoPicker/Assets.xcassets/insertPhotoMaterial.imageset/Contents.json new file mode 100644 index 00000000..1cd723ea --- /dev/null +++ b/TLPhotoPicker/Assets.xcassets/insertPhotoMaterial.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "insertPhotoMaterial@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TLPhotoPicker/Assets.xcassets/insertPhotoMaterial.imageset/insertPhotoMaterial@3x.png b/TLPhotoPicker/Assets.xcassets/insertPhotoMaterial.imageset/insertPhotoMaterial@3x.png new file mode 100644 index 00000000..19a86569 Binary files /dev/null and b/TLPhotoPicker/Assets.xcassets/insertPhotoMaterial.imageset/insertPhotoMaterial@3x.png differ diff --git a/TLPhotoPicker/Assets.xcassets/pop_arrow.imageset/Contents.json b/TLPhotoPicker/Assets.xcassets/pop_arrow.imageset/Contents.json new file mode 100644 index 00000000..3bf716a8 --- /dev/null +++ b/TLPhotoPicker/Assets.xcassets/pop_arrow.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "pop_arrow.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TLPhotoPicker/Assets.xcassets/pop_arrow.imageset/pop_arrow.png b/TLPhotoPicker/Assets.xcassets/pop_arrow.imageset/pop_arrow.png new file mode 100644 index 00000000..220d39e6 Binary files /dev/null and b/TLPhotoPicker/Assets.xcassets/pop_arrow.imageset/pop_arrow.png differ diff --git a/TLPhotoPicker/Assets.xcassets/video.imageset/Contents.json b/TLPhotoPicker/Assets.xcassets/video.imageset/Contents.json new file mode 100644 index 00000000..2fcdce34 --- /dev/null +++ b/TLPhotoPicker/Assets.xcassets/video.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "video.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TLPhotoPicker/Assets.xcassets/video.imageset/video.png b/TLPhotoPicker/Assets.xcassets/video.imageset/video.png new file mode 100644 index 00000000..68268fb1 Binary files /dev/null and b/TLPhotoPicker/Assets.xcassets/video.imageset/video.png differ diff --git a/TLPhotoPicker/Classes/TLBundle.swift b/TLPhotoPicker/Classes/TLBundle.swift index dca3da27..46f23ea3 100644 --- a/TLPhotoPicker/Classes/TLBundle.swift +++ b/TLPhotoPicker/Classes/TLBundle.swift @@ -6,14 +6,14 @@ // // -import Foundation +import UIKit open class TLBundle { open class func podBundleImage(named: String) -> UIImage? { let podBundle = Bundle(for: TLBundle.self) if let url = podBundle.url(forResource: "TLPhotoPickerController", withExtension: "bundle") { let bundle = Bundle(url: url) - return UIImage(named: named, in: bundle, compatibleWith: nil)! + return UIImage(named: named, in: bundle, compatibleWith: nil) } return nil } diff --git a/TLPhotoPicker/Classes/TLCollectionTableViewCell.xib b/TLPhotoPicker/Classes/TLCollectionTableViewCell.xib index 7eab2b77..e8c682c2 100644 --- a/TLPhotoPicker/Classes/TLCollectionTableViewCell.xib +++ b/TLPhotoPicker/Classes/TLCollectionTableViewCell.xib @@ -1,15 +1,15 @@ - + - + - + @@ -24,16 +24,16 @@ - +