Browse Source

Add Carthage

Marino Faggiana 6 years ago
parent
commit
b576f6bae7
84 changed files with 1864 additions and 70 deletions
  1. 1 0
      Cartfile
  2. 1 0
      Cartfile.resolved
  3. 33 0
      Carthage/Checkouts/TLPhotoPicker/.gitignore
  4. 1 0
      Carthage/Checkouts/TLPhotoPicker/.swift-version
  5. 14 0
      Carthage/Checkouts/TLPhotoPicker/.travis.yml
  6. 3 0
      Carthage/Checkouts/TLPhotoPicker/Example/.gitignore
  7. 17 0
      Carthage/Checkouts/TLPhotoPicker/Example/Podfile
  8. 10 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker.xcworkspace/contents.xcworkspacedata
  9. 46 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/AppDelegate.swift
  10. 46 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Base.lproj/LaunchScreen.xib
  11. 105 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Base.lproj/Main.storyboard
  12. 319 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/CustomCameraCell.swift
  13. 53 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/CustomCameraCell.xib
  14. 61 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/CustomCell_Instagram.swift
  15. 121 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/CustomCell_Instagram.xib
  16. 24 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/CustomPhotoPickerViewController.swift
  17. 44 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/ImagePreviewViewController.swift
  18. 39 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/ImagePreviewViewController.xib
  19. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/100.imageset/100.png
  20. 21 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/100.imageset/Contents.json
  21. 157 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Contents.json
  22. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-40.png
  23. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png
  24. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png
  25. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png
  26. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png
  27. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-72.png
  28. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png
  29. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-76.png
  30. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png
  31. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png
  32. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png
  33. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png
  34. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-Small.png
  35. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png
  36. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png
  37. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon.png
  38. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon@2x.png
  39. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/NotificationIcon@2x.png
  40. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/NotificationIcon@3x.png
  41. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/NotificationIcon~ipad.png
  42. BIN
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/NotificationIcon~ipad@2x.png
  43. 6 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/Contents.json
  44. 44 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Info.plist
  45. 174 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/PhotoCaptureDelegate.swift
  46. 44 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/PhotoPickerWithNavigationViewController.swift
  47. 77 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/PreviewView.swift
  48. 23 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/TLPhotosPicker+Extension.swift
  49. 208 0
      Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/ViewController.swift
  50. 24 0
      Carthage/Checkouts/TLPhotoPicker/Example/Tests/Info.plist
  51. 50 0
      Carthage/Checkouts/TLPhotoPicker/Example/Tests/Tests.swift
  52. BIN
      Carthage/Checkouts/TLPhotoPicker/Images/Privacy.png
  53. BIN
      Carthage/Checkouts/TLPhotoPicker/Images/custom_cameracell.gif
  54. BIN
      Carthage/Checkouts/TLPhotoPicker/Images/customcell.png
  55. BIN
      Carthage/Checkouts/TLPhotoPicker/Images/facebook_ex.gif
  56. BIN
      Carthage/Checkouts/TLPhotoPicker/Images/livephotocell.png
  57. BIN
      Carthage/Checkouts/TLPhotoPicker/Images/photocell.png
  58. BIN
      Carthage/Checkouts/TLPhotoPicker/Images/smartalbum.png
  59. BIN
      Carthage/Checkouts/TLPhotoPicker/Images/tlphotologo.png
  60. BIN
      Carthage/Checkouts/TLPhotoPicker/Images/tlphotopicker_ex.gif
  61. BIN
      Carthage/Checkouts/TLPhotoPicker/Images/videophotocell.png
  62. 19 0
      Carthage/Checkouts/TLPhotoPicker/LICENSE
  63. 43 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker.podspec
  64. 0 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/.gitkeep
  65. 0 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLAlbumPopView.swift
  66. 0 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLAssetsCollection.swift
  67. 0 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLBundle.swift
  68. 0 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLCollectionTableViewCell.swift
  69. 0 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLCollectionTableViewCell.xib
  70. 0 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotoCollectionViewCell.swift
  71. 0 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotoCollectionViewCell.xib
  72. 0 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotoLibrary.swift
  73. 0 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift
  74. 0 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotosPickerViewController.xib
  75. 24 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/TLPhotoPicker/Info.plist
  76. 0 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/TLPhotoPicker/TLPhotoPicker.h
  77. 0 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/TLPhotoPickerController.bundle/arrow.png
  78. 0 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/TLPhotoPickerController.bundle/camera@3x.png
  79. 0 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/TLPhotoPickerController.bundle/insertPhotoMaterial@3x.png
  80. 0 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/TLPhotoPickerController.bundle/pop_arrow.png
  81. 0 0
      Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/TLPhotoPickerController.bundle/video.png
  82. 10 70
      Nextcloud.xcodeproj/project.pbxproj
  83. 1 0
      iOSClient/Main/NCMainCommon.swift
  84. 1 0
      iOSClient/Main/NCPhotosPickerViewController/NCPhotosPickerViewController.swift

+ 1 - 0
Cartfile

@@ -0,0 +1 @@
+github "tilltue/TLPhotoPicker"

+ 1 - 0
Cartfile.resolved

@@ -0,0 +1 @@
+github "tilltue/TLPhotoPicker" "1.7.7"

+ 33 - 0
Carthage/Checkouts/TLPhotoPicker/.gitignore

@@ -0,0 +1,33 @@
+# OS X
+.DS_Store
+
+# Xcode
+build/
+*.pbxuser
+!default.pbxuser
+*.mode1v3
+!default.mode1v3
+*.mode2v3
+!default.mode2v3
+*.perspectivev3
+!default.perspectivev3
+xcuserdata/
+*.xccheckout
+profile
+*.moved-aside
+DerivedData
+*.hmap
+*.ipa
+
+# Bundler
+.bundle
+
+Carthage
+# We recommend against adding the Pods directory to your .gitignore. However
+# you should judge for yourself, the pros and cons are mentioned at:
+# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
+# 
+# Note: if you ignore the Pods directory, make sure to uncomment
+# `pod install` in .travis.yml
+#
+Pods/

+ 1 - 0
Carthage/Checkouts/TLPhotoPicker/.swift-version

@@ -0,0 +1 @@
+4.2

+ 14 - 0
Carthage/Checkouts/TLPhotoPicker/.travis.yml

@@ -0,0 +1,14 @@
+# references:
+# * http://www.objc.io/issue-6/travis-ci.html
+# * https://github.com/supermarin/xcpretty#usage
+
+osx_image: xcode7.3
+language: objective-c
+# cache: cocoapods
+# podfile: Example/Podfile
+# before_install:
+# - gem install cocoapods # Since Travis is not always on latest version
+# - pod install --project-directory=Example
+script:
+- set -o pipefail && xcodebuild test -workspace Example/TLPhotoPicker.xcworkspace -scheme TLPhotoPicker-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty
+- pod lib lint

+ 3 - 0
Carthage/Checkouts/TLPhotoPicker/Example/.gitignore

@@ -0,0 +1,3 @@
+Pods/
+podfile.lock
+.DS_Store

+ 17 - 0
Carthage/Checkouts/TLPhotoPicker/Example/Podfile

@@ -0,0 +1,17 @@
+use_frameworks!
+inhibit_all_warnings!
+
+platform :ios, '9.1'
+
+target 'TLPhotoPicker_Example' do
+    pod 'TLPhotoPicker', :path => '../'
+
+  target 'TLPhotoPicker_Tests' do
+    inherit! :search_paths
+
+    pod 'Quick'
+    pod 'Nimble'
+    pod 'FBSnapshotTestCase'
+    pod 'Nimble-Snapshots'
+  end
+end

+ 10 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "group:TLPhotoPicker.xcodeproj">
+   </FileRef>
+   <FileRef
+      location = "group:Pods/Pods.xcodeproj">
+   </FileRef>
+</Workspace>

+ 46 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/AppDelegate.swift

