├── .gitignore ├── .travis.yml ├── Example ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ └── RMImagePicker.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ └── Target Support Files │ │ ├── Pods-RMImagePickerExample-RMImagePicker │ │ ├── Info.plist │ │ ├── Pods-RMImagePickerExample-RMImagePicker-Private.xcconfig │ │ ├── Pods-RMImagePickerExample-RMImagePicker-dummy.m │ │ ├── Pods-RMImagePickerExample-RMImagePicker-prefix.pch │ │ ├── Pods-RMImagePickerExample-RMImagePicker-umbrella.h │ │ ├── Pods-RMImagePickerExample-RMImagePicker.modulemap │ │ └── Pods-RMImagePickerExample-RMImagePicker.xcconfig │ │ └── Pods-RMImagePickerExample │ │ ├── Info.plist │ │ ├── Pods-RMImagePickerExample-acknowledgements.markdown │ │ ├── Pods-RMImagePickerExample-acknowledgements.plist │ │ ├── Pods-RMImagePickerExample-dummy.m │ │ ├── Pods-RMImagePickerExample-environment.h │ │ ├── Pods-RMImagePickerExample-frameworks.sh │ │ ├── Pods-RMImagePickerExample-resources.sh │ │ ├── Pods-RMImagePickerExample-umbrella.h │ │ ├── Pods-RMImagePickerExample.debug.xcconfig │ │ ├── Pods-RMImagePickerExample.modulemap │ │ └── Pods-RMImagePickerExample.release.xcconfig ├── RMImagePickerExample.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── RMImagePickerExample.xcworkspace │ └── contents.xcworkspacedata ├── RMImagePickerExample │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── ImagesViewController.swift │ └── Info.plist └── RMImagePickerExampleTests │ ├── Info.plist │ └── RMImagePickerExampleTests.swift ├── LICENSE ├── README.md ├── RMImagePicker.podspec └── Source ├── Info.plist ├── RMAlbumCell.swift ├── RMAlbumCell.xib ├── RMAlbumPickerController.swift ├── RMAssetCell.swift ├── RMAssetCollectionPicker.swift ├── RMImagePicker.h ├── RMImagePickerController.swift ├── RMImages.xcassets ├── tick_deselected.imageset │ ├── Contents.json │ ├── tick_deselected.png │ ├── tick_deselected@2x.png │ └── tick_deselected@3x.png └── tick_selected.imageset │ ├── Contents.json │ ├── tick_selected.png │ ├── tick_selected@2x.png │ └── tick_selected@3x.png └── RMPlaceholderView.xib /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | # We recommend against adding the Pods directory to your .gitignore. However 26 | # you should judge for yourself, the pros and cons are mentioned at: 27 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 28 | # 29 | # Note: if you ignore the Pods directory, make sure to uncomment 30 | # `pod install` in .travis.yml 31 | # 32 | # Pods/ 33 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | language: objective-c 6 | # cache: cocoapods 7 | # podfile: Example/Podfile 8 | # before_install: 9 | # - gem install cocoapods # Since Travis is not always on latest version 10 | # - pod install --project-directory=Example 11 | install: 12 | - gem install xcpretty --no-rdoc --no-ri --no-document --quiet 13 | script: 14 | - set -o pipefail && xcodebuild test -workspace Example/RMImagePickerExample.xcworkspace -scheme RMImagePicker-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c 15 | - pod lib lint --quick 16 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | use_frameworks! 4 | 5 | target 'RMImagePickerExample', :exclusive => true do 6 | pod "RMImagePicker", :path => "../" 7 | end 8 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - RMImagePicker (0.1.4) 3 | 4 | DEPENDENCIES: 5 | - RMImagePicker (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | RMImagePicker: 9 | :path: ../ 10 | 11 | SPEC CHECKSUMS: 12 | RMImagePicker: cd8bd7acb6374935976956935d63ce1b7c60e5d9 13 | 14 | COCOAPODS: 0.36.0 15 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/RMImagePicker.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RMImagePicker", 3 | "version": "0.1.4", 4 | "summary": "iOS image picker with single and multiple selection written in Swift using Apple PhotoKit.", 5 | "description": " iOS image picker with single and multiple selection\n written in Swift using Apple PhotoKit.\n", 6 | "homepage": "https://github.com/maxdrift/RMImagePicker", 7 | "license": "MIT", 8 | "authors": { 9 | "Riccardo Massari": "maxdrift85@gmail.com" 10 | }, 11 | "source": { 12 | "git": "https://github.com/maxdrift/RMImagePicker.git", 13 | "tag": "0.1.4" 14 | }, 15 | "social_media_url": "https://twitter.com/maxdrift", 16 | "platforms": { 17 | "ios": "8.1" 18 | }, 19 | "source_files": "Source/*.swift", 20 | "resources": [ 21 | "Source/RMImages.xcassets/tick_selected.imageset/*.png", 22 | "Source/RMImages.xcassets/tick_deselected.imageset/*.png", 23 | "Source/*.xib" 24 | ], 25 | "requires_arc": true, 26 | "frameworks": "Photos" 27 | } 28 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - RMImagePicker (0.1.4) 3 | 4 | DEPENDENCIES: 5 | - RMImagePicker (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | RMImagePicker: 9 | :path: ../ 10 | 11 | SPEC CHECKSUMS: 12 | RMImagePicker: cd8bd7acb6374935976956935d63ce1b7c60e5d9 13 | 14 | COCOAPODS: 0.36.0 15 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 04FC211361193D9F8802A17F /* tick_deselected@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 0869EBBE3683F17D83C22E9C /* tick_deselected@2x.png */; }; 11 | 07B5CF6173F65C4712641846 /* Pods-RMImagePickerExample-RMImagePicker-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AA5697157EB7865883E63D2 /* Pods-RMImagePickerExample-RMImagePicker-dummy.m */; }; 12 | 0A247140112912C89CC8341F /* RMAssetCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09AF9690340A23A1A2B05ED2 /* RMAssetCell.swift */; }; 13 | 1754BF91167286126BD35E7B /* RMAssetCollectionPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B8AFFE26F64F40C10551D7D /* RMAssetCollectionPicker.swift */; }; 14 | 271F5B88E88D1B828963E939 /* Pods-RMImagePickerExample-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8FAD8D6195F6056B1AFE4C6A /* Pods-RMImagePickerExample-dummy.m */; }; 15 | 3AB1D4A22EED61EC4D4E87E6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16A4A07BA6FA42232805DF /* Foundation.framework */; }; 16 | 3EBBEEDC2DEBECCB2470AA88 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16A4A07BA6FA42232805DF /* Foundation.framework */; }; 17 | 60A05C1CA53112DB88FB8366 /* tick_deselected@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 25839C92EFCDF4A22B0F4F18 /* tick_deselected@3x.png */; }; 18 | 69DEA5EBB3E2EF55F811E894 /* RMImagePickerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EAC19F9A2BCAD6A2813513B /* RMImagePickerController.swift */; }; 19 | 6FAF41D93EF77ACC670F7889 /* RMAlbumPickerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FBBF61C4A014CA7ADCCE55B /* RMAlbumPickerController.swift */; }; 20 | 7E884613BBE96AD4D5BF4BDC /* tick_selected@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C2573A98D511B537A1199596 /* tick_selected@2x.png */; }; 21 | 7F5880CDE9109DEB284B8640 /* RMAlbumCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0106309975472088A7581005 /* RMAlbumCell.xib */; }; 22 | A124846A5D42B54943599B9B /* tick_selected@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7003C7712B2CA77851BB25A5 /* tick_selected@3x.png */; }; 23 | A8D98444A9DA4490A81B19C4 /* Pods-RMImagePickerExample-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D987644FCBEBE27330FF4546 /* Pods-RMImagePickerExample-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 24 | B2D04D162AD9A310BB4560A3 /* RMAlbumCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 244D5C7F5AC8ECA5D9E0D6EB /* RMAlbumCell.swift */; }; 25 | B59AA494261260C13FF32F5D /* Pods-RMImagePickerExample-RMImagePicker-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 80265F1E44327511771AC5D4 /* Pods-RMImagePickerExample-RMImagePicker-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26 | BDF146EE5A7A1A1B5FBA4374 /* tick_deselected.png in Resources */ = {isa = PBXBuildFile; fileRef = EF36F6CF5DF9E0AE32BC37B0 /* tick_deselected.png */; }; 27 | C5650BC3F03C1814226F9D76 /* Photos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D5983140D367DD753561694 /* Photos.framework */; }; 28 | C701061D6EE6EE0712E85967 /* RMPlaceholderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F072C2B1C7CF462173A1546B /* RMPlaceholderView.xib */; }; 29 | D29CDCCBE2114C82285D3F46 /* tick_selected.png in Resources */ = {isa = PBXBuildFile; fileRef = 306FAF182D0478B05D7E21C8 /* tick_selected.png */; }; 30 | /* End PBXBuildFile section */ 31 | 32 | /* Begin PBXContainerItemProxy section */ 33 | 8A7498F692BB31883DF57A0C /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = F5EC99E149B4D3CFCE6E5A3E /* Project object */; 36 | proxyType = 1; 37 | remoteGlobalIDString = 77FAF2C7F6BDC75935D9E778; 38 | remoteInfo = "Pods-RMImagePickerExample-RMImagePicker"; 39 | }; 40 | /* End PBXContainerItemProxy section */ 41 | 42 | /* Begin PBXFileReference section */ 43 | 0106309975472088A7581005 /* RMAlbumCell.xib */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file.xib; path = RMAlbumCell.xib; sourceTree = ""; }; 44 | 031905ECB0F35302A4EE7E37 /* Pods-RMImagePickerExample-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-RMImagePickerExample-resources.sh"; sourceTree = ""; }; 45 | 06061EBD5F80B2AC64A1A60E /* Pods-RMImagePickerExample-RMImagePicker-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-RMImagePickerExample-RMImagePicker-prefix.pch"; sourceTree = ""; }; 46 | 0869EBBE3683F17D83C22E9C /* tick_deselected@2x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = "tick_deselected@2x.png"; sourceTree = ""; }; 47 | 09AF9690340A23A1A2B05ED2 /* RMAssetCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = RMAssetCell.swift; sourceTree = ""; }; 48 | 0AA5697157EB7865883E63D2 /* Pods-RMImagePickerExample-RMImagePicker-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-RMImagePickerExample-RMImagePicker-dummy.m"; sourceTree = ""; }; 49 | 1EE3E931FA24DF08F85A0815 /* RMImagePicker.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RMImagePicker.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 228B64DF69B4494C188F421E /* Pods-RMImagePickerExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RMImagePickerExample.release.xcconfig"; sourceTree = ""; }; 51 | 244D5C7F5AC8ECA5D9E0D6EB /* RMAlbumCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = RMAlbumCell.swift; sourceTree = ""; }; 52 | 248AAE171035D28CACFBBB6C /* Pods_RMImagePickerExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RMImagePickerExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 25839C92EFCDF4A22B0F4F18 /* tick_deselected@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = "tick_deselected@3x.png"; sourceTree = ""; }; 54 | 2B8AFFE26F64F40C10551D7D /* RMAssetCollectionPicker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = RMAssetCollectionPicker.swift; sourceTree = ""; }; 55 | 2D16A4A07BA6FA42232805DF /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 56 | 306FAF182D0478B05D7E21C8 /* tick_selected.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = tick_selected.png; sourceTree = ""; }; 57 | 4D5983140D367DD753561694 /* Photos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Photos.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/Photos.framework; sourceTree = DEVELOPER_DIR; }; 58 | 583B52EDC2C15EECA30F1C89 /* Pods-RMImagePickerExample-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-RMImagePickerExample-acknowledgements.markdown"; sourceTree = ""; }; 59 | 6B5EE0F6F98F19095BADF56C /* Pods-RMImagePickerExample-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-RMImagePickerExample-frameworks.sh"; sourceTree = ""; }; 60 | 6EAC19F9A2BCAD6A2813513B /* RMImagePickerController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = RMImagePickerController.swift; sourceTree = ""; }; 61 | 7003C7712B2CA77851BB25A5 /* tick_selected@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = "tick_selected@3x.png"; sourceTree = ""; }; 62 | 80265F1E44327511771AC5D4 /* Pods-RMImagePickerExample-RMImagePicker-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-RMImagePickerExample-RMImagePicker-umbrella.h"; sourceTree = ""; }; 63 | 842AFE97F84C8D4C1C01B0AA /* Pods-RMImagePickerExample-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RMImagePickerExample-acknowledgements.plist"; sourceTree = ""; }; 64 | 8FAD8D6195F6056B1AFE4C6A /* Pods-RMImagePickerExample-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-RMImagePickerExample-dummy.m"; sourceTree = ""; }; 65 | 978B4071287827D8D7762F00 /* Pods-RMImagePickerExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RMImagePickerExample.debug.xcconfig"; sourceTree = ""; }; 66 | 9BE3179C9D5D2A370CF90ABB /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 67 | 9FBBF61C4A014CA7ADCCE55B /* RMAlbumPickerController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = RMAlbumPickerController.swift; sourceTree = ""; }; 68 | A772C4DC882023A37FC157F5 /* Pods-RMImagePickerExample.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-RMImagePickerExample.modulemap"; sourceTree = ""; }; 69 | A90413635BF526FC92C3E416 /* Pods-RMImagePickerExample-environment.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-RMImagePickerExample-environment.h"; sourceTree = ""; }; 70 | B30C9CE89D38447A22B1C05D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 71 | BBC602A6C533799968682F2E /* Pods-RMImagePickerExample-RMImagePicker.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-RMImagePickerExample-RMImagePicker.modulemap"; sourceTree = ""; }; 72 | C07DFE291132817B0E5A0574 /* Pods-RMImagePickerExample-RMImagePicker.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RMImagePickerExample-RMImagePicker.xcconfig"; sourceTree = ""; }; 73 | C2573A98D511B537A1199596 /* tick_selected@2x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = "tick_selected@2x.png"; sourceTree = ""; }; 74 | C50EB8E7F41E091A86E55914 /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 75 | D987644FCBEBE27330FF4546 /* Pods-RMImagePickerExample-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-RMImagePickerExample-umbrella.h"; sourceTree = ""; }; 76 | EC2B21879B3246D895BB7934 /* Pods-RMImagePickerExample-RMImagePicker-Private.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RMImagePickerExample-RMImagePicker-Private.xcconfig"; sourceTree = ""; }; 77 | EF36F6CF5DF9E0AE32BC37B0 /* tick_deselected.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = tick_deselected.png; sourceTree = ""; }; 78 | F072C2B1C7CF462173A1546B /* RMPlaceholderView.xib */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file.xib; path = RMPlaceholderView.xib; sourceTree = ""; }; 79 | /* End PBXFileReference section */ 80 | 81 | /* Begin PBXFrameworksBuildPhase section */ 82 | 27EC213128A7F5797DAAE2E0 /* Frameworks */ = { 83 | isa = PBXFrameworksBuildPhase; 84 | buildActionMask = 2147483647; 85 | files = ( 86 | 3EBBEEDC2DEBECCB2470AA88 /* Foundation.framework in Frameworks */, 87 | C5650BC3F03C1814226F9D76 /* Photos.framework in Frameworks */, 88 | ); 89 | runOnlyForDeploymentPostprocessing = 0; 90 | }; 91 | 70EA2B25A80BD96AE188B888 /* Frameworks */ = { 92 | isa = PBXFrameworksBuildPhase; 93 | buildActionMask = 2147483647; 94 | files = ( 95 | 3AB1D4A22EED61EC4D4E87E6 /* Foundation.framework in Frameworks */, 96 | ); 97 | runOnlyForDeploymentPostprocessing = 0; 98 | }; 99 | /* End PBXFrameworksBuildPhase section */ 100 | 101 | /* Begin PBXGroup section */ 102 | 1DFEBF8C92A33E12C36F6061 /* iOS */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 2D16A4A07BA6FA42232805DF /* Foundation.framework */, 106 | 4D5983140D367DD753561694 /* Photos.framework */, 107 | ); 108 | name = iOS; 109 | sourceTree = ""; 110 | }; 111 | 210D1CB2C195509E71988CAF /* tick_deselected.imageset */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | EF36F6CF5DF9E0AE32BC37B0 /* tick_deselected.png */, 115 | 0869EBBE3683F17D83C22E9C /* tick_deselected@2x.png */, 116 | 25839C92EFCDF4A22B0F4F18 /* tick_deselected@3x.png */, 117 | ); 118 | path = tick_deselected.imageset; 119 | sourceTree = ""; 120 | }; 121 | 21CFAB6024F95E44CAB1F13A /* RMImagePicker */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 5B52414128FEEC50B35FBBC6 /* Resources */, 125 | 6B88600B78A6B038658C6665 /* Source */, 126 | BDB0642A7D3A3705B18B4DB3 /* Support Files */, 127 | ); 128 | name = RMImagePicker; 129 | path = ../..; 130 | sourceTree = ""; 131 | }; 132 | 55995D7678D60C285EC0A28B /* Targets Support Files */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | E69F2DE7C91DC1A2DBC4BDED /* Pods-RMImagePickerExample */, 136 | ); 137 | name = "Targets Support Files"; 138 | sourceTree = ""; 139 | }; 140 | 57CA2463FC2394ACFE400832 /* Development Pods */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | 21CFAB6024F95E44CAB1F13A /* RMImagePicker */, 144 | ); 145 | name = "Development Pods"; 146 | sourceTree = ""; 147 | }; 148 | 599A9C66E59AF1205266536D /* Products */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | 248AAE171035D28CACFBBB6C /* Pods_RMImagePickerExample.framework */, 152 | 1EE3E931FA24DF08F85A0815 /* RMImagePicker.framework */, 153 | ); 154 | name = Products; 155 | sourceTree = ""; 156 | }; 157 | 5B52414128FEEC50B35FBBC6 /* Resources */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | FFCFB883EBECCEA5BF7892A3 /* Source */, 161 | ); 162 | name = Resources; 163 | sourceTree = ""; 164 | }; 165 | 5C4079673110B1ED98AD992A /* tick_selected.imageset */ = { 166 | isa = PBXGroup; 167 | children = ( 168 | 306FAF182D0478B05D7E21C8 /* tick_selected.png */, 169 | C2573A98D511B537A1199596 /* tick_selected@2x.png */, 170 | 7003C7712B2CA77851BB25A5 /* tick_selected@3x.png */, 171 | ); 172 | path = tick_selected.imageset; 173 | sourceTree = ""; 174 | }; 175 | 6AEF848C15BB4974D37C650A = { 176 | isa = PBXGroup; 177 | children = ( 178 | C50EB8E7F41E091A86E55914 /* Podfile */, 179 | 57CA2463FC2394ACFE400832 /* Development Pods */, 180 | CD83B06DDB5D0027A3197D6F /* Frameworks */, 181 | 599A9C66E59AF1205266536D /* Products */, 182 | 55995D7678D60C285EC0A28B /* Targets Support Files */, 183 | ); 184 | sourceTree = ""; 185 | }; 186 | 6B88600B78A6B038658C6665 /* Source */ = { 187 | isa = PBXGroup; 188 | children = ( 189 | 244D5C7F5AC8ECA5D9E0D6EB /* RMAlbumCell.swift */, 190 | 9FBBF61C4A014CA7ADCCE55B /* RMAlbumPickerController.swift */, 191 | 09AF9690340A23A1A2B05ED2 /* RMAssetCell.swift */, 192 | 2B8AFFE26F64F40C10551D7D /* RMAssetCollectionPicker.swift */, 193 | 6EAC19F9A2BCAD6A2813513B /* RMImagePickerController.swift */, 194 | ); 195 | path = Source; 196 | sourceTree = ""; 197 | }; 198 | BDB0642A7D3A3705B18B4DB3 /* Support Files */ = { 199 | isa = PBXGroup; 200 | children = ( 201 | B30C9CE89D38447A22B1C05D /* Info.plist */, 202 | BBC602A6C533799968682F2E /* Pods-RMImagePickerExample-RMImagePicker.modulemap */, 203 | C07DFE291132817B0E5A0574 /* Pods-RMImagePickerExample-RMImagePicker.xcconfig */, 204 | EC2B21879B3246D895BB7934 /* Pods-RMImagePickerExample-RMImagePicker-Private.xcconfig */, 205 | 0AA5697157EB7865883E63D2 /* Pods-RMImagePickerExample-RMImagePicker-dummy.m */, 206 | 06061EBD5F80B2AC64A1A60E /* Pods-RMImagePickerExample-RMImagePicker-prefix.pch */, 207 | 80265F1E44327511771AC5D4 /* Pods-RMImagePickerExample-RMImagePicker-umbrella.h */, 208 | ); 209 | name = "Support Files"; 210 | path = "Example/Pods/Target Support Files/Pods-RMImagePickerExample-RMImagePicker"; 211 | sourceTree = ""; 212 | }; 213 | C098B285DB00C62E16AB8DD8 /* RMImages.xcassets */ = { 214 | isa = PBXGroup; 215 | children = ( 216 | 210D1CB2C195509E71988CAF /* tick_deselected.imageset */, 217 | 5C4079673110B1ED98AD992A /* tick_selected.imageset */, 218 | ); 219 | path = RMImages.xcassets; 220 | sourceTree = ""; 221 | }; 222 | CD83B06DDB5D0027A3197D6F /* Frameworks */ = { 223 | isa = PBXGroup; 224 | children = ( 225 | 1DFEBF8C92A33E12C36F6061 /* iOS */, 226 | ); 227 | name = Frameworks; 228 | sourceTree = ""; 229 | }; 230 | E69F2DE7C91DC1A2DBC4BDED /* Pods-RMImagePickerExample */ = { 231 | isa = PBXGroup; 232 | children = ( 233 | 9BE3179C9D5D2A370CF90ABB /* Info.plist */, 234 | A772C4DC882023A37FC157F5 /* Pods-RMImagePickerExample.modulemap */, 235 | 583B52EDC2C15EECA30F1C89 /* Pods-RMImagePickerExample-acknowledgements.markdown */, 236 | 842AFE97F84C8D4C1C01B0AA /* Pods-RMImagePickerExample-acknowledgements.plist */, 237 | 8FAD8D6195F6056B1AFE4C6A /* Pods-RMImagePickerExample-dummy.m */, 238 | A90413635BF526FC92C3E416 /* Pods-RMImagePickerExample-environment.h */, 239 | 6B5EE0F6F98F19095BADF56C /* Pods-RMImagePickerExample-frameworks.sh */, 240 | 031905ECB0F35302A4EE7E37 /* Pods-RMImagePickerExample-resources.sh */, 241 | D987644FCBEBE27330FF4546 /* Pods-RMImagePickerExample-umbrella.h */, 242 | 978B4071287827D8D7762F00 /* Pods-RMImagePickerExample.debug.xcconfig */, 243 | 228B64DF69B4494C188F421E /* Pods-RMImagePickerExample.release.xcconfig */, 244 | ); 245 | name = "Pods-RMImagePickerExample"; 246 | path = "Target Support Files/Pods-RMImagePickerExample"; 247 | sourceTree = ""; 248 | }; 249 | FFCFB883EBECCEA5BF7892A3 /* Source */ = { 250 | isa = PBXGroup; 251 | children = ( 252 | 0106309975472088A7581005 /* RMAlbumCell.xib */, 253 | F072C2B1C7CF462173A1546B /* RMPlaceholderView.xib */, 254 | C098B285DB00C62E16AB8DD8 /* RMImages.xcassets */, 255 | ); 256 | path = Source; 257 | sourceTree = ""; 258 | }; 259 | /* End PBXGroup section */ 260 | 261 | /* Begin PBXHeadersBuildPhase section */ 262 | 0D846C194816EF17301FC256 /* Headers */ = { 263 | isa = PBXHeadersBuildPhase; 264 | buildActionMask = 2147483647; 265 | files = ( 266 | A8D98444A9DA4490A81B19C4 /* Pods-RMImagePickerExample-umbrella.h in Headers */, 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | }; 270 | 1A0C7A6DD4E952A2E5715A87 /* Headers */ = { 271 | isa = PBXHeadersBuildPhase; 272 | buildActionMask = 2147483647; 273 | files = ( 274 | B59AA494261260C13FF32F5D /* Pods-RMImagePickerExample-RMImagePicker-umbrella.h in Headers */, 275 | ); 276 | runOnlyForDeploymentPostprocessing = 0; 277 | }; 278 | /* End PBXHeadersBuildPhase section */ 279 | 280 | /* Begin PBXNativeTarget section */ 281 | 77FAF2C7F6BDC75935D9E778 /* Pods-RMImagePickerExample-RMImagePicker */ = { 282 | isa = PBXNativeTarget; 283 | buildConfigurationList = 20CAB531E5649C5C627EA8AF /* Build configuration list for PBXNativeTarget "Pods-RMImagePickerExample-RMImagePicker" */; 284 | buildPhases = ( 285 | 9AC2DC6E4EA3475DB8984E2B /* Sources */, 286 | 27EC213128A7F5797DAAE2E0 /* Frameworks */, 287 | 4A20E9B7B3727FB44F98585E /* Resources */, 288 | 1A0C7A6DD4E952A2E5715A87 /* Headers */, 289 | ); 290 | buildRules = ( 291 | ); 292 | dependencies = ( 293 | ); 294 | name = "Pods-RMImagePickerExample-RMImagePicker"; 295 | productName = "Pods-RMImagePickerExample-RMImagePicker"; 296 | productReference = 1EE3E931FA24DF08F85A0815 /* RMImagePicker.framework */; 297 | productType = "com.apple.product-type.framework"; 298 | }; 299 | BA9EDDFA8C55E8731318F998 /* Pods-RMImagePickerExample */ = { 300 | isa = PBXNativeTarget; 301 | buildConfigurationList = 38480969EEBA118B6898045E /* Build configuration list for PBXNativeTarget "Pods-RMImagePickerExample" */; 302 | buildPhases = ( 303 | DD0D9D730C8715062A9E95D4 /* Sources */, 304 | 70EA2B25A80BD96AE188B888 /* Frameworks */, 305 | 0D846C194816EF17301FC256 /* Headers */, 306 | ); 307 | buildRules = ( 308 | ); 309 | dependencies = ( 310 | 0B12B30E5D5ADA0B6C6516D5 /* PBXTargetDependency */, 311 | ); 312 | name = "Pods-RMImagePickerExample"; 313 | productName = "Pods-RMImagePickerExample"; 314 | productReference = 248AAE171035D28CACFBBB6C /* Pods_RMImagePickerExample.framework */; 315 | productType = "com.apple.product-type.framework"; 316 | }; 317 | /* End PBXNativeTarget section */ 318 | 319 | /* Begin PBXProject section */ 320 | F5EC99E149B4D3CFCE6E5A3E /* Project object */ = { 321 | isa = PBXProject; 322 | attributes = { 323 | LastUpgradeCheck = 0510; 324 | }; 325 | buildConfigurationList = DBA2E0F211C86D1D4919CF33 /* Build configuration list for PBXProject "Pods" */; 326 | compatibilityVersion = "Xcode 3.2"; 327 | developmentRegion = English; 328 | hasScannedForEncodings = 0; 329 | knownRegions = ( 330 | en, 331 | ); 332 | mainGroup = 6AEF848C15BB4974D37C650A; 333 | productRefGroup = 599A9C66E59AF1205266536D /* Products */; 334 | projectDirPath = ""; 335 | projectRoot = ""; 336 | targets = ( 337 | BA9EDDFA8C55E8731318F998 /* Pods-RMImagePickerExample */, 338 | 77FAF2C7F6BDC75935D9E778 /* Pods-RMImagePickerExample-RMImagePicker */, 339 | ); 340 | }; 341 | /* End PBXProject section */ 342 | 343 | /* Begin PBXResourcesBuildPhase section */ 344 | 4A20E9B7B3727FB44F98585E /* Resources */ = { 345 | isa = PBXResourcesBuildPhase; 346 | buildActionMask = 2147483647; 347 | files = ( 348 | 7F5880CDE9109DEB284B8640 /* RMAlbumCell.xib in Resources */, 349 | C701061D6EE6EE0712E85967 /* RMPlaceholderView.xib in Resources */, 350 | BDF146EE5A7A1A1B5FBA4374 /* tick_deselected.png in Resources */, 351 | 04FC211361193D9F8802A17F /* tick_deselected@2x.png in Resources */, 352 | 60A05C1CA53112DB88FB8366 /* tick_deselected@3x.png in Resources */, 353 | D29CDCCBE2114C82285D3F46 /* tick_selected.png in Resources */, 354 | 7E884613BBE96AD4D5BF4BDC /* tick_selected@2x.png in Resources */, 355 | A124846A5D42B54943599B9B /* tick_selected@3x.png in Resources */, 356 | ); 357 | runOnlyForDeploymentPostprocessing = 0; 358 | }; 359 | /* End PBXResourcesBuildPhase section */ 360 | 361 | /* Begin PBXSourcesBuildPhase section */ 362 | 9AC2DC6E4EA3475DB8984E2B /* Sources */ = { 363 | isa = PBXSourcesBuildPhase; 364 | buildActionMask = 2147483647; 365 | files = ( 366 | 07B5CF6173F65C4712641846 /* Pods-RMImagePickerExample-RMImagePicker-dummy.m in Sources */, 367 | B2D04D162AD9A310BB4560A3 /* RMAlbumCell.swift in Sources */, 368 | 6FAF41D93EF77ACC670F7889 /* RMAlbumPickerController.swift in Sources */, 369 | 0A247140112912C89CC8341F /* RMAssetCell.swift in Sources */, 370 | 1754BF91167286126BD35E7B /* RMAssetCollectionPicker.swift in Sources */, 371 | 69DEA5EBB3E2EF55F811E894 /* RMImagePickerController.swift in Sources */, 372 | ); 373 | runOnlyForDeploymentPostprocessing = 0; 374 | }; 375 | DD0D9D730C8715062A9E95D4 /* Sources */ = { 376 | isa = PBXSourcesBuildPhase; 377 | buildActionMask = 2147483647; 378 | files = ( 379 | 271F5B88E88D1B828963E939 /* Pods-RMImagePickerExample-dummy.m in Sources */, 380 | ); 381 | runOnlyForDeploymentPostprocessing = 0; 382 | }; 383 | /* End PBXSourcesBuildPhase section */ 384 | 385 | /* Begin PBXTargetDependency section */ 386 | 0B12B30E5D5ADA0B6C6516D5 /* PBXTargetDependency */ = { 387 | isa = PBXTargetDependency; 388 | name = "Pods-RMImagePickerExample-RMImagePicker"; 389 | target = 77FAF2C7F6BDC75935D9E778 /* Pods-RMImagePickerExample-RMImagePicker */; 390 | targetProxy = 8A7498F692BB31883DF57A0C /* PBXContainerItemProxy */; 391 | }; 392 | /* End PBXTargetDependency section */ 393 | 394 | /* Begin XCBuildConfiguration section */ 395 | 393B3A40E403BE50A86C69DC /* Debug */ = { 396 | isa = XCBuildConfiguration; 397 | buildSettings = { 398 | ALWAYS_SEARCH_USER_PATHS = NO; 399 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 400 | CLANG_CXX_LIBRARY = "libc++"; 401 | CLANG_ENABLE_MODULES = YES; 402 | CLANG_ENABLE_OBJC_ARC = YES; 403 | CLANG_WARN_BOOL_CONVERSION = YES; 404 | CLANG_WARN_CONSTANT_CONVERSION = YES; 405 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 406 | CLANG_WARN_EMPTY_BODY = YES; 407 | CLANG_WARN_ENUM_CONVERSION = YES; 408 | CLANG_WARN_INT_CONVERSION = YES; 409 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 410 | CLANG_WARN_UNREACHABLE_CODE = YES; 411 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 412 | COPY_PHASE_STRIP = NO; 413 | GCC_C_LANGUAGE_STANDARD = gnu99; 414 | GCC_DYNAMIC_NO_PIC = NO; 415 | GCC_OPTIMIZATION_LEVEL = 0; 416 | GCC_PREPROCESSOR_DEFINITIONS = ( 417 | "DEBUG=1", 418 | "$(inherited)", 419 | ); 420 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 421 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 422 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 423 | GCC_WARN_UNDECLARED_SELECTOR = YES; 424 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 425 | GCC_WARN_UNUSED_FUNCTION = YES; 426 | GCC_WARN_UNUSED_VARIABLE = YES; 427 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 428 | ONLY_ACTIVE_ARCH = YES; 429 | STRIP_INSTALLED_PRODUCT = NO; 430 | SYMROOT = "${SRCROOT}/../build"; 431 | }; 432 | name = Debug; 433 | }; 434 | 788DEEAE6C4C19C2DD0A336C /* Debug */ = { 435 | isa = XCBuildConfiguration; 436 | baseConfigurationReference = 978B4071287827D8D7762F00 /* Pods-RMImagePickerExample.debug.xcconfig */; 437 | buildSettings = { 438 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 439 | CURRENT_PROJECT_VERSION = 1; 440 | DEFINES_MODULE = YES; 441 | DYLIB_COMPATIBILITY_VERSION = 1; 442 | DYLIB_CURRENT_VERSION = 1; 443 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 444 | ENABLE_STRICT_OBJC_MSGSEND = YES; 445 | INFOPLIST_FILE = "Target Support Files/Pods-RMImagePickerExample/Info.plist"; 446 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 447 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 448 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 449 | MODULEMAP_FILE = "Target Support Files/Pods-RMImagePickerExample/Pods-RMImagePickerExample.modulemap"; 450 | MTL_ENABLE_DEBUG_INFO = YES; 451 | OTHER_LDFLAGS = ""; 452 | OTHER_LIBTOOLFLAGS = ""; 453 | PODS_ROOT = "$(SRCROOT)"; 454 | PRODUCT_NAME = Pods_RMImagePickerExample; 455 | SDKROOT = iphoneos; 456 | SKIP_INSTALL = YES; 457 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 458 | TARGETED_DEVICE_FAMILY = "1,2"; 459 | VERSIONING_SYSTEM = "apple-generic"; 460 | VERSION_INFO_PREFIX = ""; 461 | }; 462 | name = Debug; 463 | }; 464 | B04E3D9B1B236D56FFEE9DE2 /* Release */ = { 465 | isa = XCBuildConfiguration; 466 | baseConfigurationReference = 228B64DF69B4494C188F421E /* Pods-RMImagePickerExample.release.xcconfig */; 467 | buildSettings = { 468 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 469 | CURRENT_PROJECT_VERSION = 1; 470 | DEFINES_MODULE = YES; 471 | DYLIB_COMPATIBILITY_VERSION = 1; 472 | DYLIB_CURRENT_VERSION = 1; 473 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 474 | ENABLE_STRICT_OBJC_MSGSEND = YES; 475 | INFOPLIST_FILE = "Target Support Files/Pods-RMImagePickerExample/Info.plist"; 476 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 477 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 478 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 479 | MODULEMAP_FILE = "Target Support Files/Pods-RMImagePickerExample/Pods-RMImagePickerExample.modulemap"; 480 | MTL_ENABLE_DEBUG_INFO = NO; 481 | OTHER_LDFLAGS = ""; 482 | OTHER_LIBTOOLFLAGS = ""; 483 | PODS_ROOT = "$(SRCROOT)"; 484 | PRODUCT_NAME = Pods_RMImagePickerExample; 485 | SDKROOT = iphoneos; 486 | SKIP_INSTALL = YES; 487 | TARGETED_DEVICE_FAMILY = "1,2"; 488 | VERSIONING_SYSTEM = "apple-generic"; 489 | VERSION_INFO_PREFIX = ""; 490 | }; 491 | name = Release; 492 | }; 493 | C35B541B9D4673AF009D99F3 /* Release */ = { 494 | isa = XCBuildConfiguration; 495 | baseConfigurationReference = EC2B21879B3246D895BB7934 /* Pods-RMImagePickerExample-RMImagePicker-Private.xcconfig */; 496 | buildSettings = { 497 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 498 | CURRENT_PROJECT_VERSION = 1; 499 | DEFINES_MODULE = YES; 500 | DYLIB_COMPATIBILITY_VERSION = 1; 501 | DYLIB_CURRENT_VERSION = 1; 502 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 503 | ENABLE_STRICT_OBJC_MSGSEND = YES; 504 | GCC_PREFIX_HEADER = "Target Support Files/Pods-RMImagePickerExample-RMImagePicker/Pods-RMImagePickerExample-RMImagePicker-prefix.pch"; 505 | INFOPLIST_FILE = "Target Support Files/Pods-RMImagePickerExample-RMImagePicker/Info.plist"; 506 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 507 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 508 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 509 | MODULEMAP_FILE = "Target Support Files/Pods-RMImagePickerExample-RMImagePicker/Pods-RMImagePickerExample-RMImagePicker.modulemap"; 510 | MTL_ENABLE_DEBUG_INFO = NO; 511 | PRODUCT_NAME = RMImagePicker; 512 | SDKROOT = iphoneos; 513 | SKIP_INSTALL = YES; 514 | TARGETED_DEVICE_FAMILY = "1,2"; 515 | VERSIONING_SYSTEM = "apple-generic"; 516 | VERSION_INFO_PREFIX = ""; 517 | }; 518 | name = Release; 519 | }; 520 | EA18F12EB9C6F2F4ACF1D193 /* Release */ = { 521 | isa = XCBuildConfiguration; 522 | buildSettings = { 523 | ALWAYS_SEARCH_USER_PATHS = NO; 524 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 525 | CLANG_CXX_LIBRARY = "libc++"; 526 | CLANG_ENABLE_MODULES = YES; 527 | CLANG_ENABLE_OBJC_ARC = YES; 528 | CLANG_WARN_BOOL_CONVERSION = YES; 529 | CLANG_WARN_CONSTANT_CONVERSION = YES; 530 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 531 | CLANG_WARN_EMPTY_BODY = YES; 532 | CLANG_WARN_ENUM_CONVERSION = YES; 533 | CLANG_WARN_INT_CONVERSION = YES; 534 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 535 | CLANG_WARN_UNREACHABLE_CODE = YES; 536 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 537 | COPY_PHASE_STRIP = YES; 538 | ENABLE_NS_ASSERTIONS = NO; 539 | GCC_C_LANGUAGE_STANDARD = gnu99; 540 | GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1"; 541 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 542 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 543 | GCC_WARN_UNDECLARED_SELECTOR = YES; 544 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 545 | GCC_WARN_UNUSED_FUNCTION = YES; 546 | GCC_WARN_UNUSED_VARIABLE = YES; 547 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 548 | STRIP_INSTALLED_PRODUCT = NO; 549 | SYMROOT = "${SRCROOT}/../build"; 550 | VALIDATE_PRODUCT = YES; 551 | }; 552 | name = Release; 553 | }; 554 | ECAF421055EA47A682AEC188 /* Debug */ = { 555 | isa = XCBuildConfiguration; 556 | baseConfigurationReference = EC2B21879B3246D895BB7934 /* Pods-RMImagePickerExample-RMImagePicker-Private.xcconfig */; 557 | buildSettings = { 558 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 559 | CURRENT_PROJECT_VERSION = 1; 560 | DEFINES_MODULE = YES; 561 | DYLIB_COMPATIBILITY_VERSION = 1; 562 | DYLIB_CURRENT_VERSION = 1; 563 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 564 | ENABLE_STRICT_OBJC_MSGSEND = YES; 565 | GCC_PREFIX_HEADER = "Target Support Files/Pods-RMImagePickerExample-RMImagePicker/Pods-RMImagePickerExample-RMImagePicker-prefix.pch"; 566 | INFOPLIST_FILE = "Target Support Files/Pods-RMImagePickerExample-RMImagePicker/Info.plist"; 567 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 568 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 569 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 570 | MODULEMAP_FILE = "Target Support Files/Pods-RMImagePickerExample-RMImagePicker/Pods-RMImagePickerExample-RMImagePicker.modulemap"; 571 | MTL_ENABLE_DEBUG_INFO = YES; 572 | PRODUCT_NAME = RMImagePicker; 573 | SDKROOT = iphoneos; 574 | SKIP_INSTALL = YES; 575 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 576 | TARGETED_DEVICE_FAMILY = "1,2"; 577 | VERSIONING_SYSTEM = "apple-generic"; 578 | VERSION_INFO_PREFIX = ""; 579 | }; 580 | name = Debug; 581 | }; 582 | /* End XCBuildConfiguration section */ 583 | 584 | /* Begin XCConfigurationList section */ 585 | 20CAB531E5649C5C627EA8AF /* Build configuration list for PBXNativeTarget "Pods-RMImagePickerExample-RMImagePicker" */ = { 586 | isa = XCConfigurationList; 587 | buildConfigurations = ( 588 | ECAF421055EA47A682AEC188 /* Debug */, 589 | C35B541B9D4673AF009D99F3 /* Release */, 590 | ); 591 | defaultConfigurationIsVisible = 0; 592 | defaultConfigurationName = Release; 593 | }; 594 | 38480969EEBA118B6898045E /* Build configuration list for PBXNativeTarget "Pods-RMImagePickerExample" */ = { 595 | isa = XCConfigurationList; 596 | buildConfigurations = ( 597 | 788DEEAE6C4C19C2DD0A336C /* Debug */, 598 | B04E3D9B1B236D56FFEE9DE2 /* Release */, 599 | ); 600 | defaultConfigurationIsVisible = 0; 601 | defaultConfigurationName = Release; 602 | }; 603 | DBA2E0F211C86D1D4919CF33 /* Build configuration list for PBXProject "Pods" */ = { 604 | isa = XCConfigurationList; 605 | buildConfigurations = ( 606 | 393B3A40E403BE50A86C69DC /* Debug */, 607 | EA18F12EB9C6F2F4ACF1D193 /* Release */, 608 | ); 609 | defaultConfigurationIsVisible = 0; 610 | defaultConfigurationName = Release; 611 | }; 612 | /* End XCConfigurationList section */ 613 | }; 614 | rootObject = F5EC99E149B4D3CFCE6E5A3E /* Project object */; 615 | } 616 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample-RMImagePicker/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.1.4 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample-RMImagePicker/Pods-RMImagePickerExample-RMImagePicker-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-RMImagePickerExample-RMImagePicker.xcconfig" 2 | CONFIGURATION_BUILD_DIR = $PODS_FRAMEWORK_BUILD_PATH 3 | FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/RMImagePicker" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/RMImagePicker" 6 | OTHER_LDFLAGS = ${PODS_RMIMAGEPICKEREXAMPLE_RMIMAGEPICKER_OTHER_LDFLAGS} -ObjC 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-RMImagePickerExample 9 | PODS_ROOT = ${SRCROOT} 10 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample-RMImagePicker/Pods-RMImagePickerExample-RMImagePicker-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_RMImagePickerExample_RMImagePicker : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_RMImagePickerExample_RMImagePicker 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample-RMImagePicker/Pods-RMImagePickerExample-RMImagePicker-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-RMImagePickerExample-environment.h" 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample-RMImagePicker/Pods-RMImagePickerExample-RMImagePicker-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double RMImagePickerVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char RMImagePickerVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample-RMImagePicker/Pods-RMImagePickerExample-RMImagePicker.modulemap: -------------------------------------------------------------------------------- 1 | framework module RMImagePicker { 2 | umbrella header "Pods-RMImagePickerExample-RMImagePicker-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample-RMImagePicker/Pods-RMImagePickerExample-RMImagePicker.xcconfig: -------------------------------------------------------------------------------- 1 | PODS_RMIMAGEPICKEREXAMPLE_RMIMAGEPICKER_OTHER_LDFLAGS = -framework "Photos" -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample/Pods-RMImagePickerExample-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## RMImagePicker 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) 2015 Riccardo Massari 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | Generated by CocoaPods - http://cocoapods.org 29 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample/Pods-RMImagePickerExample-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | The MIT License (MIT) 18 | 19 | Copyright (c) 2015 Riccardo Massari 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | Title 40 | RMImagePicker 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - http://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample/Pods-RMImagePickerExample-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_RMImagePickerExample : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_RMImagePickerExample 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample/Pods-RMImagePickerExample-environment.h: -------------------------------------------------------------------------------- 1 | 2 | // To check if a library is compiled with CocoaPods you 3 | // can use the `COCOAPODS` macro definition which is 4 | // defined in the xcconfigs so it is available in 5 | // headers also when they are imported in the client 6 | // project. 7 | 8 | 9 | // RMImagePicker 10 | #define COCOAPODS_POD_AVAILABLE_RMImagePicker 11 | #define COCOAPODS_VERSION_MAJOR_RMImagePicker 0 12 | #define COCOAPODS_VERSION_MINOR_RMImagePicker 1 13 | #define COCOAPODS_VERSION_PATCH_RMImagePicker 4 14 | 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample/Pods-RMImagePickerExample-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | local source="${BUILT_PRODUCTS_DIR}/Pods-RMImagePickerExample/$1" 12 | local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | 14 | if [ -L "${source}" ]; then 15 | echo "Symlinked..." 16 | source=$(readlink "${source}") 17 | fi 18 | 19 | # use filter instead of exclude so missing patterns dont' throw errors 20 | echo "rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers/" --filter "- PrivateHeaders/" ${source} ${destination}" 21 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers/" --filter "- PrivateHeaders/" "${source}" "${destination}" 22 | # Resign the code if required by the build settings to avoid unstable apps 23 | if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then 24 | code_sign "${destination}/$1" 25 | fi 26 | 27 | # Embed linked Swift runtime libraries 28 | local basename 29 | basename=$(echo $1 | sed -E s/\\..+// && exit ${PIPESTATUS[0]}) 30 | local swift_runtime_libs 31 | swift_runtime_libs=$(xcrun otool -LX "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/$1/${basename}" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 32 | for lib in $swift_runtime_libs; do 33 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 34 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 35 | if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then 36 | code_sign "${destination}/${lib}" 37 | fi 38 | done 39 | } 40 | 41 | # Signs a framework with the provided identity 42 | code_sign() { 43 | # Use the current code_sign_identitiy 44 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 45 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements $1" 46 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" 47 | } 48 | 49 | 50 | if [[ "$CONFIGURATION" == "Debug" ]]; then 51 | install_framework 'RMImagePicker.framework' 52 | fi 53 | if [[ "$CONFIGURATION" == "Release" ]]; then 54 | install_framework 'RMImagePicker.framework' 55 | fi 56 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample/Pods-RMImagePickerExample-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES="" 10 | 11 | install_resource() 12 | { 13 | case $1 in 14 | *.storyboard) 15 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 16 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 17 | ;; 18 | *.xib) 19 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 20 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 21 | ;; 22 | *.framework) 23 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 24 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 25 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 26 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 27 | ;; 28 | *.xcdatamodel) 29 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 30 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 31 | ;; 32 | *.xcdatamodeld) 33 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 34 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 35 | ;; 36 | *.xcmappingmodel) 37 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" 38 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" 39 | ;; 40 | *.xcassets) 41 | XCASSET_FILES="$XCASSET_FILES '$1'" 42 | ;; 43 | /*) 44 | echo "$1" 45 | echo "$1" >> "$RESOURCES_TO_COPY" 46 | ;; 47 | *) 48 | echo "${PODS_ROOT}/$1" 49 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 50 | ;; 51 | esac 52 | } 53 | 54 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 55 | if [[ "${ACTION}" == "install" ]]; then 56 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 57 | fi 58 | rm -f "$RESOURCES_TO_COPY" 59 | 60 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n $XCASSET_FILES ] 61 | then 62 | case "${TARGETED_DEVICE_FAMILY}" in 63 | 1,2) 64 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 65 | ;; 66 | 1) 67 | TARGET_DEVICE_ARGS="--target-device iphone" 68 | ;; 69 | 2) 70 | TARGET_DEVICE_ARGS="--target-device ipad" 71 | ;; 72 | *) 73 | TARGET_DEVICE_ARGS="--target-device mac" 74 | ;; 75 | esac 76 | echo $XCASSET_FILES | xargs actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 77 | fi 78 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample/Pods-RMImagePickerExample-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double Pods_RMImagePickerExampleVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char Pods_RMImagePickerExampleVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample/Pods-RMImagePickerExample.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_FRAMEWORK_BUILD_PATH/RMImagePicker.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "RMImagePicker" 6 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-RMImagePickerExample 9 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample/Pods-RMImagePickerExample.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_RMImagePickerExample { 2 | umbrella header "Pods-RMImagePickerExample-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RMImagePickerExample/Pods-RMImagePickerExample.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_FRAMEWORK_BUILD_PATH/RMImagePicker.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "RMImagePicker" 6 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-RMImagePickerExample 9 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Example/RMImagePickerExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0931AD991AADFA68004364FD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0931AD981AADFA68004364FD /* AppDelegate.swift */; }; 11 | 0931AD9E1AADFA68004364FD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0931AD9C1AADFA68004364FD /* Main.storyboard */; }; 12 | 0931ADA01AADFA68004364FD /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0931AD9F1AADFA68004364FD /* Images.xcassets */; }; 13 | 0931ADA31AADFA68004364FD /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0931ADA11AADFA68004364FD /* LaunchScreen.xib */; }; 14 | 0931ADAF1AADFA68004364FD /* RMImagePickerExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0931ADAE1AADFA68004364FD /* RMImagePickerExampleTests.swift */; }; 15 | 09372F601AAFAD12004F2095 /* ImagesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09372F5F1AAFAD12004F2095 /* ImagesViewController.swift */; }; 16 | A1852C105383CE5538C5FD16 /* Pods_RMImagePickerExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 599962A71C7503AC72523DEA /* Pods_RMImagePickerExample.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | 0931ADA91AADFA68004364FD /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = 0931AD8B1AADFA68004364FD /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = 0931AD921AADFA68004364FD; 25 | remoteInfo = RMImagePickerExample; 26 | }; 27 | /* End PBXContainerItemProxy section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 0931AD931AADFA68004364FD /* RMImagePickerExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RMImagePickerExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 0931AD971AADFA68004364FD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 0931AD981AADFA68004364FD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33 | 0931AD9D1AADFA68004364FD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 34 | 0931AD9F1AADFA68004364FD /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 35 | 0931ADA21AADFA68004364FD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 36 | 0931ADA81AADFA68004364FD /* RMImagePickerExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RMImagePickerExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | 0931ADAD1AADFA68004364FD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 38 | 0931ADAE1AADFA68004364FD /* RMImagePickerExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RMImagePickerExampleTests.swift; sourceTree = ""; }; 39 | 09372F5F1AAFAD12004F2095 /* ImagesViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImagesViewController.swift; sourceTree = ""; }; 40 | 3F1C108D5D01F45EBBE45BC8 /* Pods-RMImagePickerExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RMImagePickerExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RMImagePickerExample/Pods-RMImagePickerExample.debug.xcconfig"; sourceTree = ""; }; 41 | 599962A71C7503AC72523DEA /* Pods_RMImagePickerExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RMImagePickerExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | E815BAC3B93FF1E9620B2B18 /* Pods-RMImagePickerExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RMImagePickerExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-RMImagePickerExample/Pods-RMImagePickerExample.release.xcconfig"; sourceTree = ""; }; 43 | /* End PBXFileReference section */ 44 | 45 | /* Begin PBXFrameworksBuildPhase section */ 46 | 0931AD901AADFA68004364FD /* Frameworks */ = { 47 | isa = PBXFrameworksBuildPhase; 48 | buildActionMask = 2147483647; 49 | files = ( 50 | A1852C105383CE5538C5FD16 /* Pods_RMImagePickerExample.framework in Frameworks */, 51 | ); 52 | runOnlyForDeploymentPostprocessing = 0; 53 | }; 54 | 0931ADA51AADFA68004364FD /* Frameworks */ = { 55 | isa = PBXFrameworksBuildPhase; 56 | buildActionMask = 2147483647; 57 | files = ( 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | 0931AD8A1AADFA68004364FD = { 65 | isa = PBXGroup; 66 | children = ( 67 | 0931AD951AADFA68004364FD /* RMImagePickerExample */, 68 | 0931ADAB1AADFA68004364FD /* RMImagePickerExampleTests */, 69 | 0931AD941AADFA68004364FD /* Products */, 70 | 67BDB85AF64C3FD071DDE88D /* Pods */, 71 | 4E01D92DFD71F9FD0BA35CD0 /* Frameworks */, 72 | ); 73 | sourceTree = ""; 74 | }; 75 | 0931AD941AADFA68004364FD /* Products */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 0931AD931AADFA68004364FD /* RMImagePickerExample.app */, 79 | 0931ADA81AADFA68004364FD /* RMImagePickerExampleTests.xctest */, 80 | ); 81 | name = Products; 82 | sourceTree = ""; 83 | }; 84 | 0931AD951AADFA68004364FD /* RMImagePickerExample */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 0931AD981AADFA68004364FD /* AppDelegate.swift */, 88 | 09372F5F1AAFAD12004F2095 /* ImagesViewController.swift */, 89 | 0931AD9C1AADFA68004364FD /* Main.storyboard */, 90 | 0931AD9F1AADFA68004364FD /* Images.xcassets */, 91 | 0931ADA11AADFA68004364FD /* LaunchScreen.xib */, 92 | 0931AD961AADFA68004364FD /* Supporting Files */, 93 | ); 94 | path = RMImagePickerExample; 95 | sourceTree = ""; 96 | }; 97 | 0931AD961AADFA68004364FD /* Supporting Files */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 0931AD971AADFA68004364FD /* Info.plist */, 101 | ); 102 | name = "Supporting Files"; 103 | sourceTree = ""; 104 | }; 105 | 0931ADAB1AADFA68004364FD /* RMImagePickerExampleTests */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 0931ADAE1AADFA68004364FD /* RMImagePickerExampleTests.swift */, 109 | 0931ADAC1AADFA68004364FD /* Supporting Files */, 110 | ); 111 | path = RMImagePickerExampleTests; 112 | sourceTree = ""; 113 | }; 114 | 0931ADAC1AADFA68004364FD /* Supporting Files */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | 0931ADAD1AADFA68004364FD /* Info.plist */, 118 | ); 119 | name = "Supporting Files"; 120 | sourceTree = ""; 121 | }; 122 | 4E01D92DFD71F9FD0BA35CD0 /* Frameworks */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 599962A71C7503AC72523DEA /* Pods_RMImagePickerExample.framework */, 126 | ); 127 | name = Frameworks; 128 | sourceTree = ""; 129 | }; 130 | 67BDB85AF64C3FD071DDE88D /* Pods */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 3F1C108D5D01F45EBBE45BC8 /* Pods-RMImagePickerExample.debug.xcconfig */, 134 | E815BAC3B93FF1E9620B2B18 /* Pods-RMImagePickerExample.release.xcconfig */, 135 | ); 136 | name = Pods; 137 | sourceTree = ""; 138 | }; 139 | /* End PBXGroup section */ 140 | 141 | /* Begin PBXNativeTarget section */ 142 | 0931AD921AADFA68004364FD /* RMImagePickerExample */ = { 143 | isa = PBXNativeTarget; 144 | buildConfigurationList = 0931ADB21AADFA68004364FD /* Build configuration list for PBXNativeTarget "RMImagePickerExample" */; 145 | buildPhases = ( 146 | 2564219F0EE9E9D018FDE788 /* Check Pods Manifest.lock */, 147 | 0931AD8F1AADFA68004364FD /* Sources */, 148 | 0931AD901AADFA68004364FD /* Frameworks */, 149 | 0931AD911AADFA68004364FD /* Resources */, 150 | D3B5DBBF90BCBFAD395BB5D5 /* Embed Pods Frameworks */, 151 | 715F08C556D109EEAF6F60B7 /* Copy Pods Resources */, 152 | ); 153 | buildRules = ( 154 | ); 155 | dependencies = ( 156 | ); 157 | name = RMImagePickerExample; 158 | productName = RMImagePickerExample; 159 | productReference = 0931AD931AADFA68004364FD /* RMImagePickerExample.app */; 160 | productType = "com.apple.product-type.application"; 161 | }; 162 | 0931ADA71AADFA68004364FD /* RMImagePickerExampleTests */ = { 163 | isa = PBXNativeTarget; 164 | buildConfigurationList = 0931ADB51AADFA68004364FD /* Build configuration list for PBXNativeTarget "RMImagePickerExampleTests" */; 165 | buildPhases = ( 166 | 0931ADA41AADFA68004364FD /* Sources */, 167 | 0931ADA51AADFA68004364FD /* Frameworks */, 168 | 0931ADA61AADFA68004364FD /* Resources */, 169 | ); 170 | buildRules = ( 171 | ); 172 | dependencies = ( 173 | 0931ADAA1AADFA68004364FD /* PBXTargetDependency */, 174 | ); 175 | name = RMImagePickerExampleTests; 176 | productName = RMImagePickerExampleTests; 177 | productReference = 0931ADA81AADFA68004364FD /* RMImagePickerExampleTests.xctest */; 178 | productType = "com.apple.product-type.bundle.unit-test"; 179 | }; 180 | /* End PBXNativeTarget section */ 181 | 182 | /* Begin PBXProject section */ 183 | 0931AD8B1AADFA68004364FD /* Project object */ = { 184 | isa = PBXProject; 185 | attributes = { 186 | LastUpgradeCheck = 0610; 187 | ORGANIZATIONNAME = "Riccardo Massari"; 188 | TargetAttributes = { 189 | 0931AD921AADFA68004364FD = { 190 | CreatedOnToolsVersion = 6.1.1; 191 | DevelopmentTeam = GB5V65H7X2; 192 | }; 193 | 0931ADA71AADFA68004364FD = { 194 | CreatedOnToolsVersion = 6.1.1; 195 | TestTargetID = 0931AD921AADFA68004364FD; 196 | }; 197 | }; 198 | }; 199 | buildConfigurationList = 0931AD8E1AADFA68004364FD /* Build configuration list for PBXProject "RMImagePickerExample" */; 200 | compatibilityVersion = "Xcode 3.2"; 201 | developmentRegion = English; 202 | hasScannedForEncodings = 0; 203 | knownRegions = ( 204 | en, 205 | Base, 206 | ); 207 | mainGroup = 0931AD8A1AADFA68004364FD; 208 | productRefGroup = 0931AD941AADFA68004364FD /* Products */; 209 | projectDirPath = ""; 210 | projectRoot = ""; 211 | targets = ( 212 | 0931AD921AADFA68004364FD /* RMImagePickerExample */, 213 | 0931ADA71AADFA68004364FD /* RMImagePickerExampleTests */, 214 | ); 215 | }; 216 | /* End PBXProject section */ 217 | 218 | /* Begin PBXResourcesBuildPhase section */ 219 | 0931AD911AADFA68004364FD /* Resources */ = { 220 | isa = PBXResourcesBuildPhase; 221 | buildActionMask = 2147483647; 222 | files = ( 223 | 0931AD9E1AADFA68004364FD /* Main.storyboard in Resources */, 224 | 0931ADA31AADFA68004364FD /* LaunchScreen.xib in Resources */, 225 | 0931ADA01AADFA68004364FD /* Images.xcassets in Resources */, 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | }; 229 | 0931ADA61AADFA68004364FD /* Resources */ = { 230 | isa = PBXResourcesBuildPhase; 231 | buildActionMask = 2147483647; 232 | files = ( 233 | ); 234 | runOnlyForDeploymentPostprocessing = 0; 235 | }; 236 | /* End PBXResourcesBuildPhase section */ 237 | 238 | /* Begin PBXShellScriptBuildPhase section */ 239 | 2564219F0EE9E9D018FDE788 /* Check Pods Manifest.lock */ = { 240 | isa = PBXShellScriptBuildPhase; 241 | buildActionMask = 2147483647; 242 | files = ( 243 | ); 244 | inputPaths = ( 245 | ); 246 | name = "Check Pods Manifest.lock"; 247 | outputPaths = ( 248 | ); 249 | runOnlyForDeploymentPostprocessing = 0; 250 | shellPath = /bin/sh; 251 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 252 | showEnvVarsInLog = 0; 253 | }; 254 | 715F08C556D109EEAF6F60B7 /* Copy Pods Resources */ = { 255 | isa = PBXShellScriptBuildPhase; 256 | buildActionMask = 2147483647; 257 | files = ( 258 | ); 259 | inputPaths = ( 260 | ); 261 | name = "Copy Pods Resources"; 262 | outputPaths = ( 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | shellPath = /bin/sh; 266 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RMImagePickerExample/Pods-RMImagePickerExample-resources.sh\"\n"; 267 | showEnvVarsInLog = 0; 268 | }; 269 | D3B5DBBF90BCBFAD395BB5D5 /* Embed Pods Frameworks */ = { 270 | isa = PBXShellScriptBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | ); 274 | inputPaths = ( 275 | ); 276 | name = "Embed Pods Frameworks"; 277 | outputPaths = ( 278 | ); 279 | runOnlyForDeploymentPostprocessing = 0; 280 | shellPath = /bin/sh; 281 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RMImagePickerExample/Pods-RMImagePickerExample-frameworks.sh\"\n"; 282 | showEnvVarsInLog = 0; 283 | }; 284 | /* End PBXShellScriptBuildPhase section */ 285 | 286 | /* Begin PBXSourcesBuildPhase section */ 287 | 0931AD8F1AADFA68004364FD /* Sources */ = { 288 | isa = PBXSourcesBuildPhase; 289 | buildActionMask = 2147483647; 290 | files = ( 291 | 09372F601AAFAD12004F2095 /* ImagesViewController.swift in Sources */, 292 | 0931AD991AADFA68004364FD /* AppDelegate.swift in Sources */, 293 | ); 294 | runOnlyForDeploymentPostprocessing = 0; 295 | }; 296 | 0931ADA41AADFA68004364FD /* Sources */ = { 297 | isa = PBXSourcesBuildPhase; 298 | buildActionMask = 2147483647; 299 | files = ( 300 | 0931ADAF1AADFA68004364FD /* RMImagePickerExampleTests.swift in Sources */, 301 | ); 302 | runOnlyForDeploymentPostprocessing = 0; 303 | }; 304 | /* End PBXSourcesBuildPhase section */ 305 | 306 | /* Begin PBXTargetDependency section */ 307 | 0931ADAA1AADFA68004364FD /* PBXTargetDependency */ = { 308 | isa = PBXTargetDependency; 309 | target = 0931AD921AADFA68004364FD /* RMImagePickerExample */; 310 | targetProxy = 0931ADA91AADFA68004364FD /* PBXContainerItemProxy */; 311 | }; 312 | /* End PBXTargetDependency section */ 313 | 314 | /* Begin PBXVariantGroup section */ 315 | 0931AD9C1AADFA68004364FD /* Main.storyboard */ = { 316 | isa = PBXVariantGroup; 317 | children = ( 318 | 0931AD9D1AADFA68004364FD /* Base */, 319 | ); 320 | name = Main.storyboard; 321 | sourceTree = ""; 322 | }; 323 | 0931ADA11AADFA68004364FD /* LaunchScreen.xib */ = { 324 | isa = PBXVariantGroup; 325 | children = ( 326 | 0931ADA21AADFA68004364FD /* Base */, 327 | ); 328 | name = LaunchScreen.xib; 329 | sourceTree = ""; 330 | }; 331 | /* End PBXVariantGroup section */ 332 | 333 | /* Begin XCBuildConfiguration section */ 334 | 0931ADB01AADFA68004364FD /* Debug */ = { 335 | isa = XCBuildConfiguration; 336 | buildSettings = { 337 | ALWAYS_SEARCH_USER_PATHS = NO; 338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 339 | CLANG_CXX_LIBRARY = "libc++"; 340 | CLANG_ENABLE_MODULES = YES; 341 | CLANG_ENABLE_OBJC_ARC = YES; 342 | CLANG_WARN_BOOL_CONVERSION = YES; 343 | CLANG_WARN_CONSTANT_CONVERSION = YES; 344 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 345 | CLANG_WARN_EMPTY_BODY = YES; 346 | CLANG_WARN_ENUM_CONVERSION = YES; 347 | CLANG_WARN_INT_CONVERSION = YES; 348 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 349 | CLANG_WARN_UNREACHABLE_CODE = YES; 350 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 351 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 352 | COPY_PHASE_STRIP = NO; 353 | ENABLE_STRICT_OBJC_MSGSEND = YES; 354 | GCC_C_LANGUAGE_STANDARD = gnu99; 355 | GCC_DYNAMIC_NO_PIC = NO; 356 | GCC_OPTIMIZATION_LEVEL = 0; 357 | GCC_PREPROCESSOR_DEFINITIONS = ( 358 | "DEBUG=1", 359 | "$(inherited)", 360 | ); 361 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 362 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 363 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 364 | GCC_WARN_UNDECLARED_SELECTOR = YES; 365 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 366 | GCC_WARN_UNUSED_FUNCTION = YES; 367 | GCC_WARN_UNUSED_VARIABLE = YES; 368 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 369 | MTL_ENABLE_DEBUG_INFO = YES; 370 | ONLY_ACTIVE_ARCH = YES; 371 | SDKROOT = iphoneos; 372 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 373 | TARGETED_DEVICE_FAMILY = "1,2"; 374 | }; 375 | name = Debug; 376 | }; 377 | 0931ADB11AADFA68004364FD /* Release */ = { 378 | isa = XCBuildConfiguration; 379 | buildSettings = { 380 | ALWAYS_SEARCH_USER_PATHS = NO; 381 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 382 | CLANG_CXX_LIBRARY = "libc++"; 383 | CLANG_ENABLE_MODULES = YES; 384 | CLANG_ENABLE_OBJC_ARC = YES; 385 | CLANG_WARN_BOOL_CONVERSION = YES; 386 | CLANG_WARN_CONSTANT_CONVERSION = YES; 387 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 388 | CLANG_WARN_EMPTY_BODY = YES; 389 | CLANG_WARN_ENUM_CONVERSION = YES; 390 | CLANG_WARN_INT_CONVERSION = YES; 391 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 392 | CLANG_WARN_UNREACHABLE_CODE = YES; 393 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 394 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 395 | COPY_PHASE_STRIP = YES; 396 | ENABLE_NS_ASSERTIONS = NO; 397 | ENABLE_STRICT_OBJC_MSGSEND = YES; 398 | GCC_C_LANGUAGE_STANDARD = gnu99; 399 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 400 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 401 | GCC_WARN_UNDECLARED_SELECTOR = YES; 402 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 403 | GCC_WARN_UNUSED_FUNCTION = YES; 404 | GCC_WARN_UNUSED_VARIABLE = YES; 405 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 406 | MTL_ENABLE_DEBUG_INFO = NO; 407 | SDKROOT = iphoneos; 408 | TARGETED_DEVICE_FAMILY = "1,2"; 409 | VALIDATE_PRODUCT = YES; 410 | }; 411 | name = Release; 412 | }; 413 | 0931ADB31AADFA68004364FD /* Debug */ = { 414 | isa = XCBuildConfiguration; 415 | baseConfigurationReference = 3F1C108D5D01F45EBBE45BC8 /* Pods-RMImagePickerExample.debug.xcconfig */; 416 | buildSettings = { 417 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 418 | CODE_SIGN_IDENTITY = "iPhone Developer"; 419 | INFOPLIST_FILE = RMImagePickerExample/Info.plist; 420 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 421 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 422 | PRODUCT_NAME = "$(TARGET_NAME)"; 423 | }; 424 | name = Debug; 425 | }; 426 | 0931ADB41AADFA68004364FD /* Release */ = { 427 | isa = XCBuildConfiguration; 428 | baseConfigurationReference = E815BAC3B93FF1E9620B2B18 /* Pods-RMImagePickerExample.release.xcconfig */; 429 | buildSettings = { 430 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 431 | CODE_SIGN_IDENTITY = "iPhone Developer"; 432 | INFOPLIST_FILE = RMImagePickerExample/Info.plist; 433 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 434 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 435 | PRODUCT_NAME = "$(TARGET_NAME)"; 436 | }; 437 | name = Release; 438 | }; 439 | 0931ADB61AADFA68004364FD /* Debug */ = { 440 | isa = XCBuildConfiguration; 441 | buildSettings = { 442 | BUNDLE_LOADER = "$(TEST_HOST)"; 443 | FRAMEWORK_SEARCH_PATHS = ( 444 | "$(SDKROOT)/Developer/Library/Frameworks", 445 | "$(inherited)", 446 | ); 447 | GCC_PREPROCESSOR_DEFINITIONS = ( 448 | "DEBUG=1", 449 | "$(inherited)", 450 | ); 451 | INFOPLIST_FILE = RMImagePickerExampleTests/Info.plist; 452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 453 | PRODUCT_NAME = "$(TARGET_NAME)"; 454 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RMImagePickerExample.app/RMImagePickerExample"; 455 | }; 456 | name = Debug; 457 | }; 458 | 0931ADB71AADFA68004364FD /* Release */ = { 459 | isa = XCBuildConfiguration; 460 | buildSettings = { 461 | BUNDLE_LOADER = "$(TEST_HOST)"; 462 | FRAMEWORK_SEARCH_PATHS = ( 463 | "$(SDKROOT)/Developer/Library/Frameworks", 464 | "$(inherited)", 465 | ); 466 | INFOPLIST_FILE = RMImagePickerExampleTests/Info.plist; 467 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 468 | PRODUCT_NAME = "$(TARGET_NAME)"; 469 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RMImagePickerExample.app/RMImagePickerExample"; 470 | }; 471 | name = Release; 472 | }; 473 | /* End XCBuildConfiguration section */ 474 | 475 | /* Begin XCConfigurationList section */ 476 | 0931AD8E1AADFA68004364FD /* Build configuration list for PBXProject "RMImagePickerExample" */ = { 477 | isa = XCConfigurationList; 478 | buildConfigurations = ( 479 | 0931ADB01AADFA68004364FD /* Debug */, 480 | 0931ADB11AADFA68004364FD /* Release */, 481 | ); 482 | defaultConfigurationIsVisible = 0; 483 | defaultConfigurationName = Release; 484 | }; 485 | 0931ADB21AADFA68004364FD /* Build configuration list for PBXNativeTarget "RMImagePickerExample" */ = { 486 | isa = XCConfigurationList; 487 | buildConfigurations = ( 488 | 0931ADB31AADFA68004364FD /* Debug */, 489 | 0931ADB41AADFA68004364FD /* Release */, 490 | ); 491 | defaultConfigurationIsVisible = 0; 492 | defaultConfigurationName = Release; 493 | }; 494 | 0931ADB51AADFA68004364FD /* Build configuration list for PBXNativeTarget "RMImagePickerExampleTests" */ = { 495 | isa = XCConfigurationList; 496 | buildConfigurations = ( 497 | 0931ADB61AADFA68004364FD /* Debug */, 498 | 0931ADB71AADFA68004364FD /* Release */, 499 | ); 500 | defaultConfigurationIsVisible = 0; 501 | defaultConfigurationName = Release; 502 | }; 503 | /* End XCConfigurationList section */ 504 | }; 505 | rootObject = 0931AD8B1AADFA68004364FD /* Project object */; 506 | } 507 | -------------------------------------------------------------------------------- /Example/RMImagePickerExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/RMImagePickerExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/RMImagePickerExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // RMImagePickerExample 4 | // 5 | // Created by Riccardo Massari on 09/03/15. 6 | // Copyright (c) 2015 Riccardo Massari. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // 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. 24 | // 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. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // 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. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/RMImagePickerExample/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example/RMImagePickerExample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /Example/RMImagePickerExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Example/RMImagePickerExample/ImagesViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImagesViewController.swift 3 | // RMImagePickerExample 4 | // 5 | // Created by Riccardo Massari on 10/03/15. 6 | // Copyright (c) 2015 Riccardo Massari. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Photos 11 | import RMImagePicker 12 | 13 | let reuseIdentifier = "imageCellId" 14 | let cellSize = CGSize(width: 132, height: 132) 15 | let cellImageViewTag = 1 16 | 17 | class ImagesViewController: UICollectionViewController, RMImagePickerControllerDelegate { 18 | var popoverController: UIPopoverController! 19 | lazy var imageManager = PHImageManager.defaultManager() 20 | var assets: [PHAsset] = [] 21 | 22 | override func viewDidLoad() { 23 | super.viewDidLoad() 24 | self.collectionView?.alwaysBounceVertical = true 25 | let addImagesButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Add, target: self, action: "pickImages:") 26 | self.navigationItem.rightBarButtonItem = addImagesButton 27 | } 28 | 29 | override func didReceiveMemoryWarning() { 30 | super.didReceiveMemoryWarning() 31 | // Dispose of any resources that can be recreated. 32 | } 33 | 34 | /* 35 | // MARK: - Navigation 36 | 37 | // In a storyboard-based application, you will often want to do a little preparation before navigation 38 | override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { 39 | // Get the new view controller using [segue destinationViewController]. 40 | // Pass the selected object to the new view controller. 41 | } 42 | */ 43 | 44 | // MARK: UICollectionViewDataSource 45 | 46 | override func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int { 47 | return 1 48 | } 49 | 50 | 51 | override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { 52 | return self.assets.count 53 | } 54 | 55 | override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { 56 | let cell = collectionView.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath) as UICollectionViewCell 57 | 58 | // Configure the cell 59 | let asset = self.assets[indexPath.item] 60 | self.imageManager.requestImageForAsset( 61 | asset, 62 | targetSize: cellSize, 63 | contentMode: PHImageContentMode.AspectFit, 64 | options: nil, 65 | resultHandler: { (image, info) -> Void in 66 | let imageView = cell.viewWithTag(cellImageViewTag) as UIImageView 67 | imageView.image = image 68 | }) 69 | return cell 70 | } 71 | 72 | // MARK: - Actions 73 | 74 | func pickImages(sender: AnyObject) { 75 | let imagePicker = RMImagePickerController() 76 | imagePicker.pickerDelegate = self 77 | if UIDevice.currentDevice().userInterfaceIdiom == UIUserInterfaceIdiom.Pad { 78 | self.popoverController = UIPopoverController(contentViewController: imagePicker) 79 | self.popoverController.presentPopoverFromBarButtonItem( 80 | self.navigationItem.rightBarButtonItem!, 81 | permittedArrowDirections: UIPopoverArrowDirection.Any, 82 | animated: true) 83 | } else { 84 | self.presentViewController(imagePicker, animated: true, completion: nil) 85 | } 86 | } 87 | 88 | // MARK: - RMImagePickerControllerDelegate 89 | 90 | func rmImagePickerController(picker: RMImagePickerController, didFinishPickingAssets assets: [PHAsset]) { 91 | self.assets = assets 92 | self.dismissPickerPopover() 93 | self.collectionView?.performBatchUpdates({ 94 | let nos = self.collectionView?.numberOfSections() 95 | self.collectionView!.reloadSections( 96 | NSIndexSet(indexesInRange: NSMakeRange(0, nos!)) 97 | ) 98 | }, completion: nil) 99 | } 100 | 101 | func rmImagePickerControllerDidCancel(picker: RMImagePickerController) { 102 | self.dismissPickerPopover() 103 | } 104 | 105 | // MARK: - Utility 106 | 107 | func dismissPickerPopover() { 108 | if UIDevice.currentDevice().userInterfaceIdiom == UIUserInterfaceIdiom.Pad { 109 | self.popoverController?.dismissPopoverAnimated(true) 110 | } else { 111 | self.dismissViewControllerAnimated(true, completion: nil) 112 | } 113 | } 114 | 115 | } 116 | -------------------------------------------------------------------------------- /Example/RMImagePickerExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.maxdrift.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Example/RMImagePickerExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.maxdrift.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/RMImagePickerExampleTests/RMImagePickerExampleTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RMImagePickerExampleTests.swift 3 | // RMImagePickerExampleTests 4 | // 5 | // Created by Riccardo Massari on 09/03/15. 6 | // Copyright (c) 2015 Riccardo Massari. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class RMImagePickerExampleTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Riccardo Massari 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RMImagePicker [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/maxdrift/RMImagePicker/master/LICENSE) [![CocoaPods Platform](https://img.shields.io/cocoapods/p/RMImagePicker.svg)](http://cocoapods.org/pods/RMImagePicker) [![CocoaPods Version](https://img.shields.io/cocoapods/v/RMImagePicker.svg)](http://cocoapods.org/pods/RMImagePicker) 2 | iOS image picker with single and multiple selection written in Swift using Apple PhotoKit 3 | 4 | ## Usage 5 | 6 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 7 | 8 | ## Requirements 9 | - iOS8.1+ 10 | 11 | ## Installation 12 | 13 | RMImagePicker is available through [CocoaPods](http://cocoapods.org). To install 14 | it, simply add the following line to your Podfile: 15 | 16 | ``` 17 | use_frameworks! 18 | pod "RMImagePicker", "~> 0.1.4" 19 | ``` 20 | 21 | ## Author 22 | 23 | Riccardo Massari, maxdrift85 [at] gmail [dot] com 24 | 25 | ## License 26 | 27 | RMImagePicker is available under the MIT license. See the LICENSE file for more info. 28 | -------------------------------------------------------------------------------- /RMImagePicker.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "RMImagePicker" 3 | s.version = "0.1.4" 4 | s.summary = "iOS image picker with single and multiple selection written in Swift using Apple PhotoKit." 5 | s.description = <<-DESC 6 | iOS image picker with single and multiple selection 7 | written in Swift using Apple PhotoKit. 8 | DESC 9 | s.homepage = "https://github.com/maxdrift/RMImagePicker" 10 | s.license = 'MIT' 11 | s.author = { "Riccardo Massari" => "maxdrift85@gmail.com" } 12 | s.source = { :git => "https://github.com/maxdrift/RMImagePicker.git", :tag => s.version.to_s } 13 | s.social_media_url = 'https://twitter.com/maxdrift' 14 | 15 | s.platform = :ios, '8.1' 16 | s.ios.deployment_target = "8.1" 17 | 18 | s.source_files = 'Source/*.swift' 19 | s.resources = [ 20 | 'Source/RMImages.xcassets/tick_selected.imageset/*.png', 21 | 'Source/RMImages.xcassets/tick_deselected.imageset/*.png', 22 | 'Source/*.xib' 23 | ] 24 | s.requires_arc = true 25 | 26 | s.frameworks = 'Photos' 27 | end 28 | -------------------------------------------------------------------------------- /Source/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.maxdrift.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.1.4 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Source/RMAlbumCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RMAlbumCell.swift 3 | // RMImagePicker 4 | // 5 | // Created by Riccardo Massari on 15/03/15. 6 | // Copyright (c) 2015 Riccardo Massari. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Photos 11 | 12 | class RMAlbumCell: UITableViewCell { 13 | @IBOutlet weak var title: UILabel! 14 | @IBOutlet weak var count: UILabel! 15 | @IBOutlet weak var poster1: UIImageView! 16 | @IBOutlet weak var poster2: UIImageView! 17 | @IBOutlet weak var poster3: UIImageView! 18 | var posterImgs: [UIImageView] = [] 19 | 20 | override func awakeFromNib() { 21 | super.awakeFromNib() 22 | self.posterImgs = [poster1, poster2, poster3] 23 | for iv in self.posterImgs { 24 | iv.layer.borderColor = UIColor.whiteColor().CGColor 25 | iv.layer.borderWidth = 0.5 26 | } 27 | } 28 | 29 | override func setSelected(selected: Bool, animated: Bool) { 30 | super.setSelected(selected, animated: animated) 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Source/RMAlbumCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /Source/RMAlbumPickerController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RMAlbumPickerController.swift 3 | // RMImagePicker 4 | // 5 | // Created by Riccardo Massari on 19/01/15. 6 | // Copyright (c) 2015 Riccardo Massari. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Photos 11 | 12 | let albumCellIdentifier = "albumCellId" 13 | let albumRowHeigth = CGFloat(173) 14 | 15 | 16 | protocol RMAssetSelectionDelegate { 17 | func selectedAssets(assets: [PHAsset]) 18 | func cancelImagePicker() 19 | } 20 | 21 | class UITableViewDetailCell: UITableViewCell { 22 | override init(style: UITableViewCellStyle, reuseIdentifier: String?) { 23 | super.init(style: .Subtitle, reuseIdentifier: reuseIdentifier) 24 | } 25 | 26 | required init(coder aDecoder: NSCoder) { 27 | super.init(coder: aDecoder) 28 | } 29 | } 30 | 31 | class RMAlbumPickerController: UITableViewController, RMAssetSelectionDelegate, UIAlertViewDelegate, PHPhotoLibraryChangeObserver { 32 | var assetsParent: RMAssetSelectionDelegate? 33 | lazy var imageManager = PHCachingImageManager.defaultManager() 34 | var allCollections: [PHFetchResult] = [] 35 | 36 | override func viewDidLoad() { 37 | super.viewDidLoad() 38 | 39 | let cellNib = UINib(nibName: "RMAlbumCell", bundle: NSBundle(forClass: RMAlbumPickerController.self)) 40 | self.tableView.registerNib(cellNib, forCellReuseIdentifier: albumCellIdentifier) 41 | self.tableView.separatorStyle = UITableViewCellSeparatorStyle.None 42 | 43 | self.navigationItem.title = NSLocalizedString("Albums", comment: "") 44 | let cancelButton = UIBarButtonItem( 45 | barButtonSystemItem: .Cancel, 46 | target: self, 47 | action: "cancelImagePicker") 48 | self.navigationItem.rightBarButtonItem = cancelButton 49 | 50 | PHPhotoLibrary.sharedPhotoLibrary().registerChangeObserver(self) 51 | 52 | self.checkPhotoAuth() 53 | 54 | let phFetchOptions = PHFetchOptions() 55 | phFetchOptions.predicate = NSPredicate(format: "estimatedAssetCount > 0") 56 | self.allCollections.append( 57 | PHAssetCollection.fetchAssetCollectionsWithType( 58 | .SmartAlbum, 59 | subtype: .SmartAlbumUserLibrary, 60 | options: nil 61 | ) 62 | ) 63 | self.allCollections.append( 64 | PHAssetCollection.fetchAssetCollectionsWithType( 65 | .Album, 66 | subtype: .Any, 67 | options: phFetchOptions 68 | ) 69 | ) 70 | } 71 | 72 | func cancelImagePicker() { 73 | self.assetsParent?.cancelImagePicker() 74 | } 75 | 76 | override func viewWillAppear(animated: Bool) { 77 | super.viewWillAppear(animated) 78 | self.navigationController?.setToolbarHidden(true, animated: true) 79 | } 80 | 81 | override func viewDidDisappear(animated: Bool) { 82 | PHPhotoLibrary.sharedPhotoLibrary().unregisterChangeObserver(self) 83 | super.viewDidDisappear(animated) 84 | } 85 | 86 | override func didReceiveMemoryWarning() { 87 | super.didReceiveMemoryWarning() 88 | // Dispose of any resources that can be recreated. 89 | } 90 | 91 | // MARK: - Table view data source 92 | 93 | override func numberOfSectionsInTableView(tableView: UITableView) -> Int { 94 | // Return the number of sections. 95 | return self.allCollections.count 96 | } 97 | 98 | override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 99 | // Return the number of rows in the section. 100 | return self.allCollections[section].count 101 | } 102 | 103 | override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { 104 | var cell: RMAlbumCell! 105 | if let reCell = tableView.dequeueReusableCellWithIdentifier(albumCellIdentifier, forIndexPath: indexPath) as? RMAlbumCell { 106 | cell = reCell 107 | } else { 108 | cell = NSBundle(forClass: RMAlbumPickerController.self).loadNibNamed("RMAlbumCell", owner: self, options: nil)[0] as RMAlbumCell 109 | } 110 | 111 | // Increment the cell's tag 112 | let currentTag = cell.tag + 1 113 | cell.tag = currentTag 114 | 115 | // Configure the cell... 116 | let collection = self.allCollections[indexPath.section][indexPath.row] as PHAssetCollection 117 | var assetsCount: Int 118 | var keyAssets: PHFetchResult! 119 | if collection.assetCollectionType == .SmartAlbum { 120 | let fetchOptions = PHFetchOptions() 121 | fetchOptions.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: false)] 122 | keyAssets = PHAsset.fetchAssetsInAssetCollection(collection, options: fetchOptions) 123 | assetsCount = keyAssets.count 124 | } else { 125 | keyAssets = PHAsset.fetchKeyAssetsInAssetCollection(collection, options: nil) 126 | assetsCount = collection.estimatedAssetCount 127 | } 128 | let scale = UIScreen.mainScreen().scale 129 | let imageWidth = cell.poster1.bounds.width * scale 130 | let imageHeight = cell.poster1.bounds.height * scale 131 | for (idx, poster) in enumerate(cell.posterImgs) { 132 | if idx < keyAssets.count { 133 | self.imageManager.requestImageForAsset( 134 | keyAssets[idx] as PHAsset, 135 | targetSize: CGSizeMake(imageWidth, imageHeight), 136 | contentMode: .AspectFill, 137 | options: nil, 138 | resultHandler: { (image, info) -> Void in 139 | if (cell.tag == currentTag) { 140 | poster.image = image 141 | } 142 | }) 143 | } else { 144 | if (cell.tag == currentTag) { 145 | poster.image = nil 146 | } 147 | } 148 | } 149 | if (cell.tag == currentTag) { 150 | cell.title.text = collection.localizedTitle 151 | cell.count.text = "\(assetsCount)" 152 | } 153 | 154 | return cell 155 | } 156 | 157 | override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { 158 | let phFetchOptions = PHFetchOptions() 159 | phFetchOptions.predicate = NSPredicate(format: "mediaType = %i", PHAssetMediaType.Image.rawValue) 160 | let collection = self.allCollections[indexPath.section][indexPath.row] as PHAssetCollection 161 | let assets = PHAsset.fetchAssetsInAssetCollection(collection, options: phFetchOptions) 162 | if assets.count > 0 { 163 | let picker = RMAssetCollectionPicker() 164 | picker.assetsParent = self 165 | 166 | picker.assetsFetchResult = assets 167 | picker.assetCollection = collection 168 | 169 | self.navigationController?.pushViewController(picker, animated: true) 170 | } else { 171 | let placeholderVC = UIViewController( 172 | nibName: "RMPlaceholderView", 173 | bundle: NSBundle(forClass: RMAlbumPickerController.self) 174 | ) 175 | self.navigationController?.pushViewController(placeholderVC, animated: true) 176 | } 177 | } 178 | 179 | override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { 180 | return albumRowHeigth / UIScreen.mainScreen().scale 181 | } 182 | 183 | // MARK: - PHPhotoLibraryChangeObserver 184 | 185 | func photoLibraryDidChange(changeInstance: PHChange!) { 186 | // Call might come on any background queue. Re-dispatch to the main queue to handle it. 187 | dispatch_async(dispatch_get_main_queue(), { () -> Void in 188 | // check if there are changes to the assets (insertions, deletions, updates) 189 | for (idx, fetchResult) in enumerate(self.allCollections) { 190 | if let collectionChanges = changeInstance.changeDetailsForFetchResult(fetchResult) { 191 | // get the new fetch result 192 | self.allCollections[idx] = collectionChanges.fetchResultAfterChanges 193 | if let tableView = self.tableView { 194 | if (!collectionChanges.hasIncrementalChanges || collectionChanges.hasMoves) { 195 | // we need to reload all if the incremental diffs are not available 196 | tableView.reloadData() 197 | } else { 198 | // if we have incremental diffs, tell the collection view to animate insertions and deletions 199 | self.tableView.beginUpdates() 200 | if let removedIndexes = collectionChanges.removedIndexes { 201 | tableView.deleteRowsAtIndexPaths(removedIndexes.rm_indexPathsFromIndexesWithSection(idx), withRowAnimation: .Automatic) 202 | } 203 | if let insertedIndexes = collectionChanges.insertedIndexes { 204 | tableView.insertRowsAtIndexPaths(insertedIndexes.rm_indexPathsFromIndexesWithSection(idx), withRowAnimation: .Automatic) 205 | } 206 | if let changedIndexes = collectionChanges.changedIndexes { 207 | tableView.reloadRowsAtIndexPaths(changedIndexes.rm_indexPathsFromIndexesWithSection(idx), withRowAnimation: .Automatic) 208 | } 209 | self.tableView.endUpdates() 210 | } 211 | } 212 | } 213 | } 214 | }) 215 | } 216 | 217 | // MARK: - RMAssetSelectionDelegate 218 | 219 | func selectedAssets(assets: [PHAsset]) { 220 | self.assetsParent?.selectedAssets(assets) 221 | } 222 | 223 | // MARK: - UIAlertViewDelegate 224 | 225 | func alertView(alertView: UIAlertView, clickedButtonAtIndex buttonIndex: Int) { 226 | if buttonIndex == 1 { 227 | UIApplication.sharedApplication().openURL(NSURL(string: UIApplicationOpenSettingsURLString)!) 228 | } 229 | self.cancelImagePicker() 230 | } 231 | 232 | // MARK: - Utility 233 | 234 | func checkPhotoAuth() { 235 | PHPhotoLibrary.requestAuthorization { (status) -> Void in 236 | switch status { 237 | case .Restricted: 238 | dispatch_async(dispatch_get_main_queue(), { () -> Void in 239 | let photoAuthAlert = UIAlertView( 240 | title: NSLocalizedString("Access restricted", comment: "to the photo library"), 241 | message: NSLocalizedString("This application needs access to your photo library but it seems that you're not authorized to grant this permission. Please contact someone who has higher privileges on the device.", comment: ""), 242 | delegate: self, 243 | cancelButtonTitle: NSLocalizedString("OK", comment: "") 244 | ) 245 | photoAuthAlert.show() 246 | }) 247 | case .Denied: 248 | dispatch_async(dispatch_get_main_queue(), { () -> Void in 249 | let photoAuthAlert = UIAlertView( 250 | title: NSLocalizedString("Please allow access", comment: "to the photo library"), 251 | message: NSLocalizedString("This application needs access to your photo library. Please go to Settings > Privacy > Photos and switch this application to ON", comment: ""), 252 | delegate: self, 253 | cancelButtonTitle: NSLocalizedString("OK", comment: ""), 254 | otherButtonTitles: NSLocalizedString("Settings", comment: "") 255 | ) 256 | photoAuthAlert.show() 257 | }) 258 | default: 259 | break 260 | } 261 | } 262 | } 263 | 264 | } 265 | -------------------------------------------------------------------------------- /Source/RMAssetCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RMAssetCell.swift 3 | // RMImagePicker 4 | // 5 | // Created by Riccardo Massari on 22/01/15. 6 | // Copyright (c) 2015 Riccardo Massari. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | let SelectedOverlayImg = UIImage( 12 | named: "tick_selected", 13 | inBundle: NSBundle(forClass: RMImagePickerController.self), 14 | compatibleWithTraitCollection: nil) 15 | let DeselectedOverlayImg = UIImage( 16 | named: "tick_deselected", 17 | inBundle: NSBundle(forClass: RMImagePickerController.self), 18 | compatibleWithTraitCollection: nil) 19 | 20 | class RMAssetCell: UICollectionViewCell { 21 | lazy var imageView = UIImageView() 22 | lazy var overlayView = UIImageView() 23 | override var selected: Bool { 24 | didSet { 25 | if selected { 26 | self.overlayView.image = SelectedOverlayImg 27 | } else { 28 | self.overlayView.image = DeselectedOverlayImg 29 | } 30 | } 31 | } 32 | 33 | override init(frame: CGRect) { 34 | super.init(frame: frame) 35 | self.imageView.frame = self.bounds 36 | self.imageView.contentMode = .ScaleAspectFill 37 | self.imageView.clipsToBounds = true 38 | self.contentView.addSubview(self.imageView) 39 | self.overlayView.frame = self.bounds 40 | self.contentView.addSubview(self.overlayView) 41 | } 42 | 43 | required init(coder aDecoder: NSCoder) { 44 | super.init(coder: aDecoder) 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Source/RMAssetCollectionPicker.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RMAssetCollectionPicker.swift 3 | // RMImagePicker 4 | // 5 | // Created by Riccardo Massari on 25/01/15. 6 | // Copyright (c) 2015 Riccardo Massari. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AssetsLibrary 11 | import Photos 12 | 13 | let reuseIdentifier = "assetCellId" 14 | let AssetsPerRowPort = CGFloat(4.0) 15 | let AssetsPerRowLand = CGFloat(7.0) 16 | let AssetsSpacing = CGFloat(1.0) 17 | let AssetsInset = CGFloat(9.0) 18 | var AssetGridThumbnailSize: CGSize! 19 | 20 | extension NSIndexSet { 21 | func rm_indexPathsFromIndexesWithSection(section: Int) -> [NSIndexPath] { 22 | var indexPaths: [NSIndexPath] = [] 23 | self.enumerateIndexesUsingBlock { (idx, stop) -> Void in 24 | indexPaths.append(NSIndexPath(forItem: idx, inSection: section)) 25 | } 26 | return indexPaths 27 | } 28 | } 29 | 30 | extension UICollectionView { 31 | func rm_indexPathsForElementsInRect(rect: CGRect) -> [NSIndexPath] { 32 | let allLayoutAttributes = self.collectionViewLayout.layoutAttributesForElementsInRect(rect) 33 | var indexPaths: [NSIndexPath] = [] 34 | for layoutAttributes in allLayoutAttributes! { 35 | indexPaths.append(layoutAttributes.indexPath) 36 | } 37 | return indexPaths 38 | } 39 | } 40 | 41 | 42 | class RMAssetCollectionPicker: UICollectionViewController, PHPhotoLibraryChangeObserver, UICollectionViewDelegateFlowLayout { 43 | var previousPreheatRect: CGRect? 44 | var alreadyScrolled = false 45 | var assetsParent: RMAssetSelectionDelegate? 46 | var imageManager: PHCachingImageManager! 47 | var assetsFetchResult: PHFetchResult! 48 | var assetCollection: PHAssetCollection! 49 | var baseNavigationTitle = "" 50 | var selectedAssetsNumber: Int! { 51 | didSet { 52 | self.updateNavigationTitle() 53 | } 54 | } 55 | 56 | convenience override init() { 57 | let layout = UICollectionViewFlowLayout() 58 | layout.scrollDirection = UICollectionViewScrollDirection.Vertical 59 | layout.minimumInteritemSpacing = AssetsSpacing 60 | layout.minimumLineSpacing = AssetsSpacing 61 | layout.sectionInset = UIEdgeInsets(top: AssetsInset, left: 0, bottom: AssetsInset, right: 0) 62 | self.init(collectionViewLayout: layout) 63 | } 64 | 65 | override init(collectionViewLayout layout: UICollectionViewLayout!) { 66 | super.init(collectionViewLayout: layout) 67 | self.imageManager = PHCachingImageManager() 68 | self.resetCachedAssets() 69 | PHPhotoLibrary.sharedPhotoLibrary().registerChangeObserver(self) 70 | } 71 | 72 | required init(coder aDecoder: NSCoder) { 73 | super.init(coder: aDecoder) 74 | } 75 | 76 | override func viewDidLoad() { 77 | super.viewDidLoad() 78 | 79 | // Register cell classes 80 | self.collectionView!.registerClass(RMAssetCell.self, forCellWithReuseIdentifier: reuseIdentifier) 81 | self.collectionView?.alwaysBounceVertical = true 82 | self.collectionView?.allowsMultipleSelection = true 83 | 84 | let scale = UIScreen.mainScreen().scale 85 | let cellSize = (self.collectionViewLayout as UICollectionViewFlowLayout).itemSize 86 | AssetGridThumbnailSize = CGSize(width: cellSize.width * scale, height: cellSize.height * scale) 87 | 88 | let doneButtonItem = UIBarButtonItem( 89 | barButtonSystemItem: UIBarButtonSystemItem.Done, 90 | target: self, 91 | action: "doneAction:" 92 | ) 93 | self.navigationItem.rightBarButtonItem = doneButtonItem 94 | self.baseNavigationTitle = self.assetCollection.localizedTitle 95 | self.selectedAssetsNumber = 0 96 | 97 | self.navigationController?.setToolbarHidden(false, animated: true) 98 | let toolbar = self.navigationController?.toolbar 99 | let flexibleItem = UIBarButtonItem( 100 | barButtonSystemItem: UIBarButtonSystemItem.FlexibleSpace, 101 | target: self, 102 | action: nil 103 | ) 104 | let selectAllItem = UIBarButtonItem( 105 | title: NSLocalizedString("Select all", comment: ""), 106 | style: UIBarButtonItemStyle.Bordered, 107 | target: self, 108 | action: "selectAllAction:" 109 | ) 110 | let deselectAllItem = UIBarButtonItem( 111 | title: NSLocalizedString("Deselect all", comment: ""), 112 | style: UIBarButtonItemStyle.Bordered, 113 | target: self, 114 | action: "deselectAllAction:" 115 | ) 116 | self.toolbarItems = [selectAllItem, flexibleItem, flexibleItem, deselectAllItem] 117 | 118 | } 119 | 120 | override func didRotateFromInterfaceOrientation(fromInterfaceOrientation: UIInterfaceOrientation) { 121 | let invContext = self.collectionViewLayout.invalidationContextForBoundsChange(self.collectionView!.bounds) 122 | self.collectionViewLayout.invalidateLayoutWithContext(invContext) 123 | } 124 | 125 | override func viewDidLayoutSubviews() { 126 | super.viewDidLayoutSubviews() 127 | if !self.alreadyScrolled { 128 | self.collectionView?.scrollToItemAtIndexPath(NSIndexPath(forItem: self.assetsFetchResult.count - 1, inSection: 0), atScrollPosition: .Top, animated: false) 129 | self.alreadyScrolled = true 130 | } 131 | } 132 | 133 | override func didReceiveMemoryWarning() { 134 | super.didReceiveMemoryWarning() 135 | // Dispose of any resources that can be recreated. 136 | } 137 | 138 | override func viewDidAppear(animated: Bool) { 139 | super.viewDidAppear(animated) 140 | self.updateCachedAssets() 141 | } 142 | 143 | override func viewDidDisappear(animated: Bool) { 144 | PHPhotoLibrary.sharedPhotoLibrary().unregisterChangeObserver(self) 145 | super.viewDidDisappear(animated) 146 | } 147 | 148 | // MARK: - UICollectionViewDataSource 149 | 150 | override func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int { 151 | return 1 152 | } 153 | 154 | 155 | override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { 156 | return self.assetsFetchResult.count 157 | } 158 | 159 | override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { 160 | let cell = collectionView.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath) as RMAssetCell 161 | 162 | // Increment the cell's tag 163 | let currentTag = cell.tag + 1 164 | cell.tag = currentTag 165 | 166 | let asset: PHAsset! = self.assetsFetchResult[indexPath.item] as PHAsset 167 | self.imageManager.requestImageForAsset( 168 | asset, 169 | targetSize: AssetGridThumbnailSize, 170 | contentMode: PHImageContentMode.AspectFill, 171 | options: nil, 172 | resultHandler: { (result, info) in 173 | if (cell.tag == currentTag) { 174 | cell.imageView.image = result 175 | if cell.selected { 176 | cell.overlayView.image = SelectedOverlayImg 177 | } else { 178 | cell.overlayView.image = DeselectedOverlayImg 179 | } 180 | } 181 | } 182 | ) 183 | return cell 184 | } 185 | 186 | override func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) { 187 | self.selectedAssetsNumber! += 1 188 | } 189 | 190 | override func collectionView(collectionView: UICollectionView, didDeselectItemAtIndexPath indexPath: NSIndexPath) { 191 | self.selectedAssetsNumber! -= 1 192 | } 193 | 194 | // MARK: - PHPhotoLibraryChangeObserver 195 | 196 | func photoLibraryDidChange(changeInstance: PHChange!) { 197 | // Call might come on any background queue. Re-dispatch to the main queue to handle it. 198 | dispatch_async(dispatch_get_main_queue(), { () -> Void in 199 | // check if there are changes to the assets (insertions, deletions, updates) 200 | if let collectionChanges = changeInstance.changeDetailsForFetchResult(self.assetsFetchResult) { 201 | // get the new fetch result 202 | self.assetsFetchResult = collectionChanges.fetchResultAfterChanges 203 | if let collectionView = self.collectionView { 204 | if (!collectionChanges.hasIncrementalChanges || collectionChanges.hasMoves) { 205 | // we need to reload all if the incremental diffs are not available 206 | collectionView.reloadData() 207 | } else { 208 | // if we have incremental diffs, tell the collection view to animate insertions and deletions 209 | self.collectionView?.performBatchUpdates({ () -> Void in 210 | if let removedIndexes = collectionChanges.removedIndexes { 211 | collectionView.deleteItemsAtIndexPaths(removedIndexes.rm_indexPathsFromIndexesWithSection(0)) 212 | } 213 | if let insertedIndexes = collectionChanges.insertedIndexes { 214 | collectionView.insertItemsAtIndexPaths(insertedIndexes.rm_indexPathsFromIndexesWithSection(0)) 215 | } 216 | if let changedIndexes = collectionChanges.changedIndexes { 217 | collectionView.reloadItemsAtIndexPaths(changedIndexes.rm_indexPathsFromIndexesWithSection(0)) 218 | } 219 | }, completion: nil) 220 | } 221 | } 222 | self.resetCachedAssets() 223 | } 224 | }) 225 | } 226 | 227 | // MARK: - UIScrollViewDelegate 228 | 229 | override func scrollViewDidScroll(scrollView: UIScrollView) { 230 | self.updateCachedAssets() 231 | } 232 | 233 | // MARK: - Asset Caching 234 | 235 | func resetCachedAssets() { 236 | self.imageManager.stopCachingImagesForAllAssets() 237 | self.previousPreheatRect = CGRectZero 238 | } 239 | 240 | func updateCachedAssets() { 241 | 242 | if (self.isViewLoaded() && self.view.window != nil) { 243 | // The preheat window is twice the height of the visible rect 244 | var preheatRect = self.collectionView!.bounds 245 | preheatRect = CGRectInset( 246 | preheatRect, 247 | 0.0, 248 | -0.5 * CGRectGetHeight(preheatRect) 249 | ) 250 | // If scrolled by a "reasonable" amount... 251 | let delta = abs(CGRectGetMidY(preheatRect) - CGRectGetMidY(self.previousPreheatRect!)) 252 | if delta > CGRectGetHeight(self.collectionView!.bounds) / 3.0 { 253 | // Compute the assets to start caching and to stop caching. 254 | var addedIndexPaths: [NSIndexPath] = [] 255 | var removedIndexPaths: [NSIndexPath] = [] 256 | 257 | self.computeDifferenceBetweenRect(self.previousPreheatRect!, andRect: preheatRect, removedHandler: { (removedRect) -> Void in 258 | let indexPaths = self.collectionView!.rm_indexPathsForElementsInRect(removedRect) 259 | removedIndexPaths.extend(indexPaths) 260 | }, addedHandler: { (addedRect) -> Void in 261 | let indexPaths = self.collectionView!.rm_indexPathsForElementsInRect(addedRect) 262 | addedIndexPaths.extend(indexPaths) 263 | }) 264 | 265 | let assetsToStartCaching = self.assetsAtIndexPaths(addedIndexPaths) 266 | let assetsToStopCaching = self.assetsAtIndexPaths(removedIndexPaths) 267 | 268 | self.imageManager.startCachingImagesForAssets( 269 | assetsToStartCaching, 270 | targetSize: AssetGridThumbnailSize, 271 | contentMode: PHImageContentMode.AspectFill, 272 | options: nil) 273 | self.imageManager.stopCachingImagesForAssets( 274 | assetsToStopCaching, 275 | targetSize: AssetGridThumbnailSize, 276 | contentMode: PHImageContentMode.AspectFill, 277 | options: nil) 278 | self.previousPreheatRect = preheatRect 279 | } 280 | } 281 | } 282 | 283 | func computeDifferenceBetweenRect(oldRect: CGRect, andRect newRect: CGRect, removedHandler: ((removedRect: CGRect) -> Void)!, addedHandler: ((addedRect: CGRect) -> Void)!) { 284 | if CGRectIntersectsRect(newRect, oldRect) { 285 | let oldMaxY = CGRectGetMaxY(oldRect) 286 | let oldMinY = CGRectGetMinY(oldRect) 287 | let newMaxY = CGRectGetMaxY(newRect) 288 | let newMinY = CGRectGetMinY(newRect) 289 | if newMaxY > oldMaxY { 290 | let rectToAdd = CGRectMake(newRect.origin.x, oldMaxY, newRect.size.width, (newMaxY - oldMaxY)) 291 | addedHandler(addedRect: rectToAdd) 292 | } 293 | if oldMinY > newMinY { 294 | let rectToAdd = CGRectMake(newRect.origin.x, newMinY, newRect.size.width, (oldMinY - newMinY)) 295 | addedHandler(addedRect: rectToAdd) 296 | } 297 | if newMaxY < oldMaxY { 298 | let rectToRemove = CGRectMake(newRect.origin.x, newMaxY, newRect.size.width, (oldMaxY - newMaxY)) 299 | removedHandler(removedRect: rectToRemove) 300 | } 301 | if oldMinY < newMinY { 302 | let rectToRemove = CGRectMake(newRect.origin.x, oldMinY, newRect.size.width, (newMinY - oldMinY)) 303 | removedHandler(removedRect: rectToRemove) 304 | } 305 | } else { 306 | addedHandler(addedRect: newRect) 307 | removedHandler(removedRect: oldRect) 308 | } 309 | } 310 | 311 | func assetsAtIndexPaths(indexPaths: [NSIndexPath]) -> [PHAsset] { 312 | var assets: [PHAsset] = [] 313 | for indexPath in indexPaths { 314 | assets.append(self.assetsFetchResult[indexPath.item] as PHAsset) 315 | } 316 | return assets 317 | } 318 | 319 | // MARK: - UICollectionViewDelegateFlowLayout 320 | 321 | func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize { 322 | let orientation = UIApplication.sharedApplication().statusBarOrientation 323 | let assetsPerRow = self.assetsPerRowFromOrientation(orientation) 324 | let itemSize = ((collectionView.bounds.width - (AssetsSpacing * (assetsPerRow - 1))) / assetsPerRow) 325 | return CGSize(width: itemSize, height: itemSize) 326 | } 327 | 328 | // MARK: - Actions 329 | 330 | func selectAllAction(sender: AnyObject) { 331 | for i in 0.. CGFloat { 359 | var assetsPerRow: CGFloat 360 | switch orientation { 361 | case .Unknown, .Portrait, .PortraitUpsideDown: 362 | assetsPerRow = AssetsPerRowPort 363 | case .LandscapeLeft, .LandscapeRight: 364 | assetsPerRow = AssetsPerRowLand 365 | } 366 | return assetsPerRow 367 | } 368 | 369 | } 370 | -------------------------------------------------------------------------------- /Source/RMImagePicker.h: -------------------------------------------------------------------------------- 1 | // 2 | // RMImagePicker.h 3 | // RMImagePicker 4 | // 5 | // Created by Riccardo Massari on 09/03/15. 6 | // Copyright (c) 2015 Riccardo Massari. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for RMImagePicker. 12 | FOUNDATION_EXPORT double RMImagePickerVersionNumber; 13 | 14 | //! Project version string for RMImagePicker. 15 | FOUNDATION_EXPORT const unsigned char RMImagePickerVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Source/RMImagePickerController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RMImagePickerController.swift 3 | // RMImagePicker 4 | // 5 | // Created by Riccardo Massari on 19/01/15. 6 | // Copyright (c) 2015 Riccardo Massari. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Photos 11 | 12 | public protocol RMImagePickerControllerDelegate: UINavigationControllerDelegate { 13 | func rmImagePickerController(picker: RMImagePickerController, didFinishPickingAssets assets: [PHAsset]) 14 | func rmImagePickerControllerDidCancel(picker: RMImagePickerController) 15 | } 16 | 17 | public class RMImagePickerController: UINavigationController, RMAssetSelectionDelegate { 18 | public var pickerDelegate: RMImagePickerControllerDelegate? 19 | var albumController: RMAlbumPickerController? 20 | 21 | override init(rootViewController: UIViewController) { 22 | super.init(rootViewController: rootViewController) 23 | } 24 | 25 | public override convenience init() { 26 | var albumController = RMAlbumPickerController() 27 | self.init(rootViewController: albumController) 28 | albumController.assetsParent = self 29 | } 30 | 31 | override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) { 32 | super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) 33 | } 34 | 35 | required public init(coder aDecoder: NSCoder) { 36 | super.init(coder: aDecoder) 37 | } 38 | 39 | override public func viewDidLoad() { 40 | super.viewDidLoad() 41 | // Do any additional setup after loading the view. 42 | } 43 | 44 | override public func didReceiveMemoryWarning() { 45 | super.didReceiveMemoryWarning() 46 | // Dispose of any resources that can be recreated. 47 | } 48 | 49 | // MARK: - Actions 50 | 51 | func cancelImagePicker() { 52 | if let d = self.pickerDelegate { 53 | d.rmImagePickerControllerDidCancel(self) 54 | } 55 | } 56 | 57 | // MARK: - Asset Selection Delegate 58 | 59 | func selectedAssets(assets: [PHAsset]) { 60 | if let d = self.pickerDelegate { 61 | d.rmImagePickerController(self, didFinishPickingAssets: assets) 62 | } else { 63 | self.popToRootViewControllerAnimated(false) 64 | } 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /Source/RMImages.xcassets/tick_deselected.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "tick_deselected.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "tick_deselected@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "tick_deselected@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Source/RMImages.xcassets/tick_deselected.imageset/tick_deselected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxdrift/RMImagePicker/2d436cac164d48218b21110fb1cac2fd8272907e/Source/RMImages.xcassets/tick_deselected.imageset/tick_deselected.png -------------------------------------------------------------------------------- /Source/RMImages.xcassets/tick_deselected.imageset/tick_deselected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxdrift/RMImagePicker/2d436cac164d48218b21110fb1cac2fd8272907e/Source/RMImages.xcassets/tick_deselected.imageset/tick_deselected@2x.png -------------------------------------------------------------------------------- /Source/RMImages.xcassets/tick_deselected.imageset/tick_deselected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxdrift/RMImagePicker/2d436cac164d48218b21110fb1cac2fd8272907e/Source/RMImages.xcassets/tick_deselected.imageset/tick_deselected@3x.png -------------------------------------------------------------------------------- /Source/RMImages.xcassets/tick_selected.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "tick_selected.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "tick_selected@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "tick_selected@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Source/RMImages.xcassets/tick_selected.imageset/tick_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxdrift/RMImagePicker/2d436cac164d48218b21110fb1cac2fd8272907e/Source/RMImages.xcassets/tick_selected.imageset/tick_selected.png -------------------------------------------------------------------------------- /Source/RMImages.xcassets/tick_selected.imageset/tick_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxdrift/RMImagePicker/2d436cac164d48218b21110fb1cac2fd8272907e/Source/RMImages.xcassets/tick_selected.imageset/tick_selected@2x.png -------------------------------------------------------------------------------- /Source/RMImages.xcassets/tick_selected.imageset/tick_selected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxdrift/RMImagePicker/2d436cac164d48218b21110fb1cac2fd8272907e/Source/RMImages.xcassets/tick_selected.imageset/tick_selected@3x.png -------------------------------------------------------------------------------- /Source/RMPlaceholderView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | --------------------------------------------------------------------------------