@@ -0,0 +1,46 @@
+//
+//  AppDelegate.swift
+//  TLPhotoPicker
+//
+//  Created by wade.hawk on 05/09/2017.
+//  Copyright (c) 2017 wade.hawk. All rights reserved.
+//
+
+import UIKit
+
+@UIApplicationMain
+class AppDelegate: UIResponder, UIApplicationDelegate {
+
+    var window: UIWindow?
+
+
+    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
+        // Override point for customization after application launch.
+        return true
+    }
+
+    func applicationWillResignActive(_ application: UIApplication) {
+        // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+        // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+    }
+
+    func applicationDidEnterBackground(_ application: UIApplication) {
+        // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+        // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+    }
+
+    func applicationWillEnterForeground(_ application: UIApplication) {
+        // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+    }
+
+    func applicationDidBecomeActive(_ application: UIApplication) {
+        // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+    }
+
+    func applicationWillTerminate(_ application: UIApplication) {
+        // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+    }
+
+
+}
+

+ 46 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Base.lproj/LaunchScreen.xib

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
+        <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB">
+            <rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="  Copyright (c) 2015 CocoaPods. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
+                    <rect key="frame" x="20" y="439" width="441" height="21"/>
+                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                    <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                    <nil key="highlightedColor"/>
+                </label>
+                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TLPhotoPicker" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
+                    <rect key="frame" x="20" y="140" width="441" height="43"/>
+                    <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
+                    <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                    <nil key="highlightedColor"/>
+                </label>
+            </subviews>
+            <color key="backgroundColor" red="0.10196078431372549" green="0.73725490196078436" blue="0.61176470588235299" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <constraints>
+                <constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
+                <constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
+                <constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
+                <constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
+                <constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
+                <constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
+            </constraints>
+            <nil key="simulatedStatusBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <point key="canvasLocation" x="548" y="455"/>
+        </view>
+    </objects>
+</document>

+ 105 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Base.lproj/Main.storyboard

@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="vXZ-lx-hvc">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <scenes>
+        <!--View Controller-->
+        <scene sceneID="ufC-wZ-h7g">
+            <objects>
+                <viewController id="vXZ-lx-hvc" customClass="ViewController" customModule="TLPhotoPicker_Example" customModuleProvider="target" sceneMemberID="viewController">
+                    <view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                        <subviews>
+                            <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="50" translatesAutoresizingMaskIntoConstraints="NO" id="3bJ-bG-tue">
+                                <rect key="frame" x="73" y="187" width="229" height="294"/>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zpy-9h-CPz">
+                                        <rect key="frame" x="0.0" y="0.0" width="229" height="36"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="20"/>
+                                        <state key="normal" title="Show Picker"/>
+                                        <connections>
+                                            <action selector="pickerButtonTap" destination="vXZ-lx-hvc" eventType="touchUpInside" id="0Q7-5M-ogn"/>
+                                        </connections>
+                                    </button>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="d6U-qB-bWX">
+                                        <rect key="frame" x="0.0" y="86" width="229" height="36"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="20"/>
+                                        <state key="normal" title="Custom CameraCell (Live)"/>
+                                        <connections>
+                                            <action selector="pickerWithCustomCameraCell" destination="vXZ-lx-hvc" eventType="touchUpInside" id="fXi-av-gMq"/>
+                                        </connections>
+                                    </button>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="icR-mj-SY4">
+                                        <rect key="frame" x="0.0" y="172" width="229" height="36"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="20"/>
+                                        <state key="normal" title="with NavigationController">
+                                            <color key="titleColor" red="0.1019607843" green="0.73725490199999999" blue="0.61176470589999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                        </state>
+                                        <connections>
+                                            <action selector="pickerWithNavigation" destination="vXZ-lx-hvc" eventType="touchUpInside" id="f8Y-zB-W7o"/>
+                                        </connections>
+                                    </button>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VP9-SK-f4B">
+                                        <rect key="frame" x="0.0" y="258" width="229" height="36"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="20"/>
+                                        <state key="normal" title="with custom rules">
+                                            <color key="titleColor" red="0.27450980390000002" green="0.31372549020000001" blue="0.37647058820000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                        </state>
+                                        <connections>
+                                            <action selector="pickerWithCustomRules" destination="vXZ-lx-hvc" eventType="touchUpInside" id="fAg-D7-tIw"/>
+                                        </connections>
+                                    </button>
+                                </subviews>
+                            </stackView>
+                            <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="u8O-io-kHd">
+                                <rect key="frame" x="137.5" y="491" width="100" height="112"/>
+                                <subviews>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="get image message" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9CM-MS-96X">
+                                        <rect key="frame" x="3" y="0.0" width="94" height="12"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="10"/>
+                                        <nil key="textColor"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="cmZ-5x-q5A">
+                                        <rect key="frame" x="0.0" y="12" width="100" height="100"/>
+                                        <constraints>
+                                            <constraint firstAttribute="width" priority="999" constant="100" id="JKR-LF-zar"/>
+                                            <constraint firstAttribute="height" priority="999" constant="100" id="nEq-0R-eJw"/>
+                                        </constraints>
+                                    </imageView>
+                                </subviews>
+                                <constraints>
+                                    <constraint firstItem="cmZ-5x-q5A" firstAttribute="leading" secondItem="u8O-io-kHd" secondAttribute="leading" id="2Ql-R8-x1R"/>
+                                </constraints>
+                            </stackView>
+                        </subviews>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <constraint firstItem="u8O-io-kHd" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="lA3-4a-42x" secondAttribute="leading" constant="10" id="8HN-Pp-bEG"/>
+                            <constraint firstItem="3bJ-bG-tue" firstAttribute="centerX" secondItem="lA3-4a-42x" secondAttribute="centerX" id="CcD-Da-gQv"/>
+                            <constraint firstItem="3bJ-bG-tue" firstAttribute="centerY" secondItem="kh9-bI-dsS" secondAttribute="centerY" id="F30-UI-4xu"/>
+                            <constraint firstItem="u8O-io-kHd" firstAttribute="centerX" secondItem="lA3-4a-42x" secondAttribute="centerX" id="QNi-AT-wIC"/>
+                            <constraint firstItem="u8O-io-kHd" firstAttribute="top" secondItem="3bJ-bG-tue" secondAttribute="bottom" constant="10" id="g2B-Ox-fJs"/>
+                            <constraint firstItem="lA3-4a-42x" firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="u8O-io-kHd" secondAttribute="trailing" constant="10" id="tzs-vU-PM0"/>
+                        </constraints>
+                        <viewLayoutGuide key="safeArea" id="lA3-4a-42x"/>
+                    </view>
+                    <connections>
+                        <outlet property="imageView" destination="cmZ-5x-q5A" id="ow7-S0-GhT"/>
+                        <outlet property="label" destination="9CM-MS-96X" id="QQI-9N-Ft8"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="32.799999999999997" y="36.431784107946029"/>
+        </scene>
+    </scenes>
+</document>

+ 319 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/CustomCameraCell.swift

@@ -0,0 +1,319 @@
+//
+//  CustomCameraCell.swift
+//  TLPhotoPicker_Example
+//
+//  Created by wade.hawk on 2017. 10. 27..
+//  Copyright © 2017년 CocoaPods. All rights reserved.
+//
+
+import Foundation
+import TLPhotoPicker
+import AVFoundation
+import Photos
+
+@available(iOS 10.2, *)
+class CustomCameraCell: TLPhotoCollectionViewCell, AVCaptureFileOutputRecordingDelegate {
+    // MARK: Session Management
+    private enum SessionSetupResult {
+        case success
+        case notAuthorized
+        case configurationFailed
+    }
+    
+    private let session = AVCaptureSession()
+    private var isSessionRunning = false
+    private let sessionQueue = DispatchQueue(label: "session queue") // Communicate with the session and other session objects on this queue.
+    private var setupResult: SessionSetupResult = .success
+    var videoDeviceInput: AVCaptureDeviceInput!
+    
+    @IBOutlet private weak var previewView: PreviewView!
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        if Platform.isSimulator {
+            return
+        }
+        previewView.session = session
+        /*
+         Check video authorization status. Video access is required and audio
+         access is optional. If audio access is denied, audio is not recorded
+         during movie recording.
+         */
+        switch AVCaptureDevice.authorizationStatus(for: .video) {
+        case .authorized:
+            // The user has previously granted access to the camera.
+            break
+            
+        case .notDetermined:
+            /*
+             The user has not yet been presented with the option to grant
+             video access. We suspend the session queue to delay session
+             setup until the access request has completed.
+             
+             Note that audio access will be implicitly requested when we
+             create an AVCaptureDeviceInput for audio during session setup.
+             */
+            sessionQueue.suspend()
+            AVCaptureDevice.requestAccess(for: .video, completionHandler: { granted in
+                if !granted {
+                    self.setupResult = .notAuthorized
+                }
+                self.sessionQueue.resume()
+            })
+            
+        default:
+            // The user has previously denied access.
+            setupResult = .notAuthorized
+        }
+        
+        /*
+         Setup the capture session.
+         In general it is not safe to mutate an AVCaptureSession or any of its
+         inputs, outputs, or connections from multiple threads at the same time.
+         
+         Why not do all of this on the main queue?
+         Because AVCaptureSession.startRunning() is a blocking call which can
+         take a long time. We dispatch session setup to the sessionQueue so
+         that the main queue isn't blocked, which keeps the UI responsive.
+         */
+        sessionQueue.async {
+            self.configureSession()
+        }
+    }
+    
+    override func willDisplayCell() {
+        super.willDisplayCell()
+        if Platform.isSimulator {
+            return
+        }
+        sessionQueue.async { [weak self] in
+            guard let `self` = self else { return }
+            switch self.setupResult {
+            case .success:
+                // Only setup observers and start the session running if setup succeeded.
+                self.session.startRunning()
+                self.isSessionRunning = self.session.isRunning
+            default:
+                break
+            }
+        }
+    }
+    
+    override func endDisplayingCell() {
+        if Platform.isSimulator {
+            return
+        }
+        sessionQueue.async {
+            if self.setupResult == .success {
+                self.session.stopRunning()
+                self.isSessionRunning = self.session.isRunning
+            }
+        }
+        super.endDisplayingCell()
+    }
+    
+    // Call this on the session queue.
+    private func configureSession() {
+        if setupResult != .success {
+            return
+        }
+        
+        session.beginConfiguration()
+        session.sessionPreset = .photo
+        do {
+            var defaultVideoDevice: AVCaptureDevice?
+            
+            // Choose the back dual camera if available, otherwise default to a wide angle camera.
+            if let dualCameraDevice = AVCaptureDevice.default(.builtInDualCamera, for: .video, position: .back) {
+                defaultVideoDevice = dualCameraDevice
+            } else if let backCameraDevice = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .back) {
+                // If the back dual camera is not available, default to the back wide angle camera.
+                defaultVideoDevice = backCameraDevice
+            } else if let frontCameraDevice = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .front) {
+                /*
+                 In some cases where users break their phones, the back wide angle camera is not available.
+                 In this case, we should default to the front wide angle camera.
+                 */
+                defaultVideoDevice = frontCameraDevice
+            }
+            
+            let videoDeviceInput = try AVCaptureDeviceInput(device: defaultVideoDevice!)
+            
+            if session.canAddInput(videoDeviceInput) {
+                session.addInput(videoDeviceInput)
+                self.videoDeviceInput = videoDeviceInput
+                
+                DispatchQueue.main.async {
+                    /*
+                     Why are we dispatching this to the main queue?
+                     Because AVCaptureVideoPreviewLayer is the backing layer for PreviewView and UIView
+                     can only be manipulated on the main thread.
+                     Note: As an exception to the above rule, it is not necessary to serialize video orientation changes
+                     on the AVCaptureVideoPreviewLayer’s connection with other session manipulation.
+                     
+                     Use the status bar orientation as the initial video orientation. Subsequent orientation changes are
+                     handled by CameraViewController.viewWillTransition(to:with:).
+                     */
+                    let statusBarOrientation = UIApplication.shared.statusBarOrientation
+                    var initialVideoOrientation: AVCaptureVideoOrientation = .portrait
+                    if statusBarOrientation != .unknown {
+                        if let videoOrientation = AVCaptureVideoOrientation(rawValue: statusBarOrientation.rawValue) {
+                            initialVideoOrientation = videoOrientation
+                        }
+                    }
+                    self.previewView.videoPreviewLayer.connection?.videoOrientation = initialVideoOrientation
+                }
+            } else {
+                print("Could not add video device input to the session")
+                setupResult = .configurationFailed
+                session.commitConfiguration()
+                return
+            }
+        } catch {
+            print("Could not create video device input: \(error)")
+            setupResult = .configurationFailed
+            session.commitConfiguration()
+            return
+        }
+        // Add photo output.
+        if session.canAddOutput(photoOutput) {
+            session.addOutput(photoOutput)
+            photoOutput.isHighResolutionCaptureEnabled = true
+        } else {
+            print("Could not add photo output to the session")
+            setupResult = .configurationFailed
+            session.commitConfiguration()
+            return
+        }
+        
+        session.commitConfiguration()
+    }
+    
+    private enum CaptureMode: Int {
+        case photo = 0
+        case movie = 1
+    }
+    
+    // MARK: Device Configuration
+    let videoDeviceDiscoverySession = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInWideAngleCamera, .builtInDualCamera],
+                                                                               mediaType: .video, position: .unspecified)
+
+    // MARK: Capturing Photos
+    
+
+    let photoOutput = AVCapturePhotoOutput()
+    
+    var inProgressPhotoCaptureDelegates = [Int64: PhotoCaptureProcessor]()
+
+    override func selectedCell() {
+        let videoPreviewLayerOrientation = previewView.videoPreviewLayer.connection?.videoOrientation
+        
+        sessionQueue.async {
+            // Update the photo output's connection to match the video orientation of the video preview layer.
+            if let photoOutputConnection = self.photoOutput.connection(with: .video) {
+                photoOutputConnection.videoOrientation = videoPreviewLayerOrientation!
+            }
+            
+            var photoSettings = AVCapturePhotoSettings()
+            // Capture HEIF photo when supported, with flash set to auto and high resolution photo enabled.
+            if #available(iOS 11.0, *) {
+                if  self.photoOutput.availablePhotoCodecTypes.contains(.hevc) {
+                    photoSettings = AVCapturePhotoSettings(format: [AVVideoCodecKey: AVVideoCodecType.hevc])
+                }
+            } else {
+                // Fallback on earlier versions
+            }
+            
+            if self.videoDeviceInput.device.isFlashAvailable {
+                photoSettings.flashMode = .auto
+            }
+            
+            photoSettings.isHighResolutionPhotoEnabled = true
+            if !photoSettings.__availablePreviewPhotoPixelFormatTypes.isEmpty {
+                photoSettings.previewPhotoFormat = [kCVPixelBufferPixelFormatTypeKey as String: photoSettings.__availablePreviewPhotoPixelFormatTypes.first!]
+            }
+            
+            // Use a separate object for the photo capture delegate to isolate each capture life cycle.
+            let photoCaptureProcessor = PhotoCaptureProcessor(with: photoSettings, willCapturePhotoAnimation: {
+                DispatchQueue.main.async {
+                    self.previewView.videoPreviewLayer.opacity = 0
+                    UIView.animate(withDuration: 0.25) {
+                        self.previewView.videoPreviewLayer.opacity = 1
+                    }
+                }
+            }, livePhotoCaptureHandler: { capturing in
+            }, completionHandler: { photoCaptureProcessor in
+                // When the capture is complete, remove a reference to the photo capture delegate so it can be deallocated.
+                self.sessionQueue.async {
+                    self.inProgressPhotoCaptureDelegates[photoCaptureProcessor.requestedPhotoSettings.uniqueID] = nil
+                }
+            })
+            self.inProgressPhotoCaptureDelegates[photoCaptureProcessor.requestedPhotoSettings.uniqueID] = photoCaptureProcessor
+            self.photoOutput.capturePhoto(with: photoSettings, delegate: photoCaptureProcessor)
+        }
+    }
+
+    func fileOutput(_ output: AVCaptureFileOutput, didStartRecordingTo fileURL: URL, from connections: [AVCaptureConnection]) {
+        // Enable the Record button to let the user stop the recording.
+    }
+
+    func fileOutput(_ output: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections: [AVCaptureConnection], error: Error?) {
+        func cleanUp() {
+            let path = outputFileURL.path
+            if FileManager.default.fileExists(atPath: path) {
+                do {
+                    try FileManager.default.removeItem(atPath: path)
+                } catch {
+                    print("Could not remove file at url: \(outputFileURL)")
+                }
+            }
+        }
+        
+        var success = true
+        
+        if error != nil {
+            print("Movie file finishing error: \(String(describing: error))")
+            success = (((error! as NSError).userInfo[AVErrorRecordingSuccessfullyFinishedKey] as AnyObject).boolValue)!
+        }
+        
+        if success {
+            // Check authorization status.
+            PHPhotoLibrary.requestAuthorization { status in
+                if status == .authorized {
+                    // Save the movie file to the photo library and cleanup.
+                    PHPhotoLibrary.shared().performChanges({
+                        let options = PHAssetResourceCreationOptions()
+                        options.shouldMoveFile = true
+                        let creationRequest = PHAssetCreationRequest.forAsset()
+                        creationRequest.addResource(with: .video, fileURL: outputFileURL, options: options)
+                    }, completionHandler: { success, error in
+                        if !success {
+                            print("Could not save movie to photo library: \(String(describing: error))")
+                        }
+                        cleanUp()
+                    }
+                    )
+                } else {
+                    cleanUp()
+                }
+            }
+        } else {
+            cleanUp()
+        }
+    }
+}
+
+@available(iOS 10.0, *)
+extension AVCaptureDevice.DiscoverySession {
+    var uniqueDevicePositionsCount: Int {
+        var uniqueDevicePositions: [AVCaptureDevice.Position] = []
+        
+        for device in devices {
+            if !uniqueDevicePositions.contains(device.position) {
+                uniqueDevicePositions.append(device.position)
+            }
+        }
+        
+        return uniqueDevicePositions.count
+    }
+}

+ 53 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/CustomCameraCell.xib

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13174"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="CustomCameraCell" id="yXg-PX-cBI" userLabel="CustomCameraCell" customClass="CustomCameraCell" customModule="TLPhotoPicker_Example" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="100" height="100"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
+                <rect key="frame" x="0.0" y="0.0" width="100" height="100"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OEa-vx-nyF" customClass="PreviewView" customModule="TLPhotoPicker_Example" customModuleProvider="target">
+                        <rect key="frame" x="0.0" y="0.0" width="100" height="100"/>
+                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                    </view>
+                    <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="100" translatesAutoresizingMaskIntoConstraints="NO" id="IbX-QH-EmX">
+                        <rect key="frame" x="24.5" y="37" width="50" height="25"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="50" id="WeH-wk-mnf"/>
+                            <constraint firstAttribute="height" constant="25" id="fg0-xR-Kit"/>
+                        </constraints>
+                    </imageView>
+                </subviews>
+            </view>
+            <constraints>
+                <constraint firstAttribute="trailing" secondItem="OEa-vx-nyF" secondAttribute="trailing" id="1q8-NV-mi4"/>
+                <constraint firstAttribute="bottom" secondItem="OEa-vx-nyF" secondAttribute="bottom" id="8M9-xE-Sfw"/>
+                <constraint firstItem="IbX-QH-EmX" firstAttribute="centerX" secondItem="sl5-A7-gYS" secondAttribute="centerX" id="PGI-5k-d7B"/>
+                <constraint firstItem="OEa-vx-nyF" firstAttribute="top" secondItem="yXg-PX-cBI" secondAttribute="top" id="TFO-Hn-Zvg"/>
+                <constraint firstItem="OEa-vx-nyF" firstAttribute="leading" secondItem="yXg-PX-cBI" secondAttribute="leading" id="aPC-Pg-0LQ"/>
+                <constraint firstItem="IbX-QH-EmX" firstAttribute="centerY" secondItem="sl5-A7-gYS" secondAttribute="centerY" id="bQT-vE-AZ8"/>
+            </constraints>
+            <viewLayoutGuide key="safeArea" id="sl5-A7-gYS"/>
+            <connections>
+                <outlet property="previewView" destination="OEa-vx-nyF" id="egv-bz-BnD"/>
+            </connections>
+            <point key="canvasLocation" x="32" y="-10"/>
+        </collectionViewCell>
+    </objects>
+    <resources>
+        <image name="100" width="50" height="50"/>
+    </resources>
+</document>

+ 61 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/CustomCell_Instagram.swift

@@ -0,0 +1,61 @@
+//
+//  CustomCell_Instagram.swift
+//  TLPhotoPicker
+//
+//  Created by wade.hawk on 2017. 5. 15..
+//  Copyright © 2017년 CocoaPods. All rights reserved.
+//
+
+import Foundation
+import TLPhotoPicker
+import PhotosUI
+
+class CustomCell_Instagram: TLPhotoCollectionViewCell {
+    
+    @IBOutlet var sizeRequiredLabel: UILabel!
+    @IBOutlet var sizeRequiredOverlayView: UIView!
+    
+    let selectedColor = UIColor(red: 88/255, green: 144/255, blue: 255/255, alpha: 1.0)
+    
+    override var duration: TimeInterval? {
+        didSet {
+            self.durationLabel?.isHidden = self.duration == nil ? true : false
+            guard let duration = self.duration else { return }
+            self.durationLabel?.text = timeFormatted(timeInterval: duration)
+        }
+    }
+    
+    override var isCameraCell: Bool {
+        didSet {
+            self.orderLabel?.isHidden = self.isCameraCell
+        }
+    }
+    
+    override public var selectedAsset: Bool {
+        willSet(newValue) {
+            self.orderLabel?.layer.borderColor = newValue ? self.selectedColor.cgColor : UIColor.white.cgColor
+            self.orderLabel?.backgroundColor = newValue ? self.selectedColor : UIColor(red: 1, green: 1, blue: 1, alpha: 0.3)
+        }
+    }
+    
+    override func update(with phAsset: PHAsset) {
+        super.update(with: phAsset)
+        self.sizeRequiredOverlayView?.isHidden = (phAsset.pixelWidth == 300 && phAsset.pixelHeight == 300)
+        self.sizeRequiredLabel?.text = "\(phAsset.pixelWidth)\nx\n\(phAsset.pixelHeight)"
+    }
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        self.sizeRequiredOverlayView?.isHidden = true
+        self.durationView?.backgroundColor = UIColor.clear
+        self.orderLabel?.clipsToBounds = true
+        self.orderLabel?.layer.cornerRadius = 10
+        self.orderLabel?.layer.borderWidth = 1
+        self.orderLabel?.layer.borderColor = UIColor.white.cgColor
+    }
+    
+    override open func prepareForReuse() {
+        super.prepareForReuse()
+        self.durationView?.backgroundColor = UIColor.clear
+    }
+}

+ 121 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/CustomCell_Instagram.xib

@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
+        <capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="CustomCell_Instagram" id="9Rv-Fn-yCT" customClass="CustomCell_Instagram" customModule="TLPhotoPicker_Example" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="100" height="100"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
+                <rect key="frame" x="0.0" y="0.0" width="100" height="100"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="rOH-JI-pE1">
+                        <rect key="frame" x="0.0" y="0.0" width="100" height="100"/>
+                    </imageView>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uwg-fz-Lnl">
+                        <rect key="frame" x="0.0" y="0.0" width="100" height="100"/>
+                        <subviews>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JhX-P9-VnM">
+                                <rect key="frame" x="75" y="5" width="20" height="20"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" secondItem="JhX-P9-VnM" secondAttribute="height" multiplier="1:1" id="HyJ-ox-Pd8"/>
+                                    <constraint firstAttribute="width" constant="20" id="ZSd-26-g6g"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="13"/>
+                                <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                        </subviews>
+                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                        <constraints>
+                            <constraint firstAttribute="trailing" secondItem="JhX-P9-VnM" secondAttribute="trailing" constant="5" id="T4h-5Q-DtR"/>
+                            <constraint firstItem="JhX-P9-VnM" firstAttribute="top" secondItem="uwg-fz-Lnl" secondAttribute="top" constant="5" id="hIw-3h-tPP"/>
+                        </constraints>
+                    </view>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dN5-jZ-SiB">
+                        <rect key="frame" x="0.0" y="75" width="100" height="25"/>
+                        <subviews>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0:02" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0AD-DJ-hk7">
+                                <rect key="frame" x="30" y="0.0" width="65" height="25"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="65" id="Hky-qZ-eo9"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                                <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                        </subviews>
+                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                        <constraints>
+                            <constraint firstAttribute="bottom" secondItem="0AD-DJ-hk7" secondAttribute="bottom" id="B6M-k2-HZD"/>
+                            <constraint firstAttribute="trailing" secondItem="0AD-DJ-hk7" secondAttribute="trailing" constant="5" id="c2b-dQ-g7Y"/>
+                            <constraint firstAttribute="height" constant="25" id="fEJ-nX-P4S"/>
+                            <constraint firstItem="0AD-DJ-hk7" firstAttribute="top" secondItem="dN5-jZ-SiB" secondAttribute="top" id="uOO-Wg-zvQ"/>
+                        </constraints>
+                    </view>
+                    <activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="1Zf-X9-xCZ">
+                        <rect key="frame" x="40" y="40" width="20" height="20"/>
+                    </activityIndicatorView>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qy3-sb-58T">
+                        <rect key="frame" x="0.0" y="0.0" width="100" height="100"/>
+                        <subviews>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lfL-bL-sYk">
+                                <rect key="frame" x="0.0" y="0.0" width="100" height="100"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <nil key="textColor"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                        </subviews>
+                        <color key="backgroundColor" white="1" alpha="0.80012103873239437" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <constraints>
+                            <constraint firstItem="lfL-bL-sYk" firstAttribute="leading" secondItem="Qy3-sb-58T" secondAttribute="leading" id="1z3-FD-Zxw"/>
+                            <constraint firstItem="lfL-bL-sYk" firstAttribute="centerX" secondItem="Qy3-sb-58T" secondAttribute="centerX" id="3V8-tp-MzM"/>
+                            <constraint firstAttribute="bottom" secondItem="lfL-bL-sYk" secondAttribute="bottom" id="NIy-EZ-C5n"/>
+                            <constraint firstItem="lfL-bL-sYk" firstAttribute="centerY" secondItem="Qy3-sb-58T" secondAttribute="centerY" id="PbD-tZ-Mam"/>
+                            <constraint firstItem="lfL-bL-sYk" firstAttribute="top" secondItem="Qy3-sb-58T" secondAttribute="top" id="WPD-HJ-PeA"/>
+                            <constraint firstAttribute="trailing" secondItem="lfL-bL-sYk" secondAttribute="trailing" id="l92-O5-rxg"/>
+                        </constraints>
+                    </view>
+                </subviews>
+            </view>
+            <constraints>
+                <constraint firstItem="1Zf-X9-xCZ" firstAttribute="centerX" secondItem="9Rv-Fn-yCT" secondAttribute="centerX" id="4EP-vr-Yn3"/>
+                <constraint firstItem="dN5-jZ-SiB" firstAttribute="leading" secondItem="9Rv-Fn-yCT" secondAttribute="leading" id="81d-II-POL"/>
+                <constraint firstItem="Qy3-sb-58T" firstAttribute="leading" secondItem="9Rv-Fn-yCT" secondAttribute="leading" id="GfG-Mo-0Sm"/>
+                <constraint firstItem="rOH-JI-pE1" firstAttribute="leading" secondItem="9Rv-Fn-yCT" secondAttribute="leading" id="KJ3-eV-OY7"/>
+                <constraint firstAttribute="trailing" secondItem="dN5-jZ-SiB" secondAttribute="trailing" id="Mbt-2E-UCm"/>
+                <constraint firstItem="uwg-fz-Lnl" firstAttribute="leading" secondItem="9Rv-Fn-yCT" secondAttribute="leading" id="N99-b3-cRO"/>
+                <constraint firstAttribute="trailing" secondItem="rOH-JI-pE1" secondAttribute="trailing" id="Ry1-8z-byA"/>
+                <constraint firstAttribute="bottom" secondItem="dN5-jZ-SiB" secondAttribute="bottom" id="SQo-t4-jNX"/>
+                <constraint firstItem="1Zf-X9-xCZ" firstAttribute="centerY" secondItem="9Rv-Fn-yCT" secondAttribute="centerY" id="Ti5-PE-sjK"/>
+                <constraint firstItem="rOH-JI-pE1" firstAttribute="top" secondItem="9Rv-Fn-yCT" secondAttribute="top" id="ZZd-iV-jqo"/>
+                <constraint firstAttribute="bottom" secondItem="rOH-JI-pE1" secondAttribute="bottom" id="ZfF-qA-gEg"/>
+                <constraint firstAttribute="trailing" secondItem="Qy3-sb-58T" secondAttribute="trailing" id="aYu-Lb-GuV"/>
+                <constraint firstAttribute="bottom" secondItem="uwg-fz-Lnl" secondAttribute="bottom" id="dGK-ts-Oxc"/>
+                <constraint firstAttribute="trailing" secondItem="uwg-fz-Lnl" secondAttribute="trailing" id="dkB-IK-EYy"/>
+                <constraint firstItem="uwg-fz-Lnl" firstAttribute="top" secondItem="9Rv-Fn-yCT" secondAttribute="top" id="izZ-b1-P9h"/>
+                <constraint firstItem="Qy3-sb-58T" firstAttribute="top" secondItem="9Rv-Fn-yCT" secondAttribute="top" id="nkP-eF-69q"/>
+                <constraint firstAttribute="bottom" secondItem="Qy3-sb-58T" secondAttribute="bottom" id="z9j-F5-guo"/>
+            </constraints>
+            <connections>
+                <outlet property="durationLabel" destination="0AD-DJ-hk7" id="fAK-hF-IpB"/>
+                <outlet property="imageView" destination="rOH-JI-pE1" id="tgu-TV-hTi"/>
+                <outlet property="indicator" destination="1Zf-X9-xCZ" id="b7n-5J-KNK"/>
+                <outlet property="orderLabel" destination="JhX-P9-VnM" id="Oev-lS-XRO"/>
+                <outlet property="sizeRequiredLabel" destination="lfL-bL-sYk" id="9nb-m4-mO4"/>
+                <outlet property="sizeRequiredOverlayView" destination="Qy3-sb-58T" id="5pf-6A-D4B"/>
+            </connections>
+            <point key="canvasLocation" x="32" y="-10"/>
+        </collectionViewCell>
+    </objects>
+</document>

+ 24 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/CustomPhotoPickerViewController.swift

@@ -0,0 +1,24 @@
+//
+//  CustomPhotoPickerViewController.swift
+//  TLPhotoPicker
+//
+//  Created by wade.hawk on 2017. 5. 28..
+//  Copyright © 2017년 CocoaPods. All rights reserved.
+//
+
+import Foundation
+import TLPhotoPicker
+
+class CustomPhotoPickerViewController: TLPhotosPickerViewController {
+    override func makeUI() {
+        super.makeUI()
+        self.customNavItem.leftBarButtonItem = UIBarButtonItem.init(barButtonSystemItem: .stop, target: nil, action: #selector(customAction))
+    }
+    @objc func customAction() {
+        self.delegate?.photoPickerDidCancel()
+        self.dismiss(animated: true) { [weak self] in
+            self?.delegate?.dismissComplete()
+            self?.dismissCompletion?()
+        }
+    }
+}

+ 44 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/ImagePreviewViewController.swift

@@ -0,0 +1,44 @@
+//
+//  ImagePreviewViewController.swift
+//  TLPhotoPicker
+//
+//  Created by wade.hawk on 2017. 7. 24..
+//  Copyright © 2017년 CocoaPods. All rights reserved.
+//
+
+import Foundation
+import UIKit
+import TLPhotoPicker
+
+class ImagePreviewViewController: UIViewController {
+    @IBOutlet var imageView: UIImageView!
+    
+    var assets: TLPHAsset? = nil
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    init() {
+        super.init(nibName: "ImagePreviewViewController", bundle: Bundle.main)
+    }
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        self.imageView.image = self.assets?.fullResolutionImage
+    }
+    
+    override func viewWillAppear(_ animated: Bool) {
+        super.viewWillAppear(animated)
+        self.navigationController?.setNavigationBarHidden(false, animated: true)
+    }
+    
+    override func viewWillDisappear(_ animated: Bool) {
+        super.viewWillDisappear(animated)
+        if self.navigationController?.topViewController is ImagePreviewViewController {
+            self.navigationController?.setNavigationBarHidden(false, animated: true)
+        }else {
+            self.navigationController?.setNavigationBarHidden(true, animated: true)
+        }
+    }
+}

+ 39 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/ImagePreviewViewController.xib

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ImagePreviewViewController" customModule="TLPhotoPicker_Example" customModuleProvider="target">
+            <connections>
+                <outlet property="imageView" destination="10W-15-m8d" id="Bnl-PK-bDV"/>
+                <outlet property="view" destination="iN0-l3-epB" id="IXU-uf-N4k"/>
+            </connections>
+        </placeholder>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB">
+            <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="10W-15-m8d">
+                    <rect key="frame" x="37" y="183" width="300" height="300"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="300" id="blL-27-AhW"/>
+                        <constraint firstAttribute="width" constant="300" id="dkw-st-R1V"/>
+                    </constraints>
+                </imageView>
+            </subviews>
+            <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <constraints>
+                <constraint firstItem="10W-15-m8d" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="PXj-cn-N45"/>
+                <constraint firstItem="10W-15-m8d" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="UlX-aK-R9i"/>
+            </constraints>
+            <point key="canvasLocation" x="33.5" y="149.5"/>
+        </view>
+    </objects>
+</document>

BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/100.imageset/100.png


+ 21 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/100.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "100.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 157 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Contents.json

@@ -0,0 +1,157 @@
+{
+  "images" : [
+    {
+      "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "NotificationIcon@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "NotificationIcon@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-Small.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-Small@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-Small@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "Icon-40@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "Icon-40@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "57x57",
+      "idiom" : "iphone",
+      "filename" : "Icon.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "57x57",
+      "idiom" : "iphone",
+      "filename" : "Icon@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "Icon-60@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "Icon-60@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "ipad",
+      "filename" : "NotificationIcon~ipad.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "ipad",
+      "filename" : "NotificationIcon~ipad@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "Icon-Small.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "Icon-Small@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "Icon-40.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "Icon-40@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "50x50",
+      "idiom" : "ipad",
+      "filename" : "Icon-Small-50.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "50x50",
+      "idiom" : "ipad",
+      "filename" : "Icon-Small-50@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "72x72",
+      "idiom" : "ipad",
+      "filename" : "Icon-72.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "72x72",
+      "idiom" : "ipad",
+      "filename" : "Icon-72@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "Icon-76.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "Icon-76@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "83.5x83.5",
+      "idiom" : "ipad",
+      "filename" : "Icon-83.5@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ios-marketing",
+      "size" : "1024x1024",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-40.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-72.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-76.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-Small.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/Icon@2x.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/NotificationIcon@2x.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/NotificationIcon@3x.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/NotificationIcon~ipad.png


BIN
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/AppIcon.appiconset/NotificationIcon~ipad@2x.png


+ 6 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Images.xcassets/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 44 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/Info.plist

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>$(PRODUCT_NAME)</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>NSCameraUsageDescription</key>
+	<string>You need Usage Camera Description</string>
+	<key>NSMicrophoneUsageDescription</key>
+	<string>You need Usage Microphone Description</string>
+	<key>NSPhotoLibraryUsageDescription</key>
+	<string>You need Usage Photo Description</string>
+	<key>UILaunchStoryboardName</key>
+	<string>LaunchScreen</string>
+	<key>UIMainStoryboardFile</key>
+	<string>Main</string>
+	<key>UIRequiredDeviceCapabilities</key>
+	<array>
+		<string>armv7</string>
+	</array>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+	</array>
+</dict>
+</plist>

+ 174 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/PhotoCaptureDelegate.swift

@@ -0,0 +1,174 @@
+/*
+ See LICENSE.txt for this sample’s licensing information.
+ Sample code project: AVCam-iOS: Using AVFoundation to Capture Images and Movies
+ Version: 7.1
+ 
+ IMPORTANT:  This Apple software is supplied to you by Apple
+ Inc. ("Apple") in consideration of your agreement to the following
+ terms, and your use, installation, modification or redistribution of
+ this Apple software constitutes acceptance of these terms.  If you do
+ not agree with these terms, please do not use, install, modify or
+ redistribute this Apple software.
+ 
+ In consideration of your agreement to abide by the following terms, and
+ subject to these terms, Apple grants you a personal, non-exclusive
+ license, under Apple's copyrights in this original Apple software (the
+ "Apple Software"), to use, reproduce, modify and redistribute the Apple
+ Software, with or without modifications, in source and/or binary forms;
+ provided that if you redistribute the Apple Software in its entirety and
+ without modifications, you must retain this notice and the following
+ text and disclaimers in all such redistributions of the Apple Software.
+ Neither the name, trademarks, service marks or logos of Apple Inc. may
+ be used to endorse or promote products derived from the Apple Software
+ without specific prior written permission from Apple.  Except as
+ expressly stated in this notice, no other rights or licenses, express or
+ implied, are granted by Apple herein, including but not limited to any
+ patent rights that may be infringed by your derivative works or by other
+ works in which the Apple Software may be incorporated.
+ 
+ The Apple Software is provided by Apple on an "AS IS" basis.  APPLE
+ MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
+ THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
+ OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+ 
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
+ MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
+ AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
+ STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ 
+ Copyright (C) 2017 Apple Inc. All Rights Reserved.
+ 
+ Abstract:
+ Application preview view.
+ */
+import AVFoundation
+import Photos
+
+@available(iOS 10.2, *)
+class PhotoCaptureProcessor: NSObject {
+    private(set) var requestedPhotoSettings: AVCapturePhotoSettings
+    
+    private let willCapturePhotoAnimation: () -> Void
+    
+    private let livePhotoCaptureHandler: (Bool) -> Void
+    
+    private let completionHandler: (PhotoCaptureProcessor) -> Void
+    
+    private var photoData: Data?
+    
+    private var livePhotoCompanionMovieURL: URL?
+    
+    init(with requestedPhotoSettings: AVCapturePhotoSettings,
+         willCapturePhotoAnimation: @escaping () -> Void,
+         livePhotoCaptureHandler: @escaping (Bool) -> Void,
+         completionHandler: @escaping (PhotoCaptureProcessor) -> Void) {
+        self.requestedPhotoSettings = requestedPhotoSettings
+        self.willCapturePhotoAnimation = willCapturePhotoAnimation
+        self.livePhotoCaptureHandler = livePhotoCaptureHandler
+        self.completionHandler = completionHandler
+    }
+    
+    private func didFinish() {
+        if let livePhotoCompanionMoviePath = livePhotoCompanionMovieURL?.path {
+            if FileManager.default.fileExists(atPath: livePhotoCompanionMoviePath) {
+                do {
+                    try FileManager.default.removeItem(atPath: livePhotoCompanionMoviePath)
+                } catch {
+                    print("Could not remove file at url: \(livePhotoCompanionMoviePath)")
+                }
+            }
+        }
+        
+        completionHandler(self)
+    }
+    
+}
+
+@available(iOS 10.2, *)
+extension PhotoCaptureProcessor: AVCapturePhotoCaptureDelegate {
+    /*
+     This extension includes all the delegate callbacks for AVCapturePhotoCaptureDelegate protocol
+     */
+    
+    func photoOutput(_ output: AVCapturePhotoOutput, willBeginCaptureFor resolvedSettings: AVCaptureResolvedPhotoSettings) {
+        if resolvedSettings.livePhotoMovieDimensions.width > 0 && resolvedSettings.livePhotoMovieDimensions.height > 0 {
+            livePhotoCaptureHandler(true)
+        }
+    }
+    
+    func photoOutput(_ output: AVCapturePhotoOutput, willCapturePhotoFor resolvedSettings: AVCaptureResolvedPhotoSettings) {
+        willCapturePhotoAnimation()
+    }
+    
+    @available(iOS 11.0, *)
+    func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?) {
+        
+        if let error = error {
+            print("Error capturing photo: \(error)")
+        } else {
+            photoData = photo.fileDataRepresentation()
+        }
+    }
+    func photoOutput(_ output: AVCapturePhotoOutput, didFinishRecordingLivePhotoMovieForEventualFileAt outputFileURL: URL, resolvedSettings: AVCaptureResolvedPhotoSettings) {
+        livePhotoCaptureHandler(false)
+    }
+    
+    func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingLivePhotoToMovieFileAt outputFileURL: URL, duration: CMTime, photoDisplayTime: CMTime, resolvedSettings: AVCaptureResolvedPhotoSettings, error: Error?) {
+        if error != nil {
+            print("Error processing live photo companion movie: \(String(describing: error))")
+            return
+        }
+        livePhotoCompanionMovieURL = outputFileURL
+    }
+    
+    func photoOutput(_ output: AVCapturePhotoOutput, didFinishCaptureFor resolvedSettings: AVCaptureResolvedPhotoSettings, error: Error?) {
+        if let error = error {
+            print("Error capturing photo: \(error)")
+            didFinish()
+            return
+        }
+        
+        guard let photoData = photoData else {
+            print("No photo data resource")
+            didFinish()
+            return
+        }
+        
+        PHPhotoLibrary.requestAuthorization { status in
+            if status == .authorized {
+                PHPhotoLibrary.shared().performChanges({
+                    let options = PHAssetResourceCreationOptions()
+                    let creationRequest = PHAssetCreationRequest.forAsset()
+                    if #available(iOS 11.0, *) {
+                        options.uniformTypeIdentifier = self.requestedPhotoSettings.processedFileType.map { $0.rawValue }
+                    } else {
+                        // Fallback on earlier versions
+                    }
+                    creationRequest.addResource(with: .photo, data: photoData, options: options)
+                    
+                    if let livePhotoCompanionMovieURL = self.livePhotoCompanionMovieURL {
+                        let livePhotoCompanionMovieFileResourceOptions = PHAssetResourceCreationOptions()
+                        livePhotoCompanionMovieFileResourceOptions.shouldMoveFile = true
+                        creationRequest.addResource(with: .pairedVideo, fileURL: livePhotoCompanionMovieURL, options: livePhotoCompanionMovieFileResourceOptions)
+                    }
+                    
+                }, completionHandler: { _, error in
+                    if let error = error {
+                        print("Error occurered while saving photo to photo library: \(error)")
+                    }
+                    
+                    self.didFinish()
+                }
+                )
+            } else {
+                self.didFinish()
+            }
+        }
+    }
+}
+

+ 44 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/PhotoPickerWithNavigationViewController.swift

@@ -0,0 +1,44 @@
+//
+//  PhotoPickerWithNavigationViewController.swift
+//  TLPhotoPicker
+//
+//  Created by wade.hawk on 2017. 7. 24..
+//  Copyright © 2017년 CocoaPods. All rights reserved.
+//
+
+import Foundation
+import TLPhotoPicker
+
+class PhotoPickerWithNavigationViewController: TLPhotosPickerViewController {
+    override func makeUI() {
+        super.makeUI()
+        self.customNavItem.leftBarButtonItem = UIBarButtonItem.init(barButtonSystemItem: .stop, target: nil, action: #selector(customAction))
+    }
+    @objc func customAction() {
+        self.delegate?.photoPickerDidCancel()
+        self.dismiss(animated: true) { [weak self] in
+            self?.delegate?.dismissComplete()
+            self?.dismissCompletion?()
+        }
+    }
+    
+    override func doneButtonTap() {
+        let imagePreviewVC = ImagePreviewViewController()
+        imagePreviewVC.assets = self.selectedAssets.first
+        self.navigationController?.pushViewController(imagePreviewVC, animated: true)
+    }
+    
+    override func viewWillAppear(_ animated: Bool) {
+        super.viewWillAppear(animated)
+        self.navigationController?.setNavigationBarHidden(true, animated: true)
+    }
+    
+    override func viewWillDisappear(_ animated: Bool) {
+        super.viewWillDisappear(animated)
+        if self.navigationController?.topViewController is ImagePreviewViewController {
+            self.navigationController?.setNavigationBarHidden(false, animated: true)
+        }else {
+            self.navigationController?.setNavigationBarHidden(true, animated: true)
+        }
+    }
+}

+ 77 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/PreviewView.swift

@@ -0,0 +1,77 @@
+/*
+ See LICENSE.txt for this sample’s licensing information.
+ Sample code project: AVCam-iOS: Using AVFoundation to Capture Images and Movies
+ Version: 7.1
+ 
+ IMPORTANT:  This Apple software is supplied to you by Apple
+ Inc. ("Apple") in consideration of your agreement to the following
+ terms, and your use, installation, modification or redistribution of
+ this Apple software constitutes acceptance of these terms.  If you do
+ not agree with these terms, please do not use, install, modify or
+ redistribute this Apple software.
+ 
+ In consideration of your agreement to abide by the following terms, and
+ subject to these terms, Apple grants you a personal, non-exclusive
+ license, under Apple's copyrights in this original Apple software (the
+ "Apple Software"), to use, reproduce, modify and redistribute the Apple
+ Software, with or without modifications, in source and/or binary forms;
+ provided that if you redistribute the Apple Software in its entirety and
+ without modifications, you must retain this notice and the following
+ text and disclaimers in all such redistributions of the Apple Software.
+ Neither the name, trademarks, service marks or logos of Apple Inc. may
+ be used to endorse or promote products derived from the Apple Software
+ without specific prior written permission from Apple.  Except as
+ expressly stated in this notice, no other rights or licenses, express or
+ implied, are granted by Apple herein, including but not limited to any
+ patent rights that may be infringed by your derivative works or by other
+ works in which the Apple Software may be incorporated.
+ 
+ The Apple Software is provided by Apple on an "AS IS" basis.  APPLE
+ MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
+ THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
+ OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+ 
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
+ MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
+ AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
+ STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ 
+ Copyright (C) 2017 Apple Inc. All Rights Reserved.
+
+ Abstract:
+ Application preview view.
+ */
+
+import UIKit
+import AVFoundation
+
+class PreviewView: UIView {
+    var videoPreviewLayer: AVCaptureVideoPreviewLayer {
+        guard let layer = layer as? AVCaptureVideoPreviewLayer else {
+            fatalError("Expected `AVCaptureVideoPreviewLayer` type for layer. Check PreviewView.layerClass implementation.")
+        }
+        layer.videoGravity = .resizeAspectFill
+        return layer
+    }
+    
+    var session: AVCaptureSession? {
+        get {
+            return videoPreviewLayer.session
+        }
+        set {
+            videoPreviewLayer.session = newValue
+        }
+    }
+    
+    // MARK: UIView
+    
+    override class var layerClass: AnyClass {
+        return AVCaptureVideoPreviewLayer.self
+    }
+}
+

+ 23 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/TLPhotosPicker+Extension.swift

@@ -0,0 +1,23 @@
+//
+//  TLPhotosPicker+Extension.swift
+//  TLPhotoPicker
+//
+//  Created by wade.hawk on 2017. 7. 24..
+//  Copyright © 2017년 CocoaPods. All rights reserved.
+//
+
+import Foundation
+import TLPhotoPicker
+
+extension TLPhotosPickerViewController {
+    class func custom(withTLPHAssets: (([TLPHAsset]) -> Void)? = nil, didCancel: (() -> Void)? = nil) -> CustomPhotoPickerViewController {
+        let picker = CustomPhotoPickerViewController(withTLPHAssets: withTLPHAssets, didCancel:didCancel)
+        return picker
+    }
+    
+    func wrapNavigationControllerWithoutBar() -> UINavigationController {
+        let navController = UINavigationController(rootViewController: self)
+        navController.navigationBar.isHidden = true
+        return navController
+    }
+}

+ 208 - 0
Carthage/Checkouts/TLPhotoPicker/Example/TLPhotoPicker/ViewController.swift

@@ -0,0 +1,208 @@
+//
+//  ViewController.swift
+//  TLPhotoPicker
+//
+//  Created by wade.hawk on 05/09/2017.
+//  Copyright (c) 2017 wade.hawk. All rights reserved.
+//
+
+import UIKit
+import TLPhotoPicker
+import Photos
+
+class ViewController: UIViewController,TLPhotosPickerViewControllerDelegate {
+    
+    var selectedAssets = [TLPHAsset]()
+    @IBOutlet var label: UILabel!
+    @IBOutlet var imageView: UIImageView!
+    
+    @IBAction func pickerButtonTap() {
+        let viewController = CustomPhotoPickerViewController()
+        viewController.delegate = self
+        viewController.didExceedMaximumNumberOfSelection = { [weak self] (picker) in
+            self?.showExceededMaximumAlert(vc: picker)
+        }
+        var configure = TLPhotosPickerConfigure()
+        configure.numberOfColumn = 3
+        viewController.configure = configure
+        viewController.selectedAssets = self.selectedAssets
+        viewController.logDelegate = self
+
+        self.present(viewController, animated: true, completion: nil)
+    }
+    
+    @IBAction func pickerWithCustomCameraCell() {
+        let viewController = CustomPhotoPickerViewController()
+        viewController.delegate = self
+        viewController.didExceedMaximumNumberOfSelection = { [weak self] (picker) in
+            self?.showExceededMaximumAlert(vc: picker)
+        }
+        var configure = TLPhotosPickerConfigure()
+        configure.numberOfColumn = 3
+        if #available(iOS 10.2, *) {
+            configure.cameraCellNibSet = (nibName: "CustomCameraCell", bundle: Bundle.main)
+        }
+        viewController.configure = configure
+        viewController.selectedAssets = self.selectedAssets
+        self.present(viewController.wrapNavigationControllerWithoutBar(), animated: true, completion: nil)
+    }
+
+    @IBAction func pickerWithNavigation() {
+        let viewController = PhotoPickerWithNavigationViewController()
+        viewController.delegate = self
+        viewController.didExceedMaximumNumberOfSelection = { [weak self] (picker) in
+            self?.showExceededMaximumAlert(vc: picker)
+        }
+        var configure = TLPhotosPickerConfigure()
+        configure.numberOfColumn = 3
+        viewController.configure = configure
+        viewController.selectedAssets = self.selectedAssets
+        
+        self.present(viewController.wrapNavigationControllerWithoutBar(), animated: true, completion: nil)
+    }
+    
+    @IBAction func pickerWithCustomRules() {
+        let viewController = PhotoPickerWithNavigationViewController()
+        viewController.delegate = self
+        viewController.didExceedMaximumNumberOfSelection = { [weak self] (picker) in
+            self?.showExceededMaximumAlert(vc: picker)
+        }
+        viewController.canSelectAsset = { [weak self] asset -> Bool in
+            if asset.pixelHeight != 300 && asset.pixelWidth != 300 {
+                self?.showUnsatisifiedSizeAlert(vc: viewController)
+                return false
+            }
+            return true
+        }
+        var configure = TLPhotosPickerConfigure()
+        configure.numberOfColumn = 3
+        configure.nibSet = (nibName: "CustomCell_Instagram", bundle: Bundle.main)
+        viewController.configure = configure
+        viewController.selectedAssets = self.selectedAssets
+        
+        self.present(viewController.wrapNavigationControllerWithoutBar(), animated: true, completion: nil)
+    }
+    
+    func dismissPhotoPicker(withTLPHAssets: [TLPHAsset]) {
+        // use selected order, fullresolution image
+        self.selectedAssets = withTLPHAssets
+        getFirstSelectedImage()
+        //iCloud or video
+//        getAsyncCopyTemporaryFile()
+    }
+    
+    func exportVideo() {
+        if let asset = self.selectedAssets.first, asset.type == .video {
+            asset.exportVideoFile(progressBlock: { (progress) in
+                print(progress)
+            }) { (url, mimeType) in
+                print("completion\(url)")
+                print(mimeType)
+            }
+        }
+    }
+    
+    func getAsyncCopyTemporaryFile() {
+        if let asset = self.selectedAssets.first {
+            asset.tempCopyMediaFile(convertLivePhotosToJPG: false, progressBlock: { (progress) in
+                print(progress)
+            }, completionBlock: { (url, mimeType) in
+                print("completion\(url)")
+                print(mimeType)
+            })
+        }
+    }
+    
+    func getFirstSelectedImage() {
+        if let asset = self.selectedAssets.first {
+            if asset.type == .video {
+                asset.videoSize(completion: { [weak self] (size) in
+                    self?.label.text = "video file size\(size)"
+                })
+                return
+            }
+            if let image = asset.fullResolutionImage {
+                print(image)
+                self.label.text = "local storage image"
+                self.imageView.image = image
+            }else {
+                print("Can't get image at local storage, try download image")
+                asset.cloudImageDownload(progressBlock: { [weak self] (progress) in
+                    DispatchQueue.main.async {
+                        self?.label.text = "download \(100*progress)%"
+                        print(progress)
+                    }
+                }, completionBlock: { [weak self] (image) in
+                    if let image = image {
+                        //use image
+                        DispatchQueue.main.async {
+                            self?.label.text = "complete download"
+                            self?.imageView.image = image
+                        }
+                    }
+                })
+            }
+        }
+    }
+    
+    func dismissPhotoPicker(withPHAssets: [PHAsset]) {
+        // if you want to used phasset.
+    }
+
+    func photoPickerDidCancel() {
+        // cancel
+    }
+
+    func dismissComplete() {
+        // picker dismiss completion
+    }
+
+    func didExceedMaximumNumberOfSelection(picker: TLPhotosPickerViewController) {
+        self.showExceededMaximumAlert(vc: picker)
+    }
+    
+    func handleNoAlbumPermissions(picker: TLPhotosPickerViewController) {
+        picker.dismiss(animated: true) {
+            let alert = UIAlertController(title: "", message: "Denied albums permissions granted", preferredStyle: .alert)
+            alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: nil))
+            self.present(alert, animated: true, completion: nil)
+        }
+    }
+    
+    func handleNoCameraPermissions(picker: TLPhotosPickerViewController) {
+        let alert = UIAlertController(title: "", message: "Denied camera permissions granted", preferredStyle: .alert)
+        alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: nil))
+        picker.present(alert, animated: true, completion: nil)
+    }
+
+    func showExceededMaximumAlert(vc: UIViewController) {
+        let alert = UIAlertController(title: "", message: "Exceed Maximum Number Of Selection", preferredStyle: .alert)
+        alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: nil))
+        vc.present(alert, animated: true, completion: nil)
+    }
+    
+    func showUnsatisifiedSizeAlert(vc: UIViewController) {
+        let alert = UIAlertController(title: "Oups!", message: "The required size is: 300 x 300", preferredStyle: .alert)
+        alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: nil))
+        vc.present(alert, animated: true, completion: nil)
+    }
+}
+
+extension ViewController: TLPhotosPickerLogDelegate {
+    //For Log User Interaction
+    func selectedCameraCell(picker: TLPhotosPickerViewController) {
+        print("selectedCameraCell")
+    }
+    
+    func selectedPhoto(picker: TLPhotosPickerViewController, at: Int) {
+        print("selectedPhoto")
+    }
+    
+    func deselectedPhoto(picker: TLPhotosPickerViewController, at: Int) {
+        print("deselectedPhoto")
+    }
+    
+    func selectedAlbum(picker: TLPhotosPickerViewController, title: String, at: Int) {
+        print("selectedAlbum")
+    }
+}

+ 24 - 0
Carthage/Checkouts/TLPhotoPicker/Example/Tests/Info.plist

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>$(PRODUCT_NAME)</string>
+	<key>CFBundlePackageType</key>
+	<string>BNDL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+</dict>
+</plist>

+ 50 - 0
Carthage/Checkouts/TLPhotoPicker/Example/Tests/Tests.swift

@@ -0,0 +1,50 @@
+// https://github.com/Quick/Quick
+
+import Quick
+import Nimble
+import TLPhotoPicker
+
+class TableOfContentsSpec: QuickSpec {
+    override func spec() {
+        describe("these will fail") {
+
+            it("can do maths") {
+                expect(1) == 2
+            }
+
+            it("can read") {
+                expect("number") == "string"
+            }
+
+            it("will eventually fail") {
+                expect("time").toEventually( equal("done") )
+            }
+            
+            context("these will pass") {
+
+                it("can do maths") {
+                    expect(23) == 23
+                }
+
+                it("can read") {
+                    expect("🐮") == "🐮"
+                }
+
+                it("will eventually pass") {
+                    var time = "passing"
+
+                    DispatchQueue.main.async {
+                        time = "done"
+                    }
+
+                    waitUntil { done in
+                        Thread.sleep(forTimeInterval: 0.5)
+                        expect(time) == "done"
+
+                        done()
+                    }
+                }
+            }
+        }
+    }
+}

BIN
Carthage/Checkouts/TLPhotoPicker/Images/Privacy.png


BIN
Carthage/Checkouts/TLPhotoPicker/Images/custom_cameracell.gif


BIN
Carthage/Checkouts/TLPhotoPicker/Images/customcell.png


BIN
Carthage/Checkouts/TLPhotoPicker/Images/facebook_ex.gif


BIN
Carthage/Checkouts/TLPhotoPicker/Images/livephotocell.png


BIN
Carthage/Checkouts/TLPhotoPicker/Images/photocell.png


BIN
Carthage/Checkouts/TLPhotoPicker/Images/smartalbum.png


BIN
Carthage/Checkouts/TLPhotoPicker/Images/tlphotologo.png


BIN
Carthage/Checkouts/TLPhotoPicker/Images/tlphotopicker_ex.gif


BIN
Carthage/Checkouts/TLPhotoPicker/Images/videophotocell.png


+ 19 - 0
Carthage/Checkouts/TLPhotoPicker/LICENSE

@@ -0,0 +1,19 @@
+Copyright (c) 2017 wade.hawk <junhyi.park@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 43 - 0
Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker.podspec

@@ -0,0 +1,43 @@
+#
+# Be sure to run `pod lib lint TLPhotoPicker.podspec' to ensure this is a
+# valid spec before submitting.
+#
+# Any lines starting with a # are optional, but their use is encouraged
+# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
+#
+
+Pod::Spec.new do |s|
+  s.name             = 'TLPhotoPicker'
+  s.version          = '1.7.7'
+  s.summary          = 'multiple phassets picker for iOS lib. like facebook'
+
+# This description is used to generate tags and improve search results.
+#   * Think: What does it do? Why did you write it? What is the focus?
+#   * Try to keep it short, snappy and to the point.
+#   * Write the description between the DESC delimiters below.
+#   * Finally, don't worry about the indent, CocoaPods strips it!
+
+  s.description      = <<-DESC
+TODO: Add long description of the pod here.
+                       DESC
+
+  s.homepage         = 'https://github.com/tilltue/TLPhotoPicker'
+  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
+  s.license          = { :type => 'MIT', :file => 'LICENSE' }
+  s.author           = { 'wade.hawk' => 'junhyi.park@gmail.com' }
+  s.source           = { :git => 'https://github.com/tilltue/TLPhotoPicker.git', :tag => s.version.to_s }
+  # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
+
+  s.ios.deployment_target = '9.1'
+  s.swift_version = '4.2'
+  s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.2' }
+
+  s.source_files = 'TLPhotoPicker/Classes/**/*'
+  
+  s.resource_bundles = { 'TLPhotoPicker' => ['TLPhotoPicker/Classes/*.xib'] }
+  s.resources = 'TLPhotoPicker/TLPhotoPickerController.bundle'
+
+  # s.public_header_files = 'Pod/Classes/**/*.h'
+  # s.frameworks = 'UIKit', 'MapKit'
+  # s.dependency 'AFNetworking', '~> 2.3'
+end

+ 0 - 0
Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/.gitkeep


+ 0 - 0
Libraries external/TLPhotoPicker/Classes/TLAlbumPopView.swift → Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLAlbumPopView.swift


+ 0 - 0
Libraries external/TLPhotoPicker/Classes/TLAssetsCollection.swift → Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLAssetsCollection.swift


+ 0 - 0
Libraries external/TLPhotoPicker/Classes/TLBundle.swift → Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLBundle.swift


+ 0 - 0
Libraries external/TLPhotoPicker/Classes/TLCollectionTableViewCell.swift → Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLCollectionTableViewCell.swift


+ 0 - 0
Libraries external/TLPhotoPicker/Classes/TLCollectionTableViewCell.xib → Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLCollectionTableViewCell.xib


+ 0 - 0
Libraries external/TLPhotoPicker/Classes/TLPhotoCollectionViewCell.swift → Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotoCollectionViewCell.swift


+ 0 - 0
Libraries external/TLPhotoPicker/Classes/TLPhotoCollectionViewCell.xib → Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotoCollectionViewCell.xib


+ 0 - 0
Libraries external/TLPhotoPicker/Classes/TLPhotoLibrary.swift → Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotoLibrary.swift


+ 0 - 0
Libraries external/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift → Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift


+ 0 - 0
Libraries external/TLPhotoPicker/Classes/TLPhotosPickerViewController.xib → Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotosPickerViewController.xib


+ 24 - 0
Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/TLPhotoPicker/Info.plist

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>$(DEVELOPMENT_LANGUAGE)</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>$(PRODUCT_NAME)</string>
+	<key>CFBundlePackageType</key>
+	<string>FMWK</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleVersion</key>
+	<string>$(CURRENT_PROJECT_VERSION)</string>
+	<key>NSPrincipalClass</key>
+	<string></string>
+</dict>
+</plist>

+ 0 - 0
Libraries external/TLPhotoPicker/TLPhotoPicker/TLPhotoPicker.h → Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/TLPhotoPicker/TLPhotoPicker.h


+ 0 - 0
Libraries external/TLPhotoPicker/TLPhotoPickerController.bundle/arrow.png → Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/TLPhotoPickerController.bundle/arrow.png


+ 0 - 0
Libraries external/TLPhotoPicker/TLPhotoPickerController.bundle/camera@3x.png → Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/TLPhotoPickerController.bundle/camera@3x.png


+ 0 - 0
Libraries external/TLPhotoPicker/TLPhotoPickerController.bundle/insertPhotoMaterial@3x.png → Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/TLPhotoPickerController.bundle/insertPhotoMaterial@3x.png


+ 0 - 0
Libraries external/TLPhotoPicker/TLPhotoPickerController.bundle/pop_arrow.png → Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/TLPhotoPickerController.bundle/pop_arrow.png


+ 0 - 0
Libraries external/TLPhotoPicker/TLPhotoPickerController.bundle/video.png → Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/TLPhotoPickerController.bundle/video.png


+ 10 - 70
Nextcloud.xcodeproj/project.pbxproj

@@ -126,6 +126,9 @@
 		F72D1042210B783D009C96B7 /* NCEndToEndEncryption.m in Sources */ = {isa = PBXBuildFile; fileRef = F70CAE391F8CF31A008125FD /* NCEndToEndEncryption.m */; };
 		F732BA061D76CE1500E9878B /* CCNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = F732BA041D76CE1500E9878B /* CCNetworking.m */; };
 		F732BA0B1D76DBA500E9878B /* CCNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = F732BA041D76CE1500E9878B /* CCNetworking.m */; };
+		F733B65221997CC2001C1FFA /* TLPhotoPicker.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F733B65121997CC1001C1FFA /* TLPhotoPicker.framework */; };
+		F733B65321997D12001C1FFA /* TLPhotoPicker.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F733B65121997CC1001C1FFA /* TLPhotoPicker.framework */; };
+		F733B65421997D12001C1FFA /* TLPhotoPicker.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F733B65121997CC1001C1FFA /* TLPhotoPicker.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F734E5891F019D860060CB77 /* UIScrollView+EmptyDataSet.m in Sources */ = {isa = PBXBuildFile; fileRef = F73CCE241DC13788007E38D8 /* UIScrollView+EmptyDataSet.m */; };
 		F7381EE1218218C9000B1560 /* NCOffline.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7381EDA218218C9000B1560 /* NCOffline.swift */; };
 		F7381EE5218218C9000B1560 /* NCOffline.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7381EDE218218C9000B1560 /* NCOffline.storyboard */; };
@@ -631,17 +634,6 @@
 		F7F8D71C1ED6183000E711F3 /* CCCellShareExt.m in Sources */ = {isa = PBXBuildFile; fileRef = F7F8D71A1ED6183000E711F3 /* CCCellShareExt.m */; };
 		F7F8D71D1ED6183000E711F3 /* CCCellShareExt.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7F8D71B1ED6183000E711F3 /* CCCellShareExt.xib */; };
 		F7FB1D3E215E191D00D669EA /* NCViewerDocumentWeb.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7FB1D3D215E191D00D669EA /* NCViewerDocumentWeb.swift */; };
-		F7FBBB3A2198381600ADC654 /* TLPhotoLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7FBBB2C2198381500ADC654 /* TLPhotoLibrary.swift */; };
-		F7FBBB3B2198381600ADC654 /* TLCollectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7FBBB2D2198381500ADC654 /* TLCollectionTableViewCell.swift */; };
-		F7FBBB3C2198381600ADC654 /* TLCollectionTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7FBBB2E2198381500ADC654 /* TLCollectionTableViewCell.xib */; };
-		F7FBBB3D2198381600ADC654 /* TLBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7FBBB2F2198381500ADC654 /* TLBundle.swift */; };
-		F7FBBB3E2198381600ADC654 /* TLAlbumPopView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7FBBB302198381500ADC654 /* TLAlbumPopView.swift */; };
-		F7FBBB3F2198381600ADC654 /* TLPhotoCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7FBBB312198381500ADC654 /* TLPhotoCollectionViewCell.swift */; };
-		F7FBBB402198381600ADC654 /* TLPhotoCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7FBBB322198381500ADC654 /* TLPhotoCollectionViewCell.xib */; };
-		F7FBBB412198381600ADC654 /* TLPhotosPickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7FBBB332198381500ADC654 /* TLPhotosPickerViewController.swift */; };
-		F7FBBB422198381600ADC654 /* TLAssetsCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7FBBB342198381500ADC654 /* TLAssetsCollection.swift */; };
-		F7FBBB432198381600ADC654 /* TLPhotosPickerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7FBBB352198381500ADC654 /* TLPhotosPickerViewController.xib */; };
-		F7FBBB442198381600ADC654 /* TLPhotoPickerController.bundle in Resources */ = {isa = PBXBuildFile; fileRef = F7FBBB382198381500ADC654 /* TLPhotoPickerController.bundle */; };
 		F7FC7D561DC1F93800BB2C6A /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = F7FC7D551DC1F93800BB2C6A /* libz.tbd */; };
 		F7FCFFD81D70798C000E6E29 /* CCPeekPop.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7FCFFD61D70798C000E6E29 /* CCPeekPop.storyboard */; };
 		F7FCFFE01D707B83000E6E29 /* CCPeekPop.m in Sources */ = {isa = PBXBuildFile; fileRef = F7FCFFDE1D707B83000E6E29 /* CCPeekPop.m */; };
@@ -680,6 +672,7 @@
 			files = (
 				F7DFE25A1EBDC53200CF5202 /* RealmSwift.framework in Embed Frameworks */,
 				F7DFE2581EBDC52E00CF5202 /* Realm.framework in Embed Frameworks */,
+				F733B65421997D12001C1FFA /* TLPhotoPicker.framework in Embed Frameworks */,
 				F784FA2F210F6FC000256C26 /* KTVCocoaHTTPServer.framework in Embed Frameworks */,
 				F784FA31210F6FC500256C26 /* KTVHTTPCache.framework in Embed Frameworks */,
 			);
@@ -834,6 +827,7 @@
 		F732093B201B81E4008A0888 /* es-419 */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-419"; path = "es-419.lproj/Localizable.strings"; sourceTree = "<group>"; };
 		F732BA031D76CE1500E9878B /* CCNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNetworking.h; sourceTree = "<group>"; };
 		F732BA041D76CE1500E9878B /* CCNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCNetworking.m; sourceTree = "<group>"; };
+		F733B65121997CC1001C1FFA /* TLPhotoPicker.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TLPhotoPicker.framework; path = Carthage/Build/iOS/TLPhotoPicker.framework; sourceTree = "<group>"; };
 		F7381EDA218218C9000B1560 /* NCOffline.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCOffline.swift; sourceTree = "<group>"; };
 		F7381EDE218218C9000B1560 /* NCOffline.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = NCOffline.storyboard; sourceTree = "<group>"; };
 		F738E8401F90FFD100F95C8E /* NCManageEndToEndEncryption.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NCManageEndToEndEncryption.h; sourceTree = "<group>"; };
@@ -1550,18 +1544,6 @@
 		F7F8D71A1ED6183000E711F3 /* CCCellShareExt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCCellShareExt.m; sourceTree = "<group>"; };
 		F7F8D71B1ED6183000E711F3 /* CCCellShareExt.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CCCellShareExt.xib; sourceTree = "<group>"; };
 		F7FB1D3D215E191D00D669EA /* NCViewerDocumentWeb.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCViewerDocumentWeb.swift; sourceTree = "<group>"; };
-		F7FBBB2C2198381500ADC654 /* TLPhotoLibrary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLPhotoLibrary.swift; sourceTree = "<group>"; };
-		F7FBBB2D2198381500ADC654 /* TLCollectionTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLCollectionTableViewCell.swift; sourceTree = "<group>"; };
-		F7FBBB2E2198381500ADC654 /* TLCollectionTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TLCollectionTableViewCell.xib; sourceTree = "<group>"; };
-		F7FBBB2F2198381500ADC654 /* TLBundle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLBundle.swift; sourceTree = "<group>"; };
-		F7FBBB302198381500ADC654 /* TLAlbumPopView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLAlbumPopView.swift; sourceTree = "<group>"; };
-		F7FBBB312198381500ADC654 /* TLPhotoCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLPhotoCollectionViewCell.swift; sourceTree = "<group>"; };
-		F7FBBB322198381500ADC654 /* TLPhotoCollectionViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TLPhotoCollectionViewCell.xib; sourceTree = "<group>"; };
-		F7FBBB332198381500ADC654 /* TLPhotosPickerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLPhotosPickerViewController.swift; sourceTree = "<group>"; };
-		F7FBBB342198381500ADC654 /* TLAssetsCollection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLAssetsCollection.swift; sourceTree = "<group>"; };
-		F7FBBB352198381500ADC654 /* TLPhotosPickerViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TLPhotosPickerViewController.xib; sourceTree = "<group>"; };
-		F7FBBB372198381500ADC654 /* TLPhotoPicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLPhotoPicker.h; sourceTree = "<group>"; };
-		F7FBBB382198381500ADC654 /* TLPhotoPickerController.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = TLPhotoPickerController.bundle; sourceTree = "<group>"; };
 		F7FC7D551DC1F93800BB2C6A /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
 		F7FCFFD61D70798C000E6E29 /* CCPeekPop.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = CCPeekPop.storyboard; sourceTree = "<group>"; };
 		F7FCFFDD1D707B83000E6E29 /* CCPeekPop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPeekPop.h; sourceTree = "<group>"; };
@@ -1616,6 +1598,7 @@
 				F7DFE2541EBDC3A400CF5202 /* RealmSwift.framework in Frameworks */,
 				F784FA2E210F6FC000256C26 /* KTVCocoaHTTPServer.framework in Frameworks */,
 				F7A377161EB2364A002856D3 /* Crashlytics.framework in Frameworks */,
+				F733B65221997CC2001C1FFA /* TLPhotoPicker.framework in Frameworks */,
 				F7FC7D561DC1F93800BB2C6A /* libz.tbd in Frameworks */,
 				F7A3771A1EB2364A002856D3 /* Fabric.framework in Frameworks */,
 				F72D0FFE210B6638009C96B7 /* nanopb.framework in Frameworks */,
@@ -1625,6 +1608,7 @@
 				F72D1000210B6638009C96B7 /* FirebaseInstanceID.framework in Frameworks */,
 				F7BB14961D5B62C000ECEE68 /* libcrypto.a in Frameworks */,
 				F7BB14971D5B62C000ECEE68 /* libssl.a in Frameworks */,
+				F733B65321997D12001C1FFA /* TLPhotoPicker.framework in Frameworks */,
 				F784FA30210F6FC500256C26 /* KTVHTTPCache.framework in Frameworks */,
 				F72D1001210B6638009C96B7 /* FirebaseCoreDiagnostics.framework in Frameworks */,
 				F72D0FFA210B6638009C96B7 /* FirebaseMessaging.framework in Frameworks */,
@@ -1796,7 +1780,6 @@
 				F7CA1EBB20E7E3FE002CC65E /* PKDownloadButton */,
 				F75037421DBFA91A008FB480 /* PureLayout */,
 				F70F05241C889184008DAB36 /* Reachability */,
-				F7FBBB292198381500ADC654 /* TLPhotoPicker */,
 				F7DFE24E1EBDC3A400CF5202 /* Realm */,
 				F7A55417204EF8AF008468EC /* TOScrollBar */,
 				F7622F6F2175FCC0000383FF /* Sheeeeeeeeet */,
@@ -3396,44 +3379,10 @@
 			path = Move;
 			sourceTree = "<group>";
 		};
-		F7FBBB292198381500ADC654 /* TLPhotoPicker */ = {
-			isa = PBXGroup;
-			children = (
-				F7FBBB2A2198381500ADC654 /* Classes */,
-				F7FBBB362198381500ADC654 /* TLPhotoPicker */,
-				F7FBBB382198381500ADC654 /* TLPhotoPickerController.bundle */,
-			);
-			path = TLPhotoPicker;
-			sourceTree = "<group>";
-		};
-		F7FBBB2A2198381500ADC654 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-				F7FBBB2C2198381500ADC654 /* TLPhotoLibrary.swift */,
-				F7FBBB2D2198381500ADC654 /* TLCollectionTableViewCell.swift */,
-				F7FBBB2E2198381500ADC654 /* TLCollectionTableViewCell.xib */,
-				F7FBBB2F2198381500ADC654 /* TLBundle.swift */,
-				F7FBBB302198381500ADC654 /* TLAlbumPopView.swift */,
-				F7FBBB312198381500ADC654 /* TLPhotoCollectionViewCell.swift */,
-				F7FBBB322198381500ADC654 /* TLPhotoCollectionViewCell.xib */,
-				F7FBBB332198381500ADC654 /* TLPhotosPickerViewController.swift */,
-				F7FBBB342198381500ADC654 /* TLAssetsCollection.swift */,
-				F7FBBB352198381500ADC654 /* TLPhotosPickerViewController.xib */,
-			);
-			path = Classes;
-			sourceTree = "<group>";
-		};
-		F7FBBB362198381500ADC654 /* TLPhotoPicker */ = {
-			isa = PBXGroup;
-			children = (
-				F7FBBB372198381500ADC654 /* TLPhotoPicker.h */,
-			);
-			path = TLPhotoPicker;
-			sourceTree = "<group>";
-		};
 		F7FC7D541DC1F93700BB2C6A /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
+				F733B65121997CC1001C1FFA /* TLPhotoPicker.framework */,
 				F75EDFBE1E8C116D00E6F369 /* libstdc++.tbd */,
 				F75EDFBC1E8C112F00E6F369 /* libsqlite3.0.tbd */,
 				08EA97441E6554FC004C83FA /* FirebaseAnalytics.framework */,
@@ -3743,7 +3692,6 @@
 				F7F54CFA1E5B14C700E19C62 /* UIBarButtonItemArrowLeft.png in Resources */,
 				F7FCFFD81D70798C000E6E29 /* CCPeekPop.storyboard in Resources */,
 				F7F54CF61E5B14C700E19C62 /* PlayButtonOverlayLarge@3x.png in Resources */,
-				F7FBBB402198381600ADC654 /* TLPhotoCollectionViewCell.xib in Resources */,
 				F7D423371F0596AC009C9782 /* AppIcon-180.png in Resources */,
 				F7D423401F0596AC009C9782 /* Reader-Email@3x.png in Resources */,
 				F7D423391F0596AC009C9782 /* Reader-Button-H@2x.png in Resources */,
@@ -3760,7 +3708,6 @@
 				F7F54CE81E5B14C700E19C62 /* ImageSelectedOff.png in Resources */,
 				F7D4234B1F0596AC009C9782 /* Reader-Print@2x.png in Resources */,
 				F762CB971EACB84400B38484 /* icon-info.png in Resources */,
-				F7FBBB432198381600ADC654 /* TLPhotosPickerViewController.xib in Resources */,
 				F7169A1E1EE590930086BD69 /* NCSharesCell.xib in Resources */,
 				F73D71641F2674A400E233EB /* NCText.storyboard in Resources */,
 				F7226EDC1EE4089300EBECB1 /* Main.storyboard in Resources */,
@@ -3806,7 +3753,6 @@
 				F7C525A21E3B6DA800FFE02C /* CCNotification.storyboard in Resources */,
 				F7F54CEB1E5B14C700E19C62 /* ImageSelectedOn.png in Resources */,
 				F72D1003210B67CE009C96B7 /* GoogleService-Info.plist in Resources */,
-				F7FBBB3C2198381600ADC654 /* TLCollectionTableViewCell.xib in Resources */,
 				F762CB951EACB84400B38484 /* icon-error.png in Resources */,
 				F7F54CF01E5B14C700E19C62 /* ImageSelectedSmallOff@3x.png in Resources */,
 				F73B4EF01F470D9100BBEE4B /* CMakeLists.txt in Resources */,
@@ -3817,7 +3763,6 @@
 				F7D423341F0596AC009C9782 /* AppIcon-120.png in Resources */,
 				F7D4234F1F0596AC009C9782 /* Reader-Thumbs@3x.png in Resources */,
 				F7F54CE51E5B14C700E19C62 /* ImageError.png in Resources */,
-				F7FBBB442198381600ADC654 /* TLPhotoPickerController.bundle in Resources */,
 				F7D423381F0596AC009C9782 /* Reader-Button-H.png in Resources */,
 				F7F54CFC1E5B14C700E19C62 /* UIBarButtonItemArrowLeft@3x.png in Resources */,
 				F77B0F7D1D118A16002130FE /* Images.xcassets in Resources */,
@@ -4103,7 +4048,6 @@
 				F73B4EF71F470D9100BBEE4B /* LangBulgarianModel.cpp in Sources */,
 				F7F54D0C1E5B14C800E19C62 /* MWTapDetectingView.m in Sources */,
 				F758B444212C516300515F55 /* AVCaptureVideoOrientation+Utils.swift in Sources */,
-				F7FBBB3A2198381600ADC654 /* TLPhotoLibrary.swift in Sources */,
 				F758B3E4212C4A6C00515F55 /* PDFGenerator.swift in Sources */,
 				F7B1FBC61E72E3D1001781FE /* SwiftModalWebVC.swift in Sources */,
 				F7622FD02175FCC0000383FF /* ActionSheetCustomItem.swift in Sources */,
@@ -4153,7 +4097,6 @@
 				F7622FAF2175FCC0000383FF /* ActionSheet.swift in Sources */,
 				F77B0E231D118A16002130FE /* CCSharePermissionOC.m in Sources */,
 				F7622FD12175FCC0000383FF /* ActionSheetSingleSelectItem.swift in Sources */,
-				F7FBBB412198381600ADC654 /* TLPhotosPickerViewController.swift in Sources */,
 				F762CAF81EACB66200B38484 /* XLFormButtonCell.m in Sources */,
 				F7CA1ED120E7E3FE002CC65E /* PKCircleProgressView.m in Sources */,
 				F75AE3C71E9D12900088BB09 /* SwiftyAvatar.swift in Sources */,
@@ -4244,7 +4187,6 @@
 				F77B0E671D118A16002130FE /* Reachability.m in Sources */,
 				F762CB121EACB66200B38484 /* UIView+XLFormAdditions.m in Sources */,
 				F70BFC7420E0FA7D00C67599 /* NCUtility.swift in Sources */,
-				F7FBBB3E2198381600ADC654 /* TLAlbumPopView.swift in Sources */,
 				F73CC06F1E813DFF006E3047 /* BKPasscodeInputView.m in Sources */,
 				F754EECC21772B6100BB1CDF /* SectionHeader.swift in Sources */,
 				F73CC0751E813DFF006E3047 /* BKPasscodeViewController.m in Sources */,
@@ -4298,7 +4240,6 @@
 				F762CAF71EACB66200B38484 /* XLFormBaseCell.m in Sources */,
 				F70022E01EC4C9100080073F /* OCXMLListParser.m in Sources */,
 				F758B43E212C516300515F55 /* ImageScannerController.swift in Sources */,
-				F7FBBB3B2198381600ADC654 /* TLCollectionTableViewCell.swift in Sources */,
 				F70022B31EC4C9100080073F /* OCActivity.m in Sources */,
 				F70022D41EC4C9100080073F /* NSDate+ISO8601.m in Sources */,
 				F78964AD1EBB576C00403E13 /* JDStatusBarNotification.m in Sources */,
@@ -4309,7 +4250,6 @@
 				F758B447212C516300515F55 /* CGRect+Utils.swift in Sources */,
 				F762CB0A1EACB66200B38484 /* XLFormDescriptor.m in Sources */,
 				F7D4238C1F0596C6009C9782 /* UIXToolbarView.m in Sources */,
-				F7FBBB3D2198381600ADC654 /* TLBundle.swift in Sources */,
 				F726EEEC1FED1C820030B9C8 /* NCEndToEndInitialize.swift in Sources */,
 				F7622FBB2175FCC0000383FF /* ActionSheetSelectItemAppearance.swift in Sources */,
 				F7622FB12175FCC0000383FF /* ActionSheetPopoverApperance.swift in Sources */,
@@ -4319,7 +4259,6 @@
 				F762CAFB1EACB66200B38484 /* XLFormDatePickerCell.m in Sources */,
 				F762CB0F1EACB66200B38484 /* NSObject+XLFormAdditions.m in Sources */,
 				F7B2DEF01F976854007CF4D2 /* NYMnemonic.m in Sources */,
-				F7FBBB3F2198381600ADC654 /* TLPhotoCollectionViewCell.swift in Sources */,
 				F7622FD82175FCC0000383FF /* ActionSheetCollectionItemCell.swift in Sources */,
 				F762CB891EACB81000B38484 /* REMenuItem.m in Sources */,
 				F7D423791F0596C6009C9782 /* CGPDFDocument.m in Sources */,
@@ -4340,7 +4279,6 @@
 				F7CA1ED220E7E3FE002CC65E /* PKCircleView.m in Sources */,
 				F7F54D0D1E5B14C800E19C62 /* MWZoomingScrollView.m in Sources */,
 				F762CB0B1EACB66200B38484 /* XLFormRowDescriptor.m in Sources */,
-				F7FBBB422198381600ADC654 /* TLAssetsCollection.swift in Sources */,
 				F7169A1C1EE590930086BD69 /* NCShares.m in Sources */,
 				F77B0EC61D118A16002130FE /* CCCellMain.m in Sources */,
 				F758B3E6212C4A6C00515F55 /* PDFPage.swift in Sources */,
@@ -4753,6 +4691,7 @@
 					"$(PROJECT_DIR)\"/Libraries external/Fabric\"",
 					"$(PROJECT_DIR)\"/Libraries external/Realm\"",
 					"$(PROJECT_DIR)\"/Libraries external/KTVHTTPCache\"",
+					"$(PROJECT_DIR)/Carthage/Build/iOS",
 				);
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = iOSClient/CryptoCloud.pch;
@@ -4801,6 +4740,7 @@
 					"$(PROJECT_DIR)\"/Libraries external/Fabric\"",
 					"$(PROJECT_DIR)\"/Libraries external/Realm\"",
 					"$(PROJECT_DIR)\"/Libraries external/KTVHTTPCache\"",
+					"$(PROJECT_DIR)/Carthage/Build/iOS",
 				);
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = iOSClient/CryptoCloud.pch;

+ 1 - 0
iOSClient/Main/NCMainCommon.swift

@@ -22,6 +22,7 @@
 //
 
 import Foundation
+import TLPhotoPicker
 
 class NCMainCommon: NSObject {
     

+ 1 - 0
iOSClient/Main/NCPhotosPickerViewController/NCPhotosPickerViewController.swift

@@ -22,6 +22,7 @@
 //
 
 import Foundation
+import TLPhotoPicker
 
 class NCPhotosPickerViewController: NSObject {