diff --git a/.swift-version b/.swift-version new file mode 100644 index 00000000..9f55b2cc --- /dev/null +++ b/.swift-version @@ -0,0 +1 @@ +3.0 diff --git a/BSImagePicker.podspec b/BSImagePicker.podspec index 56a42077..a23ca849 100644 --- a/BSImagePicker.podspec +++ b/BSImagePicker.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "BSImagePicker" - s.version = "2.4.0" + s.version = "2.5.0" s.summary = "BSImagePicker is a multiple image picker for iOS. UIImagePickerController replacement" s.description = <<-DESC A mix between the native iOS gallery and facebooks image picker. Allows you to preview and select multiple images. @@ -14,7 +14,7 @@ Pod::Spec.new do |s| s.platform = :ios, '8.0' s.requires_arc = true - s.source_files = 'Pod/Classes/**/*' + s.source_files = 'Pod/Classes/**/*.swift' s.resource_bundles = { 'BSImagePicker' => ['Pod/Assets/*.png', 'Pod/Assets/*.xib', @@ -24,6 +24,6 @@ Pod::Spec.new do |s| } s.frameworks = 'UIKit', 'Photos' - s.dependency 'UIImageViewModeScaleAspect', '~> 1.3' - s.dependency 'BSGridCollectionViewLayout', '1.2.0-swift23' + s.dependency 'UIImageViewModeScaleAspect', '~> 1.5.0' + s.dependency 'BSGridCollectionViewLayout', '~> 1.2.0' end diff --git a/Example/.swift_version b/Example/.swift_version new file mode 100644 index 00000000..9f55b2cc --- /dev/null +++ b/Example/.swift_version @@ -0,0 +1 @@ +3.0 diff --git a/Example/BSImagePicker.xcodeproj/project.pbxproj b/Example/BSImagePicker.xcodeproj/project.pbxproj index 1407ff5f..2e2de9bb 100644 --- a/Example/BSImagePicker.xcodeproj/project.pbxproj +++ b/Example/BSImagePicker.xcodeproj/project.pbxproj @@ -19,7 +19,6 @@ 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; - B92D980D4AE8D897DC396ADC /* Pods_BSImagePicker_UI_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 38C28900C4384278DFB9B277 /* Pods_BSImagePicker_UI_Tests.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -63,8 +62,6 @@ 607FACE51AFB9204008FA782 /* BSImagePicker_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BSImagePicker_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 690A165A9AB26AE492C12989 /* Pods_BSImagePicker_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BSImagePicker_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 79C023538F5ED9DB966A1623 /* Pods-BSImagePicker_UI_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BSImagePicker_UI_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests.debug.xcconfig"; sourceTree = ""; }; - 8C347795EABAE858C7D731E7 /* Pods-BSImagePicker_UI_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BSImagePicker_UI_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests.release.xcconfig"; sourceTree = ""; }; 8F60C161916125AAC467F7A3 /* Pods-BSImagePicker_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BSImagePicker_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BSImagePicker_Tests/Pods-BSImagePicker_Tests.debug.xcconfig"; sourceTree = ""; }; A7779C3B10543454F69844CF /* Pods-BSImagePicker_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BSImagePicker_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-BSImagePicker_Example/Pods-BSImagePicker_Example.release.xcconfig"; sourceTree = ""; }; BFBB4164D5BE0D0DB1908A7E /* Pods-BSImagePicker_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BSImagePicker_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BSImagePicker_Example/Pods-BSImagePicker_Example.debug.xcconfig"; sourceTree = ""; }; @@ -77,7 +74,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B92D980D4AE8D897DC396ADC /* Pods_BSImagePicker_UI_Tests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -203,8 +199,6 @@ A7779C3B10543454F69844CF /* Pods-BSImagePicker_Example.release.xcconfig */, 8F60C161916125AAC467F7A3 /* Pods-BSImagePicker_Tests.debug.xcconfig */, 5E285F6115D57A6AB5B82652 /* Pods-BSImagePicker_Tests.release.xcconfig */, - 79C023538F5ED9DB966A1623 /* Pods-BSImagePicker_UI_Tests.debug.xcconfig */, - 8C347795EABAE858C7D731E7 /* Pods-BSImagePicker_UI_Tests.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -216,12 +210,9 @@ isa = PBXNativeTarget; buildConfigurationList = 55E273F11BE004F2006006A7 /* Build configuration list for PBXNativeTarget "BSImagePicker_UI_Tests" */; buildPhases = ( - 4DFEC8E023A7EDF4353DCBB2 /* [CP] Check Pods Manifest.lock */, 55E273E41BE004F2006006A7 /* Sources */, 55E273E51BE004F2006006A7 /* Frameworks */, 55E273E61BE004F2006006A7 /* Resources */, - 692B9704A0EDC899B4E72494 /* [CP] Embed Pods Frameworks */, - 0FE0F470E8979605DB4AC3C6 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -281,12 +272,13 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0710; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0810; ORGANIZATIONNAME = CocoaPods; TargetAttributes = { 55E273E71BE004F2006006A7 = { CreatedOnToolsVersion = 7.1; LastSwiftMigration = 0800; + ProvisioningStyle = Manual; TestTargetID = 607FACCF1AFB9204008FA782; }; 607FACCF1AFB9204008FA782 = { @@ -297,6 +289,7 @@ 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; LastSwiftMigration = 0800; + ProvisioningStyle = Manual; }; }; }; @@ -363,36 +356,6 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - 0FE0F470E8979605DB4AC3C6 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 4DFEC8E023A7EDF4353DCBB2 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; 583088E6CFD7C00D55C0AF18 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -423,21 +386,6 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BSImagePicker_Example/Pods-BSImagePicker_Example-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 692B9704A0EDC899B4E72494 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; 6EEB134F4F15CF3B4525B9A6 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -551,15 +499,16 @@ /* Begin XCBuildConfiguration section */ 55E273EF1BE004F2006006A7 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 79C023538F5ED9DB966A1623 /* Pods-BSImagePicker_UI_Tests.debug.xcconfig */; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = BSImagePicker_UI_Tests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "se.backslashed.BSImagePicker-UI-Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 2.3; + SWIFT_INSTALL_OBJC_HEADER = NO; + SWIFT_VERSION = 3.0; TEST_TARGET_NAME = BSImagePicker_Example; USES_XCTRUNNER = YES; }; @@ -567,14 +516,15 @@ }; 55E273F01BE004F2006006A7 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8C347795EABAE858C7D731E7 /* Pods-BSImagePicker_UI_Tests.release.xcconfig */; buildSettings = { + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = BSImagePicker_UI_Tests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "se.backslashed.BSImagePicker-UI-Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 2.3; + SWIFT_INSTALL_OBJC_HEADER = NO; + SWIFT_VERSION = 3.0; TEST_TARGET_NAME = BSImagePicker_Example; USES_XCTRUNNER = YES; }; @@ -623,6 +573,8 @@ MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; + SWIFT_INSTALL_OBJC_HEADER = NO; + SWIFT_OBJC_INTERFACE_HEADER_NAME = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; name = Debug; @@ -662,6 +614,8 @@ IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_INSTALL_OBJC_HEADER = NO; + SWIFT_OBJC_INTERFACE_HEADER_NAME = ""; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; VALIDATE_PRODUCT = YES; }; @@ -684,8 +638,9 @@ MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = se.backslashed.BSImagePickerExample; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_INSTALL_OBJC_HEADER = NO; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -705,7 +660,8 @@ MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = se.backslashed.BSImagePickerExample; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 2.3; + SWIFT_INSTALL_OBJC_HEADER = NO; + SWIFT_VERSION = 3.0; }; name = Release; }; @@ -714,6 +670,7 @@ baseConfigurationReference = 8F60C161916125AAC467F7A3 /* Pods-BSImagePicker_Tests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + DEVELOPMENT_TEAM = ""; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -722,7 +679,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 2.3; + SWIFT_INSTALL_OBJC_HEADER = NO; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -731,11 +689,13 @@ baseConfigurationReference = 5E285F6115D57A6AB5B82652 /* Pods-BSImagePicker_Tests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 2.3; + SWIFT_INSTALL_OBJC_HEADER = NO; + SWIFT_VERSION = 3.0; }; name = Release; }; diff --git a/Example/BSImagePicker.xcodeproj/xcshareddata/xcschemes/BSImagePicker-Example.xcscheme b/Example/BSImagePicker.xcodeproj/xcshareddata/xcschemes/BSImagePicker-Example.xcscheme index 6ba86907..5b689162 100644 --- a/Example/BSImagePicker.xcodeproj/xcshareddata/xcschemes/BSImagePicker-Example.xcscheme +++ b/Example/BSImagePicker.xcodeproj/xcshareddata/xcschemes/BSImagePicker-Example.xcscheme @@ -1,6 +1,6 @@ Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } diff --git a/Example/BSImagePicker/ViewController.swift b/Example/BSImagePicker/ViewController.swift index 4c1dc215..b2617425 100644 --- a/Example/BSImagePicker/ViewController.swift +++ b/Example/BSImagePicker/ViewController.swift @@ -26,7 +26,7 @@ import Photos class ViewController: UIViewController { - @IBAction func showImagePicker(sender: UIButton) { + @IBAction func showImagePicker(_ sender: UIButton) { let vc = BSImagePickerViewController() vc.maxNumberOfSelections = 6 @@ -42,26 +42,26 @@ class ViewController: UIViewController { }, completion: nil) } - @IBAction func showCustomImagePicker(sender: UIButton) { + @IBAction func showCustomImagePicker(_ sender: UIButton) { let vc = BSImagePickerViewController() vc.maxNumberOfSelections = 6 vc.takePhotoIcon = UIImage(named: "chat") - vc.albumButton.tintColor = UIColor.greenColor() - vc.cancelButton.tintColor = UIColor.redColor() - vc.doneButton.tintColor = UIColor.purpleColor() + vc.albumButton.tintColor = UIColor.green + vc.cancelButton.tintColor = UIColor.red + vc.doneButton.tintColor = UIColor.purple vc.selectionCharacter = "✓" - vc.selectionFillColor = UIColor.grayColor() - vc.selectionStrokeColor = UIColor.yellowColor() - vc.selectionShadowColor = UIColor.redColor() - vc.selectionTextAttributes[NSForegroundColorAttributeName] = UIColor.lightGrayColor() + vc.selectionFillColor = UIColor.gray + vc.selectionStrokeColor = UIColor.yellow + vc.selectionShadowColor = UIColor.red + vc.selectionTextAttributes[NSForegroundColorAttributeName] = UIColor.lightGray vc.cellsPerRow = {(verticalSize: UIUserInterfaceSizeClass, horizontalSize: UIUserInterfaceSizeClass) -> Int in switch (verticalSize, horizontalSize) { - case (.Compact, .Regular): // iPhone5-6 portrait + case (.compact, .regular): // iPhone5-6 portrait return 2 - case (.Compact, .Compact): // iPhone5-6 landscape + case (.compact, .compact): // iPhone5-6 landscape return 2 - case (.Regular, .Regular): // iPad portrait/landscape + case (.regular, .regular): // iPad portrait/landscape return 3 default: return 2 @@ -80,32 +80,32 @@ class ViewController: UIViewController { }, completion: nil) } - @IBAction func showImagePickerWithSelectedAssets(sender: UIButton) { - let allAssets = PHAsset.fetchAssetsWithMediaType(PHAssetMediaType.Image, options: nil) - var evenAssetIds = [String]() - - allAssets.enumerateObjectsUsingBlock { (asset, idx, stop) -> Void in - if let asset = asset as? PHAsset where idx % 2 == 0 { - evenAssetIds.append(asset.localIdentifier) - } - } - - let evenAssets = PHAsset.fetchAssetsWithLocalIdentifiers(evenAssetIds, options: nil) - - let vc = BSImagePickerViewController() - vc.defaultSelections = evenAssets - - bs_presentImagePickerController(vc, animated: true, - select: { (asset: PHAsset) -> Void in - print("Selected: \(asset)") - }, deselect: { (asset: PHAsset) -> Void in - print("Deselected: \(asset)") - }, cancel: { (assets: [PHAsset]) -> Void in - print("Cancel: \(assets)") - }, finish: { (assets: [PHAsset]) -> Void in - print("Finish: \(assets)") - }, completion: nil) - + @IBAction func showImagePickerWithSelectedAssets(_ sender: UIButton) { + // FIXME: +// let allAssets = PHAsset.fetchAssets(with: PHAssetMediaType.image, options: nil) +// var evenAssetIds = [String]() +// +// allAssets.enumerateObjects { (asset, idx, stop) -> Void in +// if let asset = asset as? PHAsset , idx % 2 == 0 { +// evenAssetIds.append(asset.localIdentifier) +// } +// } +// +// let evenAssets = PHAsset.fetchAssets(withLocalIdentifiers: evenAssetIds, options: nil) +// +// let vc = BSImagePickerViewController() +// vc.defaultSelections = evenAssets +// +// bs_presentImagePickerController(vc, animated: true, +// select: { (asset: PHAsset) -> Void in +// print("Selected: \(asset)") +// }, deselect: { (asset: PHAsset) -> Void in +// print("Deselected: \(asset)") +// }, cancel: { (assets: [PHAsset]) -> Void in +// print("Cancel: \(assets)") +// }, finish: { (assets: [PHAsset]) -> Void in +// print("Finish: \(assets)") +// }, completion: nil) } } diff --git a/Example/BSImagePicker_UI_Tests/BSImagePicker_UI_Tests.swift b/Example/BSImagePicker_UI_Tests/BSImagePicker_UI_Tests.swift index a3a7c0b3..48ee6a89 100644 --- a/Example/BSImagePicker_UI_Tests/BSImagePicker_UI_Tests.swift +++ b/Example/BSImagePicker_UI_Tests/BSImagePicker_UI_Tests.swift @@ -22,7 +22,6 @@ import XCTest import Photos -@testable import BSImagePicker class BSImagePicker_UI_Tests: XCTestCase { @@ -50,26 +49,26 @@ class BSImagePicker_UI_Tests: XCTestCase { func testDoneButtonDisabledOnStartup() { app.buttons["Image picker"].tap() - XCTAssert(app.navigationBars.buttons["Done"].enabled == false) + XCTAssert(app.navigationBars.buttons["Done"].isEnabled == false) } func testDoneButtonEnabledAfterSelection() { app.buttons["Image picker"].tap() - app.collectionViews.childrenMatchingType(.Any).elementBoundByIndex(0).tap() - XCTAssert(app.navigationBars.buttons["Done (1)"].enabled == true) + app.collectionViews.children(matching: .any).element(boundBy: 0).tap() + XCTAssert(app.navigationBars.buttons["Done (1)"].isEnabled == true) } func testDoneButtonDisabledAfterDeselection() { app.buttons["Image picker"].tap() - app.collectionViews.childrenMatchingType(.Any).elementBoundByIndex(0).tap() - app.collectionViews.childrenMatchingType(.Any).elementBoundByIndex(0).tap() - XCTAssert(app.navigationBars.buttons["Done"].enabled == false) + app.collectionViews.children(matching: .any).element(boundBy: 0).tap() + app.collectionViews.children(matching: .any).element(boundBy: 0).tap() + XCTAssert(app.navigationBars.buttons["Done"].isEnabled == false) } func testLongpressPreview() { app.buttons["Image picker"].tap() - app.collectionViews.childrenMatchingType(.Any).elementBoundByIndex(0).pressForDuration(1.0) + app.collectionViews.children(matching: .any).element(boundBy: 0).press(forDuration: 1.0) app.navigationBars.buttons["Back"].tap() - XCTAssert(app.navigationBars.buttons["Done"].enabled == false) + XCTAssert(app.navigationBars.buttons["Done"].isEnabled == false) } } diff --git a/Example/Podfile b/Example/Podfile index f3f80c02..bfe9781d 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -10,6 +10,3 @@ target 'BSImagePicker_Tests' do pod "BSImagePicker", :path => "../" end -target 'BSImagePicker_UI_Tests' do - pod "BSImagePicker", :path => "../" -end diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 04ad9f9e..7d3e91ad 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,8 +1,8 @@ PODS: - - BSGridCollectionViewLayout (1.2.0-swift23) - - BSImagePicker (2.4.0): - - BSGridCollectionViewLayout (= 1.2.0-swift23) - - UIImageViewModeScaleAspect (~> 1.3) + - BSGridCollectionViewLayout (1.2.0) + - BSImagePicker (2.5.0): + - BSGridCollectionViewLayout (~> 1.2.0) + - UIImageViewModeScaleAspect (~> 1.5.0) - UIImageViewModeScaleAspect (1.5) DEPENDENCIES: @@ -13,10 +13,10 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - BSGridCollectionViewLayout: eb65d9747dcc2e5270842084a8e14e47243a09f5 - BSImagePicker: d8454b475ad0a6f8b4eda2ddcfec401e1f7d0cf4 + BSGridCollectionViewLayout: 8f12c8e1e08c47057f5a39a6828f4395f043d78f + BSImagePicker: 9ad3385318ca0db7e792b51ea8929cfc39284c56 UIImageViewModeScaleAspect: 11a790a0b9d248a13dc63e3a78991f1463b6d84e -PODFILE CHECKSUM: 94f153c3aee5b58a46ca1abfd28c2764bb85f520 +PODFILE CHECKSUM: 55707bb71dc224a83a5fab0d17f3eb856d760f6a COCOAPODS: 1.1.0.rc.2 diff --git a/Example/Pods/BSGridCollectionViewLayout/Pod/Classes/GridCollectionViewLayout.swift b/Example/Pods/BSGridCollectionViewLayout/Pod/Classes/GridCollectionViewLayout.swift index d4a39328..e756906a 100644 --- a/Example/Pods/BSGridCollectionViewLayout/Pod/Classes/GridCollectionViewLayout.swift +++ b/Example/Pods/BSGridCollectionViewLayout/Pod/Classes/GridCollectionViewLayout.swift @@ -62,7 +62,7 @@ public final class GridCollectionViewLayout: UICollectionViewLayout { var items = 0 var rows = 0 - public override func prepareLayout() { + public override func prepare() { // Set total number of items and rows items = estimatedNumberOfItems() rows = items / itemsPerRow + ((items % itemsPerRow > 0) ? 1 : 0) @@ -74,8 +74,8 @@ public final class GridCollectionViewLayout: UICollectionViewLayout { /** See UICollectionViewLayout documentation */ - public override func collectionViewContentSize() -> CGSize { - guard let collectionView = collectionView where rows > 0 else { + public override var collectionViewContentSize: CGSize { + guard let collectionView = collectionView, rows > 0 else { return CGSize.zero } @@ -86,18 +86,18 @@ public final class GridCollectionViewLayout: UICollectionViewLayout { /** See UICollectionViewLayout documentation */ - public override func layoutAttributesForElementsInRect(rect: CGRect) -> [UICollectionViewLayoutAttributes]? { + public override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? { return indexPathsInRect(rect).map { (indexPath) -> UICollectionViewLayoutAttributes? in - return self.layoutAttributesForItemAtIndexPath(indexPath) + return self.layoutAttributesForItem(at: indexPath) }.flatMap { $0 } } /** See UICollectionViewLayout documentation */ - public override func layoutAttributesForItemAtIndexPath(indexPath: NSIndexPath) -> UICollectionViewLayoutAttributes? { + public override func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? { // Guard against negative row/sections. - guard indexPath.row >= 0 && indexPath.section >= 0 else { + guard indexPath.row >= 0, indexPath.section >= 0 else { return nil } @@ -110,7 +110,7 @@ public final class GridCollectionViewLayout: UICollectionViewLayout { let width = itemSize.width let height = itemSize.height - let attribute = UICollectionViewLayoutAttributes(forCellWithIndexPath: indexPath) + let attribute = UICollectionViewLayoutAttributes(forCellWith: indexPath) attribute.frame = CGRect(x: x, y: y, width: width, height: height) return attribute @@ -119,7 +119,7 @@ public final class GridCollectionViewLayout: UICollectionViewLayout { /** See UICollectionViewLayout documentation */ - public override func shouldInvalidateLayoutForBoundsChange(newBounds: CGRect) -> Bool { + public override func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool { return true } @@ -127,13 +127,13 @@ public final class GridCollectionViewLayout: UICollectionViewLayout { /** See UICollectionViewLayout documentation */ - public override func layoutAttributesForDecorationViewOfKind(kind: String, atIndexPath indexPath: NSIndexPath) -> UICollectionViewLayoutAttributes? { + public override func layoutAttributesForDecorationView(ofKind elementKind: String, at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? { return nil } /** See UICollectionViewLayout documentation */ - public override func layoutAttributesForSupplementaryViewOfKind(elementKind: String, atIndexPath: NSIndexPath) -> UICollectionViewLayoutAttributes? { + public override func layoutAttributesForSupplementaryView(ofKind elementKind: String, at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? { return nil } } @@ -144,7 +144,7 @@ extension GridCollectionViewLayout { - parameter rect: The rect which we want index paths for - returns: An array of indexPaths for that rect */ - func indexPathsInRect(rect: CGRect) -> [NSIndexPath] { + func indexPathsInRect(_ rect: CGRect) -> [IndexPath] { // Make sure we have items/rows guard items > 0 && rows > 0 else { return [] } @@ -169,7 +169,7 @@ extension GridCollectionViewLayout { - parameter rowHeight: Height for a row - returns: First row index */ - static func firstRowInRect(rect: CGRect, withRowHeight rowHeight: CGFloat) -> Int { + static func firstRowInRect(_ rect: CGRect, withRowHeight rowHeight: CGFloat) -> Int { if rect.origin.y / rowHeight < 0 { return 0 } else { @@ -183,7 +183,7 @@ extension GridCollectionViewLayout { - parameter rowHeight: Height for a row - returns: Last row index */ - static func lastRowInRect(rect: CGRect, withRowHeight rowHeight: CGFloat, max: Int) -> Int { + static func lastRowInRect(_ rect: CGRect, withRowHeight rowHeight: CGFloat, max: Int) -> Int { guard rect.size.height >= rowHeight else { return 0 } if (rect.origin.y + rect.height) / rowHeight > CGFloat(max) { @@ -199,7 +199,7 @@ extension GridCollectionViewLayout { - parameter itemsPerRow: How many items there can be in a row - returns: First index */ - static func firstIndexInRow(row: Int, withItemsPerRow itemsPerRow: Int) -> Int { + static func firstIndexInRow(_ row: Int, withItemsPerRow itemsPerRow: Int) -> Int { return row * itemsPerRow } @@ -210,7 +210,7 @@ extension GridCollectionViewLayout { - parameter numberOfItems: The total number of items. - returns: Last index */ - static func lastIndexInRow(row: Int, withItemsPerRow itemsPerRow: Int, numberOfItems: Int) -> Int { + static func lastIndexInRow(_ row: Int, withItemsPerRow itemsPerRow: Int, numberOfItems: Int) -> Int { let maxIndex = (row + 1) * itemsPerRow - 1 let bounds = numberOfItems - 1 @@ -226,12 +226,12 @@ extension GridCollectionViewLayout { - parameter indexPath: The index path we want to flatten - returns: A flat index */ - func flatIndex(indexPath: NSIndexPath) -> Int { + func flatIndex(_ indexPath: IndexPath) -> Int { guard let collectionView = collectionView else { return 0 } - return (0..<(indexPath as NSIndexPath).section).reduce((indexPath as NSIndexPath).row) { $0 + collectionView.numberOfItemsInSection($1)} + return (0..<(indexPath as NSIndexPath).section).reduce((indexPath as NSIndexPath).row) { $0 + collectionView.numberOfItems(inSection: $1)} } /** @@ -239,20 +239,20 @@ extension GridCollectionViewLayout { - parameter index: The flat index - returns: An index path */ - func indexPathFromFlatIndex(index: Int) -> NSIndexPath { + func indexPathFromFlatIndex(_ index: Int) -> IndexPath { guard let collectionView = collectionView else { - return NSIndexPath(forItem: 0, inSection: 0) + return IndexPath(item: 0, section: 0) } var item = index var section = 0 - while(item >= collectionView.numberOfItemsInSection(section)) { - item -= collectionView.numberOfItemsInSection(section) + while(item >= collectionView.numberOfItems(inSection: section)) { + item -= collectionView.numberOfItems(inSection: section) section += 1 } - return NSIndexPath(forItem: item, inSection: section) + return IndexPath(item: item, section: section) } /** @@ -277,7 +277,7 @@ extension GridCollectionViewLayout { return 0 } - return (0.. 1.3" + "~> 1.5.0" ], "BSGridCollectionViewLayout": [ - "1.2.0-swift23" + "~> 1.2.0" ] } } diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 04ad9f9e..7d3e91ad 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,8 +1,8 @@ PODS: - - BSGridCollectionViewLayout (1.2.0-swift23) - - BSImagePicker (2.4.0): - - BSGridCollectionViewLayout (= 1.2.0-swift23) - - UIImageViewModeScaleAspect (~> 1.3) + - BSGridCollectionViewLayout (1.2.0) + - BSImagePicker (2.5.0): + - BSGridCollectionViewLayout (~> 1.2.0) + - UIImageViewModeScaleAspect (~> 1.5.0) - UIImageViewModeScaleAspect (1.5) DEPENDENCIES: @@ -13,10 +13,10 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - BSGridCollectionViewLayout: eb65d9747dcc2e5270842084a8e14e47243a09f5 - BSImagePicker: d8454b475ad0a6f8b4eda2ddcfec401e1f7d0cf4 + BSGridCollectionViewLayout: 8f12c8e1e08c47057f5a39a6828f4395f043d78f + BSImagePicker: 9ad3385318ca0db7e792b51ea8929cfc39284c56 UIImageViewModeScaleAspect: 11a790a0b9d248a13dc63e3a78991f1463b6d84e -PODFILE CHECKSUM: 94f153c3aee5b58a46ca1abfd28c2764bb85f520 +PODFILE CHECKSUM: 55707bb71dc224a83a5fab0d17f3eb856d760f6a COCOAPODS: 1.1.0.rc.2 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 29b483f4..30450104 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -12,20 +12,19 @@ 11AE74E840F21DB1EDA9C58BE659BA33 /* AlbumCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCB0F69AB0570C74B8682B858AB298EE /* AlbumCell.swift */; }; 166F076501AC09D8D5D64CCD0A206C62 /* AlbumsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7AC4148AD539614460157D5FC94FF75 /* AlbumsViewController.swift */; }; 1C33FD78005932356FF3E937998CBCC5 /* BSGridCollectionViewLayout-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E9DDDEDEA35726B9B1CF8C63CC046257 /* BSGridCollectionViewLayout-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1D63E546FF1EA08D513EDDFB06674CE6 /* Pods-BSImagePicker_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6082048FE1E42E4F0871FA05BB4EFD80 /* Pods-BSImagePicker_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1D63E546FF1EA08D513EDDFB06674CE6 /* Pods-BSImagePicker_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2208FB91FA51CE1DFEE5DCE7F1AE860A /* Pods-BSImagePicker_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1EC10A9CF4C9B064BA5411711E59E580 /* PhotoCollectionViewDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = F82038D408B98900D1CA1747F5A0E0A5 /* PhotoCollectionViewDataSource.swift */; }; 1FFE8A6DDCA9246D3EA98372EAD63780 /* UIImageViewModeScaleAspect-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FB978B9FEC0CABEE194AA66ABA44F42 /* UIImageViewModeScaleAspect-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 20684BE15FD3DFD53E62134CDE1F4F20 /* Pods-BSImagePicker_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FEF778DBECE15E72DADE441B184F997B /* Pods-BSImagePicker_Tests-dummy.m */; }; + 20684BE15FD3DFD53E62134CDE1F4F20 /* Pods-BSImagePicker_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 25D96850991152E699F039D128E1C9E1 /* Pods-BSImagePicker_Tests-dummy.m */; }; 21815944ABB24000045394D15631C87F /* PhotoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A33EE3D7D3E3B537B0AE532ED75B71BD /* PhotoCell.xib */; }; 23D8703FA5DEE897EE64E590465BDEB5 /* SelectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0D7D5EE204667192AEAD22F01C8E7AB /* SelectionView.swift */; }; 345708DD5F220E4BB3C286EFDD270509 /* add_photo@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 332E00A781E4D31682800A21809F05AF /* add_photo@3x.png */; }; 3889F62AA2888DB03BBCA7D588BF6255 /* Photos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7AB70D58866A6EC9378A794A3E203B3 /* Photos.framework */; }; 388C79FE83038778DBEA5D170B49202F /* ComposedCollectionViewDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B4FC4A0D20DB0EEEF28D022454DBEB1 /* ComposedCollectionViewDataSource.swift */; }; - 39CC77EEA7D338BAC4838DF5A0042FA1 /* BSImagePicker.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 9EF7865F27DC16380AC6CC55433148CD /* BSImagePicker.bundle */; }; + 39CC77EEA7D338BAC4838DF5A0042FA1 /* BSImagePicker.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D008B3744DAD202A954713F2C361C83E /* BSImagePicker.bundle */; }; 40014FF9B9A69253E2C34E8EAF771BA2 /* UIImageViewModeScaleAspect-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E3488FE59FC4DB51FC071EDC5A2BE759 /* UIImageViewModeScaleAspect-dummy.m */; }; 4071F7E71609F401003D3230893C521E /* BSImagePickerSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2F74234312E5953862B5A199F81D277 /* BSImagePickerSettings.swift */; }; 4546E3FB56F3693D2893B773F71C3097 /* BSImagePicker-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FC4652B08A1600EEE45D96B6712A7A8 /* BSImagePicker-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 47482F64E60C1D9EE37F6BE3E1E3F562 /* Pods-BSImagePicker_UI_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C4EF3694DE21581C3C6F46DDB869ED5C /* Pods-BSImagePicker_UI_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 49DD0C7E95B1CDB0FFEB5BC2E745BACA /* arrow_down@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 41434C6C3BB9C93164E3A0B4692BADDF /* arrow_down@2x.png */; }; 4D84C6E12A0C8733B588B202983465E2 /* CameraCollectionViewDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63DD589D627C60080627D1CF75BD9815 /* CameraCollectionViewDataSource.swift */; }; 543069E7AFC0805EF1CB25199D201424 /* UIImageViewModeScaleAspect.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 58762805239E3FE5C42C6777A18ECC9F /* UIImageViewModeScaleAspect.framework */; }; @@ -34,7 +33,6 @@ 61B3E8B44D6F2EA17EDE942B24371232 /* BSGridCollectionViewLayout-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EC6985F50CEFD58B48A2FADC4AD5350 /* BSGridCollectionViewLayout-dummy.m */; }; 6BF3FD7E196F67E875113F7A02C8638D /* AlbumTitleView.xib in Resources */ = {isa = PBXBuildFile; fileRef = B3BB76DEE24139FBAE2918BA806DB0BB /* AlbumTitleView.xib */; }; 729478D168ADD1B98CC3490A8BA646EF /* arrow_down@1x.png in Resources */ = {isa = PBXBuildFile; fileRef = 56481AAB02359FABC82DB1074E6DF2BA /* arrow_down@1x.png */; }; - 784DECA5B2A4CB0817D86A001595B80A /* Pods-BSImagePicker_UI_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 558A96435C7CF3649BBB50AD41EBCCA0 /* Pods-BSImagePicker_UI_Tests-dummy.m */; }; 7CD9C488F07273664772B1AA302D9D85 /* Albums.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 99CC0BCEC01BCBA23C3768506A4F63B4 /* Albums.storyboard */; }; 7D8F17E4DCB3809E8BD5AB5CBF4DAD24 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ADB385A2FB633F8AC4EF62F70D0E95A5 /* Foundation.framework */; }; 7E4FFCA3E9CBDF739BAC1B866B13E17B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F0C14F245FAA15561AD974235D55CC22 /* UIKit.framework */; }; @@ -52,11 +50,10 @@ CF5FAD1C2EE24FB2C50CC91A8DBE37CF /* UIViewController+BSImagePicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD7F235E85CC1D27CBECC42310B68266 /* UIViewController+BSImagePicker.swift */; }; D130664E5AB3AE440900439850877B31 /* Settings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92121642335D51FEFD0F7951B1AC198C /* Settings.swift */; }; D2C51CD71E1F27983032A23C1077A600 /* UIImageViewModeScaleAspect.h in Headers */ = {isa = PBXBuildFile; fileRef = 99D4CA5EA3AE683ACD07843A8A314751 /* UIImageViewModeScaleAspect.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D403C52E76D2EA2758475BBDA130B647 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ADB385A2FB633F8AC4EF62F70D0E95A5 /* Foundation.framework */; }; DF4D0829FCDAB6E62444804C8ED90421 /* ZoomAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0BE0F5FC80FEC7F06ECEC251697CCB5 /* ZoomAnimator.swift */; }; E6CB97E4D03638811A9B63F85DF18401 /* add_photo@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 59EDC68548593C3594E5ECF4CCBE53D1 /* add_photo@2x.png */; }; - E71AF01729D98044E7BD467B8F691D8C /* Pods-BSImagePicker_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6707473EEBC6628358602C35FD60A9C7 /* Pods-BSImagePicker_Example-dummy.m */; }; - EB46E7C8EA3DE6FFBCAF2A3B65C97797 /* Pods-BSImagePicker_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 68A505A51E969BDEBA9FFF9FB86A7A30 /* Pods-BSImagePicker_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E71AF01729D98044E7BD467B8F691D8C /* Pods-BSImagePicker_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F9C50B2A6734D2A0269173586624AB4D /* Pods-BSImagePicker_Example-dummy.m */; }; + EB46E7C8EA3DE6FFBCAF2A3B65C97797 /* Pods-BSImagePicker_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 89A3A4CEE887F2AA4D691ABEA1AE9BE5 /* Pods-BSImagePicker_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; EB841560A42ED462A6E4F0F9BC21DAFF /* add_photo.png in Resources */ = {isa = PBXBuildFile; fileRef = 8E7A4512D8E2269EC57F59EEFAF9EFDC /* add_photo.png */; }; EF1157DA2A81CD7704CA8624B0841278 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ADB385A2FB633F8AC4EF62F70D0E95A5 /* Foundation.framework */; }; EFE98DF46B15DDE171B61A3F52D70D8A /* BSGridCollectionViewLayout.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C854FCBD47E458EDF7EDA4C34FA28C5D /* BSGridCollectionViewLayout.framework */; }; @@ -65,13 +62,6 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 31F63A2BA4A50E6AE1E1300172FBB772 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 0FF38C485BD8E73F614C919F834D6EAB; - remoteInfo = UIImageViewModeScaleAspect; - }; 32F1A6CE07342E424DE342C9D5C9B5CC /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; @@ -107,13 +97,6 @@ remoteGlobalIDString = 8AA3DDB8797222294E1288CB197A8347; remoteInfo = BSGridCollectionViewLayout; }; - 6F2201D4432DA2447A2987CD6782993F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = C59EE95662AD4757E7FCE220DB1AFA41; - remoteInfo = BSImagePicker; - }; A66FE6A20AE54702E525ED24A4FEB97E /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; @@ -135,13 +118,6 @@ remoteGlobalIDString = C59EE95662AD4757E7FCE220DB1AFA41; remoteInfo = BSImagePicker; }; - F2414A5812BC928C2CD5D28CBBA772EB /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 8AA3DDB8797222294E1288CB197A8347; - remoteInfo = BSGridCollectionViewLayout; - }; FCD588705B7E6F7102D744F72F4C96DA /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; @@ -152,100 +128,89 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 0766A8C1A813A168519E3C740BA2374D /* Pods-BSImagePicker_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-BSImagePicker_Example.release.xcconfig"; sourceTree = ""; }; + 0E90639EF290180C7F0488C2288F82F0 /* Pods-BSImagePicker_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-BSImagePicker_Example-frameworks.sh"; sourceTree = ""; }; 0F7593C7000BBBCF28BE394BD944455E /* AlbumTitleView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AlbumTitleView.swift; sourceTree = ""; }; 165336F722000CEC831E86805289995C /* PhotoCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PhotoCell.swift; sourceTree = ""; }; - 1D23B7CF73DACA0E8A19183EFEC0E012 /* Pods-BSImagePicker_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-BSImagePicker_Tests-acknowledgements.plist"; sourceTree = ""; }; + 2208FB91FA51CE1DFEE5DCE7F1AE860A /* Pods-BSImagePicker_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-BSImagePicker_Tests-umbrella.h"; sourceTree = ""; }; + 25D96850991152E699F039D128E1C9E1 /* Pods-BSImagePicker_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-BSImagePicker_Tests-dummy.m"; sourceTree = ""; }; 2A68258D040ABF50DCDC7178976D5279 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 2CEA9A964198F14EEFEC3D382B5F42F4 /* Pods_BSImagePicker_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BSImagePicker_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 332E00A781E4D31682800A21809F05AF /* add_photo@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = "add_photo@3x.png"; sourceTree = ""; }; + 35722F7DA76A812293589CA3AA332D53 /* Pods_BSImagePicker_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BSImagePicker_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 36A1E6AE010C66F2F7B9077C17875CF1 /* Pods-BSImagePicker_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-BSImagePicker_Tests-resources.sh"; sourceTree = ""; }; 41434C6C3BB9C93164E3A0B4692BADDF /* arrow_down@2x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = "arrow_down@2x.png"; sourceTree = ""; }; 418623CC5F10B7B4D8B7120E16C1868E /* GridCollectionViewLayout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GridCollectionViewLayout.swift; path = Pod/Classes/GridCollectionViewLayout.swift; sourceTree = ""; }; - 4DD57666E0CA73CBF0E64705B56D3D89 /* Pods-BSImagePicker_UI_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-BSImagePicker_UI_Tests-acknowledgements.markdown"; sourceTree = ""; }; + 425A72440AF028F540D620AFF22B1046 /* Pods-BSImagePicker_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-BSImagePicker_Tests.modulemap"; sourceTree = ""; }; + 4F48B3EE9B4A216C557827C03F1A0766 /* UIImageViewModeScaleAspect.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = UIImageViewModeScaleAspect.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 4FA0B053CFEEFAF4307FEC563A29E513 /* BSGridCollectionViewLayout-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BSGridCollectionViewLayout-prefix.pch"; sourceTree = ""; }; 4FB978B9FEC0CABEE194AA66ABA44F42 /* UIImageViewModeScaleAspect-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "UIImageViewModeScaleAspect-umbrella.h"; sourceTree = ""; }; - 53AFF5AADB72F7A23F75293F0431CC43 /* Pods_BSImagePicker_UI_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BSImagePicker_UI_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 558A96435C7CF3649BBB50AD41EBCCA0 /* Pods-BSImagePicker_UI_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-BSImagePicker_UI_Tests-dummy.m"; sourceTree = ""; }; 56481AAB02359FABC82DB1074E6DF2BA /* arrow_down@1x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = "arrow_down@1x.png"; sourceTree = ""; }; 58762805239E3FE5C42C6777A18ECC9F /* UIImageViewModeScaleAspect.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = UIImageViewModeScaleAspect.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 59EDC68548593C3594E5ECF4CCBE53D1 /* add_photo@2x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = "add_photo@2x.png"; sourceTree = ""; }; - 5C0139CDC4ED9B8D005F006B516A6305 /* Pods-BSImagePicker_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-BSImagePicker_Example-acknowledgements.markdown"; sourceTree = ""; }; 5E55CF3494345E87C43B47CAFF6DB554 /* BSImagePicker-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "BSImagePicker-dummy.m"; sourceTree = ""; }; - 6082048FE1E42E4F0871FA05BB4EFD80 /* Pods-BSImagePicker_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-BSImagePicker_Tests-umbrella.h"; sourceTree = ""; }; 62A07BC861854941FF03B1DB7CC045B3 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 63DD589D627C60080627D1CF75BD9815 /* CameraCollectionViewDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CameraCollectionViewDataSource.swift; sourceTree = ""; }; - 6707473EEBC6628358602C35FD60A9C7 /* Pods-BSImagePicker_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-BSImagePicker_Example-dummy.m"; sourceTree = ""; }; - 68A505A51E969BDEBA9FFF9FB86A7A30 /* Pods-BSImagePicker_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-BSImagePicker_Example-umbrella.h"; sourceTree = ""; }; - 693B313F6B3D56877ABD3194E92516FA /* Pods-BSImagePicker_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-BSImagePicker_Tests.modulemap"; sourceTree = ""; }; - 6C89D192BCA67F0A92F3690DA6CFED91 /* Pods-BSImagePicker_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-BSImagePicker_Tests.release.xcconfig"; sourceTree = ""; }; + 69CE8C10832E9C6F8F7A5DE9C7CBE8EC /* Pods-BSImagePicker_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-BSImagePicker_Example-acknowledgements.plist"; sourceTree = ""; }; + 6DCF89096C10A6B767280450B92D4889 /* Pods-BSImagePicker_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-BSImagePicker_Tests.debug.xcconfig"; sourceTree = ""; }; 6E093FFC1EBDD5C3B80CC346A4863422 /* BSImagePicker.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = BSImagePicker.xcconfig; sourceTree = ""; }; - 6E8D1581D178D2EB03E5764CC97F709D /* UIImageViewModeScaleAspect.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = UIImageViewModeScaleAspect.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 6EC6985F50CEFD58B48A2FADC4AD5350 /* BSGridCollectionViewLayout-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "BSGridCollectionViewLayout-dummy.m"; sourceTree = ""; }; 6FC4652B08A1600EEE45D96B6712A7A8 /* BSImagePicker-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BSImagePicker-umbrella.h"; sourceTree = ""; }; 716E289A0D3FDA8AFA006FC2B6380CEB /* UIImageViewModeScaleAspect.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = UIImageViewModeScaleAspect.m; path = UIImageViewModeScaleAspect/UIImageViewModeScaleAspect.m; sourceTree = ""; }; - 723602707C66803757136CA7A8DCB55A /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 73B339A936AEF160A9419A439D43BE74 /* Pods-BSImagePicker_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-BSImagePicker_Example.debug.xcconfig"; sourceTree = ""; }; 77316728C04753404C3696124D38883E /* CameraCell.xib */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file.xib; path = CameraCell.xib; sourceTree = ""; }; 7B4FC4A0D20DB0EEEF28D022454DBEB1 /* ComposedCollectionViewDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ComposedCollectionViewDataSource.swift; sourceTree = ""; }; - 7B980AEED84F142C079D139BE5DF7BAE /* Pods-BSImagePicker_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-BSImagePicker_Example.debug.xcconfig"; sourceTree = ""; }; 7DDD3313E9FAA24687062DD131312A19 /* CameraCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CameraCell.swift; sourceTree = ""; }; - 8127191F72BE06149071AF3EFCDC1CDB /* Pods-BSImagePicker_UI_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-BSImagePicker_UI_Tests-resources.sh"; sourceTree = ""; }; 81D8BA904EA0A7EFD1CCCDBF3F3F7741 /* UIImageViewModeScaleAspect.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = UIImageViewModeScaleAspect.xcconfig; sourceTree = ""; }; - 83E141C085D0A2813CF5E4BE0C4DE98B /* BSImagePicker.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BSImagePicker.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 870D1C2AA79B35C0B1377598E0C4FBBD /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8CE1505B9ACC808F89909F86443E624E /* Pods-BSImagePicker_UI_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-BSImagePicker_UI_Tests.release.xcconfig"; sourceTree = ""; }; - 8DB53655DBC99BBB84DA627CF342BADC /* Pods-BSImagePicker_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-BSImagePicker_Example.release.xcconfig"; sourceTree = ""; }; + 89A3A4CEE887F2AA4D691ABEA1AE9BE5 /* Pods-BSImagePicker_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-BSImagePicker_Example-umbrella.h"; sourceTree = ""; }; 8E7A4512D8E2269EC57F59EEFAF9EFDC /* add_photo.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = add_photo.png; sourceTree = ""; }; 8FC7047F1964327C5D56E6055AFC0D91 /* UIButton+NoAnimation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIButton+NoAnimation.swift"; sourceTree = ""; }; 9036B4F88810B0B03290C79C9562A61C /* UIImageViewModeScaleAspect-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "UIImageViewModeScaleAspect-prefix.pch"; sourceTree = ""; }; + 903E787B7D08ACE7E6D292D5F7B347A0 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 92121642335D51FEFD0F7951B1AC198C /* Settings.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Settings.swift; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 98A414379630F80D7AB3EC73E1722073 /* BSImagePicker-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BSImagePicker-prefix.pch"; sourceTree = ""; }; 99CC0BCEC01BCBA23C3768506A4F63B4 /* Albums.storyboard */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file.storyboard; path = Albums.storyboard; sourceTree = ""; }; 99D4CA5EA3AE683ACD07843A8A314751 /* UIImageViewModeScaleAspect.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = UIImageViewModeScaleAspect.h; path = UIImageViewModeScaleAspect/UIImageViewModeScaleAspect.h; sourceTree = ""; }; + 9A936BC895ACB48A04B64BE4915EC567 /* Pods-BSImagePicker_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-BSImagePicker_Tests.release.xcconfig"; sourceTree = ""; }; 9DE18A949EDBFEE8FEF98E42E933C42F /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9EF7865F27DC16380AC6CC55433148CD /* BSImagePicker.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BSImagePicker.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; A0BE0F5FC80FEC7F06ECEC251697CCB5 /* ZoomAnimator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ZoomAnimator.swift; sourceTree = ""; }; - A1237673C201FD8928F2DB9B118CAB96 /* Pods-BSImagePicker_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-BSImagePicker_Tests-frameworks.sh"; sourceTree = ""; }; A33EE3D7D3E3B537B0AE532ED75B71BD /* PhotoCell.xib */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file.xib; path = PhotoCell.xib; sourceTree = ""; }; - A466FAEC3CD1A954966D9BB04DD5C0E5 /* BSGridCollectionViewLayout.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BSGridCollectionViewLayout.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A536D1B4D5B74787CEB72C99EE922850 /* BSImagePicker.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BSImagePicker.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A81F60675FC62437C1CF53E1714BAF52 /* AlbumTableViewDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AlbumTableViewDataSource.swift; sourceTree = ""; }; AD7F235E85CC1D27CBECC42310B68266 /* UIViewController+BSImagePicker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIViewController+BSImagePicker.swift"; sourceTree = ""; }; ADB385A2FB633F8AC4EF62F70D0E95A5 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; B0D7D5EE204667192AEAD22F01C8E7AB /* SelectionView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SelectionView.swift; sourceTree = ""; }; B164E0104AE398894A906B8B2B3D6CB0 /* arrow_down@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = "arrow_down@3x.png"; sourceTree = ""; }; + B26A59C7E9DD0669FD9C939EAFE9FA0E /* Pods-BSImagePicker_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-BSImagePicker_Tests-acknowledgements.markdown"; sourceTree = ""; }; B3BB76DEE24139FBAE2918BA806DB0BB /* AlbumTitleView.xib */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file.xib; path = AlbumTitleView.xib; sourceTree = ""; }; + B6999DA04FE4E20399311F06C1F4292B /* BSGridCollectionViewLayout.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BSGridCollectionViewLayout.framework; sourceTree = BUILT_PRODUCTS_DIR; }; B7AB70D58866A6EC9378A794A3E203B3 /* Photos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Photos.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/Photos.framework; sourceTree = DEVELOPER_DIR; }; + B850C235006BCDA2210051124E372BFB /* Pods-BSImagePicker_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-BSImagePicker_Tests-acknowledgements.plist"; sourceTree = ""; }; B8740BC66F09225F35498366B9A140E4 /* PreviewViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PreviewViewController.swift; sourceTree = ""; }; - B95CAA6E57FCB838EC806851E6F884CA /* Pods-BSImagePicker_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-BSImagePicker_Tests-acknowledgements.markdown"; sourceTree = ""; }; - C20BE000ACCFC6B8D6682CECCA1045B6 /* Pods-BSImagePicker_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-BSImagePicker_Example.modulemap"; sourceTree = ""; }; - C4CC491D8F399F57260E256C73EEF436 /* Pods-BSImagePicker_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-BSImagePicker_Example-acknowledgements.plist"; sourceTree = ""; }; - C4EF3694DE21581C3C6F46DDB869ED5C /* Pods-BSImagePicker_UI_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-BSImagePicker_UI_Tests-umbrella.h"; sourceTree = ""; }; - C58D1861DEE700093D5F271B749F116C /* Pods-BSImagePicker_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-BSImagePicker_Example-frameworks.sh"; sourceTree = ""; }; + BB60EEFED3F26C2BB3F8E3BAF1511775 /* Pods-BSImagePicker_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-BSImagePicker_Example-resources.sh"; sourceTree = ""; }; C6944DB6AFCC06D71D691821A8124487 /* BSImagePickerViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BSImagePickerViewController.swift; sourceTree = ""; }; - C84116F9BC60D5CEAF11DEAE4A2C79FA /* Pods_BSImagePicker_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BSImagePicker_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C854FCBD47E458EDF7EDA4C34FA28C5D /* BSGridCollectionViewLayout.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BSGridCollectionViewLayout.framework; sourceTree = BUILT_PRODUCTS_DIR; }; CAAE62E76D5B9BBCE89A11F9256C2C90 /* ResourceBundle-BSImagePicker-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-BSImagePicker-Info.plist"; sourceTree = ""; }; - CC1E179E69EFE1B00F5AAF363DB50733 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; CCB0F69AB0570C74B8682B858AB298EE /* AlbumCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AlbumCell.swift; sourceTree = ""; }; CCF466C7390EF60F027E39B2E3BE16E8 /* UIImageViewModeScaleAspect.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = UIImageViewModeScaleAspect.modulemap; sourceTree = ""; }; CD17C3E67EA9C646060DB3181B71C593 /* BSGridCollectionViewLayout.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = BSGridCollectionViewLayout.xcconfig; sourceTree = ""; }; + D008B3744DAD202A954713F2C361C83E /* BSImagePicker.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BSImagePicker.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; D04E1F086FC15C5DDF742625F49058D3 /* NSIndexSet+NSIndexPath.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSIndexSet+NSIndexPath.swift"; sourceTree = ""; }; DA1B354E76402C19418683FBB3492A5F /* BSGridCollectionViewLayout.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = BSGridCollectionViewLayout.modulemap; sourceTree = ""; }; - E13D968AA08C1086536AB3098CF83F1C /* Pods-BSImagePicker_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-BSImagePicker_Tests-resources.sh"; sourceTree = ""; }; E3488FE59FC4DB51FC071EDC5A2BE759 /* UIImageViewModeScaleAspect-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "UIImageViewModeScaleAspect-dummy.m"; sourceTree = ""; }; - E3D408B017598DC39192B35E4D5AC2AD /* Pods-BSImagePicker_UI_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-BSImagePicker_UI_Tests-frameworks.sh"; sourceTree = ""; }; E3EB0EB7076FCA8E87556BDE262DE92C /* BSImagePicker.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = BSImagePicker.modulemap; sourceTree = ""; }; - E43B02FF616EE2A085195F1C1412B73D /* Pods-BSImagePicker_UI_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-BSImagePicker_UI_Tests.modulemap"; sourceTree = ""; }; + E4C37FC063E821068749A2A8EA1F2021 /* Pods-BSImagePicker_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-BSImagePicker_Example.modulemap"; sourceTree = ""; }; + E86D154B5A30BD01DD888A3650CBD024 /* Pods-BSImagePicker_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-BSImagePicker_Tests-frameworks.sh"; sourceTree = ""; }; E9DDDEDEA35726B9B1CF8C63CC046257 /* BSGridCollectionViewLayout-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BSGridCollectionViewLayout-umbrella.h"; sourceTree = ""; }; - E9FE45835EB4258DBE96BD93355CA0D9 /* Pods-BSImagePicker_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-BSImagePicker_Tests.debug.xcconfig"; sourceTree = ""; }; - ED671A8E2AD88A5DA2B59FFE7BE9908D /* Pods_BSImagePicker_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BSImagePicker_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F00E9B755E517A92770B1ECCD8246246 /* Pods-BSImagePicker_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-BSImagePicker_Example-acknowledgements.markdown"; sourceTree = ""; }; F0C14F245FAA15561AD974235D55CC22 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; F2F74234312E5953862B5A199F81D277 /* BSImagePickerSettings.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BSImagePickerSettings.swift; sourceTree = ""; }; F3E940B7456634793F0529DD8B26DC41 /* PhotosViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PhotosViewController.swift; sourceTree = ""; }; + F761787DF55DCB43B32D67200071C4E7 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; F7AC4148AD539614460157D5FC94FF75 /* AlbumsViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AlbumsViewController.swift; sourceTree = ""; }; - F7BF8E7E2EAC345C83DCEAD38C06EE40 /* Pods-BSImagePicker_UI_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-BSImagePicker_UI_Tests-acknowledgements.plist"; sourceTree = ""; }; F82038D408B98900D1CA1747F5A0E0A5 /* PhotoCollectionViewDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PhotoCollectionViewDataSource.swift; sourceTree = ""; }; - F9A4A80B5741D1F14CCE2419957E1BAB /* Pods-BSImagePicker_UI_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-BSImagePicker_UI_Tests.debug.xcconfig"; sourceTree = ""; }; - FD9B27976E86216230A4BE1082F6D0A2 /* Pods-BSImagePicker_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-BSImagePicker_Example-resources.sh"; sourceTree = ""; }; - FEF778DBECE15E72DADE441B184F997B /* Pods-BSImagePicker_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-BSImagePicker_Tests-dummy.m"; sourceTree = ""; }; + F9C50B2A6734D2A0269173586624AB4D /* Pods-BSImagePicker_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-BSImagePicker_Example-dummy.m"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -277,14 +242,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 6C6D3CAE533AE0F5089548A61FB66E4E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - D403C52E76D2EA2758475BBDA130B647 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 7E5618727741F9984DB77DD1ED625B94 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -335,38 +292,6 @@ path = Model; sourceTree = ""; }; - 336E70EDFF66FB9DEB46E162B164964F /* Products */ = { - isa = PBXGroup; - children = ( - A466FAEC3CD1A954966D9BB04DD5C0E5 /* BSGridCollectionViewLayout.framework */, - 9EF7865F27DC16380AC6CC55433148CD /* BSImagePicker.bundle */, - 83E141C085D0A2813CF5E4BE0C4DE98B /* BSImagePicker.framework */, - ED671A8E2AD88A5DA2B59FFE7BE9908D /* Pods_BSImagePicker_Example.framework */, - C84116F9BC60D5CEAF11DEAE4A2C79FA /* Pods_BSImagePicker_Tests.framework */, - 53AFF5AADB72F7A23F75293F0431CC43 /* Pods_BSImagePicker_UI_Tests.framework */, - 6E8D1581D178D2EB03E5764CC97F709D /* UIImageViewModeScaleAspect.framework */, - ); - name = Products; - sourceTree = ""; - }; - 340E5468C2459A37307526E0441C6CB6 /* Pods-BSImagePicker_Tests */ = { - isa = PBXGroup; - children = ( - 870D1C2AA79B35C0B1377598E0C4FBBD /* Info.plist */, - 693B313F6B3D56877ABD3194E92516FA /* Pods-BSImagePicker_Tests.modulemap */, - B95CAA6E57FCB838EC806851E6F884CA /* Pods-BSImagePicker_Tests-acknowledgements.markdown */, - 1D23B7CF73DACA0E8A19183EFEC0E012 /* Pods-BSImagePicker_Tests-acknowledgements.plist */, - FEF778DBECE15E72DADE441B184F997B /* Pods-BSImagePicker_Tests-dummy.m */, - A1237673C201FD8928F2DB9B118CAB96 /* Pods-BSImagePicker_Tests-frameworks.sh */, - E13D968AA08C1086536AB3098CF83F1C /* Pods-BSImagePicker_Tests-resources.sh */, - 6082048FE1E42E4F0871FA05BB4EFD80 /* Pods-BSImagePicker_Tests-umbrella.h */, - E9FE45835EB4258DBE96BD93355CA0D9 /* Pods-BSImagePicker_Tests.debug.xcconfig */, - 6C89D192BCA67F0A92F3690DA6CFED91 /* Pods-BSImagePicker_Tests.release.xcconfig */, - ); - name = "Pods-BSImagePicker_Tests"; - path = "Target Support Files/Pods-BSImagePicker_Tests"; - sourceTree = ""; - }; 391599F2394F5C1E7F1704EA8C49D508 /* Pods */ = { isa = PBXGroup; children = ( @@ -376,24 +301,6 @@ name = Pods; sourceTree = ""; }; - 3FBFC63F2B320F54D7ED3235010C5CF1 /* Pods-BSImagePicker_UI_Tests */ = { - isa = PBXGroup; - children = ( - CC1E179E69EFE1B00F5AAF363DB50733 /* Info.plist */, - E43B02FF616EE2A085195F1C1412B73D /* Pods-BSImagePicker_UI_Tests.modulemap */, - 4DD57666E0CA73CBF0E64705B56D3D89 /* Pods-BSImagePicker_UI_Tests-acknowledgements.markdown */, - F7BF8E7E2EAC345C83DCEAD38C06EE40 /* Pods-BSImagePicker_UI_Tests-acknowledgements.plist */, - 558A96435C7CF3649BBB50AD41EBCCA0 /* Pods-BSImagePicker_UI_Tests-dummy.m */, - E3D408B017598DC39192B35E4D5AC2AD /* Pods-BSImagePicker_UI_Tests-frameworks.sh */, - 8127191F72BE06149071AF3EFCDC1CDB /* Pods-BSImagePicker_UI_Tests-resources.sh */, - C4EF3694DE21581C3C6F46DDB869ED5C /* Pods-BSImagePicker_UI_Tests-umbrella.h */, - F9A4A80B5741D1F14CCE2419957E1BAB /* Pods-BSImagePicker_UI_Tests.debug.xcconfig */, - 8CE1505B9ACC808F89909F86443E624E /* Pods-BSImagePicker_UI_Tests.release.xcconfig */, - ); - name = "Pods-BSImagePicker_UI_Tests"; - path = "Target Support Files/Pods-BSImagePicker_UI_Tests"; - sourceTree = ""; - }; 497DD5CCE7858DF75A46A32CB27AEFD4 /* Support Files */ = { isa = PBXGroup; children = ( @@ -409,24 +316,6 @@ path = "Example/Pods/Target Support Files/BSImagePicker"; sourceTree = ""; }; - 5011837FBEEAAFC68551EB13CA038FE8 /* Pods-BSImagePicker_Example */ = { - isa = PBXGroup; - children = ( - 723602707C66803757136CA7A8DCB55A /* Info.plist */, - C20BE000ACCFC6B8D6682CECCA1045B6 /* Pods-BSImagePicker_Example.modulemap */, - 5C0139CDC4ED9B8D005F006B516A6305 /* Pods-BSImagePicker_Example-acknowledgements.markdown */, - C4CC491D8F399F57260E256C73EEF436 /* Pods-BSImagePicker_Example-acknowledgements.plist */, - 6707473EEBC6628358602C35FD60A9C7 /* Pods-BSImagePicker_Example-dummy.m */, - C58D1861DEE700093D5F271B749F116C /* Pods-BSImagePicker_Example-frameworks.sh */, - FD9B27976E86216230A4BE1082F6D0A2 /* Pods-BSImagePicker_Example-resources.sh */, - 68A505A51E969BDEBA9FFF9FB86A7A30 /* Pods-BSImagePicker_Example-umbrella.h */, - 7B980AEED84F142C079D139BE5DF7BAE /* Pods-BSImagePicker_Example.debug.xcconfig */, - 8DB53655DBC99BBB84DA627CF342BADC /* Pods-BSImagePicker_Example.release.xcconfig */, - ); - name = "Pods-BSImagePicker_Example"; - path = "Target Support Files/Pods-BSImagePicker_Example"; - sourceTree = ""; - }; 5A25AA5627F6E012CB691B42FFBA71F3 /* Extension */ = { isa = PBXGroup; children = ( @@ -437,16 +326,6 @@ path = Extension; sourceTree = ""; }; - 686CF6E1E8E0DF091895028B98DDA127 /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - 5011837FBEEAAFC68551EB13CA038FE8 /* Pods-BSImagePicker_Example */, - 340E5468C2459A37307526E0441C6CB6 /* Pods-BSImagePicker_Tests */, - 3FBFC63F2B320F54D7ED3235010C5CF1 /* Pods-BSImagePicker_UI_Tests */, - ); - name = "Targets Support Files"; - sourceTree = ""; - }; 6C2CDFD821AB077E226D0B202B939830 /* BSImagePicker */ = { isa = PBXGroup; children = ( @@ -475,8 +354,8 @@ FD1297859B776AAAA3E97E4E04BAA420 /* Development Pods */, 73AADAB92E14EF92D6CFC3FC49BA831F /* Frameworks */, 391599F2394F5C1E7F1704EA8C49D508 /* Pods */, - 336E70EDFF66FB9DEB46E162B164964F /* Products */, - 686CF6E1E8E0DF091895028B98DDA127 /* Targets Support Files */, + 9D371C175B615E0F4E03682291E6B182 /* Products */, + D8ACB972CE87BF81FD1DA72D9CA153DA /* Targets Support Files */, ); sourceTree = ""; }; @@ -515,6 +394,24 @@ path = BSGridCollectionViewLayout; sourceTree = ""; }; + 84712633118968FADFE4FC48A8A44FA8 /* Pods-BSImagePicker_Tests */ = { + isa = PBXGroup; + children = ( + F761787DF55DCB43B32D67200071C4E7 /* Info.plist */, + 425A72440AF028F540D620AFF22B1046 /* Pods-BSImagePicker_Tests.modulemap */, + B26A59C7E9DD0669FD9C939EAFE9FA0E /* Pods-BSImagePicker_Tests-acknowledgements.markdown */, + B850C235006BCDA2210051124E372BFB /* Pods-BSImagePicker_Tests-acknowledgements.plist */, + 25D96850991152E699F039D128E1C9E1 /* Pods-BSImagePicker_Tests-dummy.m */, + E86D154B5A30BD01DD888A3650CBD024 /* Pods-BSImagePicker_Tests-frameworks.sh */, + 36A1E6AE010C66F2F7B9077C17875CF1 /* Pods-BSImagePicker_Tests-resources.sh */, + 2208FB91FA51CE1DFEE5DCE7F1AE860A /* Pods-BSImagePicker_Tests-umbrella.h */, + 6DCF89096C10A6B767280450B92D4889 /* Pods-BSImagePicker_Tests.debug.xcconfig */, + 9A936BC895ACB48A04B64BE4915EC567 /* Pods-BSImagePicker_Tests.release.xcconfig */, + ); + name = "Pods-BSImagePicker_Tests"; + path = "Target Support Files/Pods-BSImagePicker_Tests"; + sourceTree = ""; + }; 89C6501FA635959F679629E31DDD19BA /* View */ = { isa = PBXGroup; children = ( @@ -545,6 +442,19 @@ path = Pod; sourceTree = ""; }; + 9D371C175B615E0F4E03682291E6B182 /* Products */ = { + isa = PBXGroup; + children = ( + B6999DA04FE4E20399311F06C1F4292B /* BSGridCollectionViewLayout.framework */, + D008B3744DAD202A954713F2C361C83E /* BSImagePicker.bundle */, + A536D1B4D5B74787CEB72C99EE922850 /* BSImagePicker.framework */, + 2CEA9A964198F14EEFEC3D382B5F42F4 /* Pods_BSImagePicker_Example.framework */, + 35722F7DA76A812293589CA3AA332D53 /* Pods_BSImagePicker_Tests.framework */, + 4F48B3EE9B4A216C557827C03F1A0766 /* UIImageViewModeScaleAspect.framework */, + ); + name = Products; + sourceTree = ""; + }; A71D826372807E3B7EB14A5D12B9A979 /* Resources */ = { isa = PBXGroup; children = ( @@ -602,6 +512,15 @@ path = UIImageViewModeScaleAspect; sourceTree = ""; }; + D8ACB972CE87BF81FD1DA72D9CA153DA /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + EF5745D040470476565E215D0A614DB3 /* Pods-BSImagePicker_Example */, + 84712633118968FADFE4FC48A8A44FA8 /* Pods-BSImagePicker_Tests */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; DDD6838D7BC975BA056F8DF13B646DC3 /* Pod */ = { isa = PBXGroup; children = ( @@ -610,6 +529,24 @@ path = Pod; sourceTree = ""; }; + EF5745D040470476565E215D0A614DB3 /* Pods-BSImagePicker_Example */ = { + isa = PBXGroup; + children = ( + 903E787B7D08ACE7E6D292D5F7B347A0 /* Info.plist */, + E4C37FC063E821068749A2A8EA1F2021 /* Pods-BSImagePicker_Example.modulemap */, + F00E9B755E517A92770B1ECCD8246246 /* Pods-BSImagePicker_Example-acknowledgements.markdown */, + 69CE8C10832E9C6F8F7A5DE9C7CBE8EC /* Pods-BSImagePicker_Example-acknowledgements.plist */, + F9C50B2A6734D2A0269173586624AB4D /* Pods-BSImagePicker_Example-dummy.m */, + 0E90639EF290180C7F0488C2288F82F0 /* Pods-BSImagePicker_Example-frameworks.sh */, + BB60EEFED3F26C2BB3F8E3BAF1511775 /* Pods-BSImagePicker_Example-resources.sh */, + 89A3A4CEE887F2AA4D691ABEA1AE9BE5 /* Pods-BSImagePicker_Example-umbrella.h */, + 73B339A936AEF160A9419A439D43BE74 /* Pods-BSImagePicker_Example.debug.xcconfig */, + 0766A8C1A813A168519E3C740BA2374D /* Pods-BSImagePicker_Example.release.xcconfig */, + ); + name = "Pods-BSImagePicker_Example"; + path = "Target Support Files/Pods-BSImagePicker_Example"; + sourceTree = ""; + }; FD1297859B776AAAA3E97E4E04BAA420 /* Development Pods */ = { isa = PBXGroup; children = ( @@ -646,14 +583,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - C952B8B9E7B144EE555D1771C84FDBDE /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 47482F64E60C1D9EE37F6BE3E1E3F562 /* Pods-BSImagePicker_UI_Tests-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; CCE611FF59203C57951C5EA18DC90FC9 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -687,27 +616,7 @@ ); name = UIImageViewModeScaleAspect; productName = UIImageViewModeScaleAspect; - productReference = 6E8D1581D178D2EB03E5764CC97F709D /* UIImageViewModeScaleAspect.framework */; - productType = "com.apple.product-type.framework"; - }; - 6334A41E145B83705403BE6F064AE73C /* Pods-BSImagePicker_UI_Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 23143EA74D7A47D51F9CE3AE06F77BA6 /* Build configuration list for PBXNativeTarget "Pods-BSImagePicker_UI_Tests" */; - buildPhases = ( - CF45F68C4773B818BB2526EA16E179F4 /* Sources */, - 6C6D3CAE533AE0F5089548A61FB66E4E /* Frameworks */, - C952B8B9E7B144EE555D1771C84FDBDE /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - BAE9632C13A0E1A5BCB8005EA3A4F3CB /* PBXTargetDependency */, - 6B217E7D4565DFBFE2424B05CD5BAFF4 /* PBXTargetDependency */, - C00AE2AC5930ABD810C90853196C3B70 /* PBXTargetDependency */, - ); - name = "Pods-BSImagePicker_UI_Tests"; - productName = "Pods-BSImagePicker_UI_Tests"; - productReference = 53AFF5AADB72F7A23F75293F0431CC43 /* Pods_BSImagePicker_UI_Tests.framework */; + productReference = 4F48B3EE9B4A216C557827C03F1A0766 /* UIImageViewModeScaleAspect.framework */; productType = "com.apple.product-type.framework"; }; 7DCA14589FB4734B3CCF66FC8B0F3627 /* Pods-BSImagePicker_Example */ = { @@ -727,7 +636,7 @@ ); name = "Pods-BSImagePicker_Example"; productName = "Pods-BSImagePicker_Example"; - productReference = ED671A8E2AD88A5DA2B59FFE7BE9908D /* Pods_BSImagePicker_Example.framework */; + productReference = 2CEA9A964198F14EEFEC3D382B5F42F4 /* Pods_BSImagePicker_Example.framework */; productType = "com.apple.product-type.framework"; }; 8AA3DDB8797222294E1288CB197A8347 /* BSGridCollectionViewLayout */ = { @@ -744,7 +653,7 @@ ); name = BSGridCollectionViewLayout; productName = BSGridCollectionViewLayout; - productReference = A466FAEC3CD1A954966D9BB04DD5C0E5 /* BSGridCollectionViewLayout.framework */; + productReference = B6999DA04FE4E20399311F06C1F4292B /* BSGridCollectionViewLayout.framework */; productType = "com.apple.product-type.framework"; }; B98A9B2055600E74A7DE1165549971B8 /* Pods-BSImagePicker_Tests */ = { @@ -764,7 +673,7 @@ ); name = "Pods-BSImagePicker_Tests"; productName = "Pods-BSImagePicker_Tests"; - productReference = C84116F9BC60D5CEAF11DEAE4A2C79FA /* Pods_BSImagePicker_Tests.framework */; + productReference = 35722F7DA76A812293589CA3AA332D53 /* Pods_BSImagePicker_Tests.framework */; productType = "com.apple.product-type.framework"; }; C59EE95662AD4757E7FCE220DB1AFA41 /* BSImagePicker */ = { @@ -785,7 +694,7 @@ ); name = BSImagePicker; productName = BSImagePicker; - productReference = 83E141C085D0A2813CF5E4BE0C4DE98B /* BSImagePicker.framework */; + productReference = A536D1B4D5B74787CEB72C99EE922850 /* BSImagePicker.framework */; productType = "com.apple.product-type.framework"; }; F7DE5171AA3C53DA4E4A078B795C78EE /* BSImagePicker-BSImagePicker */ = { @@ -802,7 +711,7 @@ ); name = "BSImagePicker-BSImagePicker"; productName = "BSImagePicker-BSImagePicker"; - productReference = 9EF7865F27DC16380AC6CC55433148CD /* BSImagePicker.bundle */; + productReference = D008B3744DAD202A954713F2C361C83E /* BSImagePicker.bundle */; productType = "com.apple.product-type.bundle"; }; /* End PBXNativeTarget section */ @@ -812,7 +721,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0700; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -822,7 +731,7 @@ en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = 336E70EDFF66FB9DEB46E162B164964F /* Products */; + productRefGroup = 9D371C175B615E0F4E03682291E6B182 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( @@ -831,7 +740,6 @@ F7DE5171AA3C53DA4E4A078B795C78EE /* BSImagePicker-BSImagePicker */, 7DCA14589FB4734B3CCF66FC8B0F3627 /* Pods-BSImagePicker_Example */, B98A9B2055600E74A7DE1165549971B8 /* Pods-BSImagePicker_Tests */, - 6334A41E145B83705403BE6F064AE73C /* Pods-BSImagePicker_UI_Tests */, 0FF38C485BD8E73F614C919F834D6EAB /* UIImageViewModeScaleAspect */, ); }; @@ -918,14 +826,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - CF45F68C4773B818BB2526EA16E179F4 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 784DECA5B2A4CB0817D86A001595B80A /* Pods-BSImagePicker_UI_Tests-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; D518FFBEA35BDE226139B5CE2081F913 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -945,12 +845,6 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 6B217E7D4565DFBFE2424B05CD5BAFF4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = BSImagePicker; - target = C59EE95662AD4757E7FCE220DB1AFA41 /* BSImagePicker */; - targetProxy = 6F2201D4432DA2447A2987CD6782993F /* PBXContainerItemProxy */; - }; 9240AE56E5BFF8374EB1833821BEB66E /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = UIImageViewModeScaleAspect; @@ -975,24 +869,12 @@ target = 8AA3DDB8797222294E1288CB197A8347 /* BSGridCollectionViewLayout */; targetProxy = 3BECAC3FDF4D253E201B626DB9BF7751 /* PBXContainerItemProxy */; }; - BAE9632C13A0E1A5BCB8005EA3A4F3CB /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = BSGridCollectionViewLayout; - target = 8AA3DDB8797222294E1288CB197A8347 /* BSGridCollectionViewLayout */; - targetProxy = F2414A5812BC928C2CD5D28CBBA772EB /* PBXContainerItemProxy */; - }; BE65A667FEE88EA4593A2D51E0DDF237 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "BSImagePicker-BSImagePicker"; target = F7DE5171AA3C53DA4E4A078B795C78EE /* BSImagePicker-BSImagePicker */; targetProxy = C06A237F2852CAE7C244B71783CCAF1C /* PBXContainerItemProxy */; }; - C00AE2AC5930ABD810C90853196C3B70 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = UIImageViewModeScaleAspect; - target = 0FF38C485BD8E73F614C919F834D6EAB /* UIImageViewModeScaleAspect */; - targetProxy = 31F63A2BA4A50E6AE1E1300172FBB772 /* PBXContainerItemProxy */; - }; C766CCCF9F195D700C8CF6432A08DBE3 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = BSImagePicker; @@ -1034,19 +916,15 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_DEBUG=1", @@ -1068,47 +946,10 @@ }; name = Debug; }; - 069A162521039B28DD842ADE055F35B3 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 8CE1505B9ACC808F89909F86443E624E /* Pods-BSImagePicker_UI_Tests.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-BSImagePicker_UI_Tests/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_BSImagePicker_UI_Tests; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; 26BBFC11E2CCC37049071E07EAF08AC4 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8DB53655DBC99BBB84DA627CF342BADC /* Pods-BSImagePicker_Example.release.xcconfig */; + baseConfigurationReference = 0766A8C1A813A168519E3C740BA2374D /* Pods-BSImagePicker_Example.release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -1142,9 +983,8 @@ }; 37EE390B097E8B3060D28DCAF8BC94F7 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E9FE45835EB4258DBE96BD93355CA0D9 /* Pods-BSImagePicker_Tests.debug.xcconfig */; + baseConfigurationReference = 6DCF89096C10A6B767280450B92D4889 /* Pods-BSImagePicker_Tests.debug.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -1177,38 +1017,6 @@ }; name = Debug; }; - 420AC22480E651CF0FAF015BD736F906 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = CD17C3E67EA9C646060DB3181B71C593 /* BSGridCollectionViewLayout.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/BSGridCollectionViewLayout/BSGridCollectionViewLayout-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/BSGridCollectionViewLayout/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/BSGridCollectionViewLayout/BSGridCollectionViewLayout.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = BSGridCollectionViewLayout; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; 443F1C9186292B46442EE0B9FC38D90B /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 6E093FFC1EBDD5C3B80CC346A4863422 /* BSImagePicker.xcconfig */; @@ -1240,18 +1048,14 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_RELEASE=1", "$(inherited)", @@ -1265,7 +1069,6 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SYMROOT = "${SRCROOT}/../build"; VALIDATE_PRODUCT = YES; }; @@ -1288,46 +1091,41 @@ }; name = Debug; }; - 6D5B55F6E8DC58268F4A898CB105B90E /* Debug */ = { + 7717CC519CB2C378D57E6CB00F596804 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F9A4A80B5741D1F14CCE2419957E1BAB /* Pods-BSImagePicker_UI_Tests.debug.xcconfig */; + baseConfigurationReference = 6E093FFC1EBDD5C3B80CC346A4863422 /* BSImagePicker.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-BSImagePicker_UI_Tests/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/BSImagePicker/BSImagePicker-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/BSImagePicker/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_BSImagePicker_UI_Tests; + MODULEMAP_FILE = "Target Support Files/BSImagePicker/BSImagePicker.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = BSImagePicker; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 9CF29E48D31724B7C98F133C1B401999 /* Release */ = { + B79A1EC390A643EE30CBB32E892952AD /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6E093FFC1EBDD5C3B80CC346A4863422 /* BSImagePicker.xcconfig */; + baseConfigurationReference = CD17C3E67EA9C646060DB3181B71C593 /* BSGridCollectionViewLayout.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -1340,24 +1138,24 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/BSImagePicker/BSImagePicker-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/BSImagePicker/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/BSGridCollectionViewLayout/BSGridCollectionViewLayout-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/BSGridCollectionViewLayout/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/BSImagePicker/BSImagePicker.modulemap"; + MODULEMAP_FILE = "Target Support Files/BSGridCollectionViewLayout/BSGridCollectionViewLayout.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = BSImagePicker; + PRODUCT_NAME = BSGridCollectionViewLayout; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - A7246626167643D08EB03BF23807B8DE /* Release */ = { + BD2B49EE90248B5BAAFAA891908F1CD0 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 81D8BA904EA0A7EFD1CCCDBF3F3F7741 /* UIImageViewModeScaleAspect.xcconfig */; buildSettings = { @@ -1382,16 +1180,16 @@ PRODUCT_NAME = UIImageViewModeScaleAspect; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - B6D913C7A9C92857BA97FE16AC1F87DE /* Debug */ = { + C8D3DA6E266D747D63B098673A50C2D6 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6E093FFC1EBDD5C3B80CC346A4863422 /* BSImagePicker.xcconfig */; + baseConfigurationReference = 81D8BA904EA0A7EFD1CCCDBF3F3F7741 /* UIImageViewModeScaleAspect.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -1404,25 +1202,24 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/BSImagePicker/BSImagePicker-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/BSImagePicker/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/UIImageViewModeScaleAspect/UIImageViewModeScaleAspect-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/UIImageViewModeScaleAspect/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/BSImagePicker/BSImagePicker.modulemap"; + MODULEMAP_FILE = "Target Support Files/UIImageViewModeScaleAspect/UIImageViewModeScaleAspect.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = BSImagePicker; + PRODUCT_NAME = UIImageViewModeScaleAspect; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - C6FD33156F542A41153CD7060813D326 /* Debug */ = { + CE45510A7E07AA11A554EE690920F4BD /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = CD17C3E67EA9C646060DB3181B71C593 /* BSGridCollectionViewLayout.xcconfig */; buildSettings = { @@ -1448,89 +1245,84 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - CF83E0B31A02C0BA537ACADBE08C51F1 /* Release */ = { + CF006F7C73CA92FED407B634C8933BCF /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6C89D192BCA67F0A92F3690DA6CFED91 /* Pods-BSImagePicker_Tests.release.xcconfig */; + baseConfigurationReference = 6E093FFC1EBDD5C3B80CC346A4863422 /* BSImagePicker.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-BSImagePicker_Tests/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/BSImagePicker/BSImagePicker-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/BSImagePicker/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-BSImagePicker_Tests/Pods-BSImagePicker_Tests.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_BSImagePicker_Tests; + MODULEMAP_FILE = "Target Support Files/BSImagePicker/BSImagePicker.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = BSImagePicker; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - D1B29D821A28F31C0B19ABAAD4095DB1 /* Debug */ = { + CF83E0B31A02C0BA537ACADBE08C51F1 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7B980AEED84F142C079D139BE5DF7BAE /* Pods-BSImagePicker_Example.debug.xcconfig */; + baseConfigurationReference = 9A936BC895ACB48A04B64BE4915EC567 /* Pods-BSImagePicker_Tests.release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-BSImagePicker_Example/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-BSImagePicker_Tests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-BSImagePicker_Example/Pods-BSImagePicker_Example.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + MODULEMAP_FILE = "Target Support Files/Pods-BSImagePicker_Tests/Pods-BSImagePicker_Tests.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_BSImagePicker_Example; + PRODUCT_NAME = Pods_BSImagePicker_Tests; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - F7DDE511C7A372E12D49F603DE870A11 /* Debug */ = { + D1B29D821A28F31C0B19ABAAD4095DB1 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 81D8BA904EA0A7EFD1CCCDBF3F3F7741 /* UIImageViewModeScaleAspect.xcconfig */; + baseConfigurationReference = 73B339A936AEF160A9419A439D43BE74 /* Pods-BSImagePicker_Example.debug.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -1543,17 +1335,21 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/UIImageViewModeScaleAspect/UIImageViewModeScaleAspect-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/UIImageViewModeScaleAspect/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-BSImagePicker_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/UIImageViewModeScaleAspect/UIImageViewModeScaleAspect.modulemap"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-BSImagePicker_Example/Pods-BSImagePicker_Example.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = UIImageViewModeScaleAspect; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_BSImagePicker_Example; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -1563,15 +1359,6 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 23143EA74D7A47D51F9CE3AE06F77BA6 /* Build configuration list for PBXNativeTarget "Pods-BSImagePicker_UI_Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6D5B55F6E8DC58268F4A898CB105B90E /* Debug */, - 069A162521039B28DD842ADE055F35B3 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -1611,8 +1398,8 @@ 8ABC76132944103AB2F64CC8ACB5E2F6 /* Build configuration list for PBXNativeTarget "BSImagePicker" */ = { isa = XCConfigurationList; buildConfigurations = ( - B6D913C7A9C92857BA97FE16AC1F87DE /* Debug */, - 9CF29E48D31724B7C98F133C1B401999 /* Release */, + CF006F7C73CA92FED407B634C8933BCF /* Debug */, + 7717CC519CB2C378D57E6CB00F596804 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1620,8 +1407,8 @@ 9F1716D804B22F3E073389A93AF3013F /* Build configuration list for PBXNativeTarget "UIImageViewModeScaleAspect" */ = { isa = XCConfigurationList; buildConfigurations = ( - F7DDE511C7A372E12D49F603DE870A11 /* Debug */, - A7246626167643D08EB03BF23807B8DE /* Release */, + C8D3DA6E266D747D63B098673A50C2D6 /* Debug */, + BD2B49EE90248B5BAAFAA891908F1CD0 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1629,8 +1416,8 @@ B63412E7E42A91BBEB478A10316F237E /* Build configuration list for PBXNativeTarget "BSGridCollectionViewLayout" */ = { isa = XCConfigurationList; buildConfigurations = ( - C6FD33156F542A41153CD7060813D326 /* Debug */, - 420AC22480E651CF0FAF015BD736F906 /* Release */, + CE45510A7E07AA11A554EE690920F4BD /* Debug */, + B79A1EC390A643EE30CBB32E892952AD /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Pods/Target Support Files/BSImagePicker/Info.plist b/Example/Pods/Target Support Files/BSImagePicker/Info.plist index e5268496..3e850498 100644 --- a/Example/Pods/Target Support Files/BSImagePicker/Info.plist +++ b/Example/Pods/Target Support Files/BSImagePicker/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.4.0 + 2.5.0 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/BSImagePicker/ResourceBundle-BSImagePicker-Info.plist b/Example/Pods/Target Support Files/BSImagePicker/ResourceBundle-BSImagePicker-Info.plist index 76f452ad..f45b2ecb 100644 --- a/Example/Pods/Target Support Files/BSImagePicker/ResourceBundle-BSImagePicker-Info.plist +++ b/Example/Pods/Target Support Files/BSImagePicker/ResourceBundle-BSImagePicker-Info.plist @@ -13,7 +13,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 2.4.0 + 2.5.0 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Info.plist b/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Info.plist deleted file mode 100644 index 2243fe6e..00000000 --- a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-acknowledgements.markdown deleted file mode 100644 index 81ab9ca5..00000000 --- a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-acknowledgements.markdown +++ /dev/null @@ -1,71 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## BSGridCollectionViewLayout - -Copyright (c) 2015 Joakim Gyllstrom - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -## BSImagePicker - -Copyright (c) 2015 Joakim Gyllstrom - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -## UIImageViewModeScaleAspect - -Copyright (c) 2013 Vivien Cormier (http://www.viviencormier.fr/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-acknowledgements.plist deleted file mode 100644 index 50e77ccd..00000000 --- a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-acknowledgements.plist +++ /dev/null @@ -1,115 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2015 Joakim Gyllstrom <joakim@backslashed.se> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - License - MIT - Title - BSGridCollectionViewLayout - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2015 Joakim Gyllstrom <joakim@backslashed.se> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - License - MIT - Title - BSImagePicker - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2013 Vivien Cormier (http://www.viviencormier.fr/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - License - MIT - Title - UIImageViewModeScaleAspect - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-dummy.m b/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-dummy.m deleted file mode 100644 index 76e7f4b7..00000000 --- a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_BSImagePicker_UI_Tests : NSObject -@end -@implementation PodsDummy_Pods_BSImagePicker_UI_Tests -@end diff --git a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-frameworks.sh b/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-frameworks.sh deleted file mode 100755 index 30388148..00000000 --- a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-frameworks.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/sh -set -e - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" - -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" - fi - - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identitiy - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" - fi -} - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - # Get architectures for current file - archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" - stripped="" - for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" || exit 1 - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi -} - - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/BSGridCollectionViewLayout/BSGridCollectionViewLayout.framework" - install_framework "$BUILT_PRODUCTS_DIR/BSImagePicker/BSImagePicker.framework" - install_framework "$BUILT_PRODUCTS_DIR/UIImageViewModeScaleAspect/UIImageViewModeScaleAspect.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/BSGridCollectionViewLayout/BSGridCollectionViewLayout.framework" - install_framework "$BUILT_PRODUCTS_DIR/BSImagePicker/BSImagePicker.framework" - install_framework "$BUILT_PRODUCTS_DIR/UIImageViewModeScaleAspect/UIImageViewModeScaleAspect.framework" -fi diff --git a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-resources.sh b/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-resources.sh deleted file mode 100755 index 0a156152..00000000 --- a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-resources.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -set -e - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -case "${TARGETED_DEVICE_FAMILY}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -realpath() { - DIRECTORY="$(cd "${1%/*}" && pwd)" - FILENAME="${1##*/}" - echo "$DIRECTORY/$FILENAME" -} - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE=$(realpath "$RESOURCE_PATH") - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "`realpath $PODS_ROOT`*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi diff --git a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-umbrella.h b/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-umbrella.h deleted file mode 100644 index 962e6744..00000000 --- a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests-umbrella.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - - -FOUNDATION_EXPORT double Pods_BSImagePicker_UI_TestsVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_BSImagePicker_UI_TestsVersionString[]; - diff --git a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests.debug.xcconfig deleted file mode 100644 index 323e6d4e..00000000 --- a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests.debug.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/BSGridCollectionViewLayout" "$PODS_CONFIGURATION_BUILD_DIR/BSImagePicker" "$PODS_CONFIGURATION_BUILD_DIR/UIImageViewModeScaleAspect" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/BSGridCollectionViewLayout/BSGridCollectionViewLayout.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/BSImagePicker/BSImagePicker.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/UIImageViewModeScaleAspect/UIImageViewModeScaleAspect.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "BSGridCollectionViewLayout" -framework "BSImagePicker" -framework "UIImageViewModeScaleAspect" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests.modulemap b/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests.modulemap deleted file mode 100644 index 6e0e92b4..00000000 --- a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_BSImagePicker_UI_Tests { - umbrella header "Pods-BSImagePicker_UI_Tests-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests.release.xcconfig deleted file mode 100644 index 323e6d4e..00000000 --- a/Example/Pods/Target Support Files/Pods-BSImagePicker_UI_Tests/Pods-BSImagePicker_UI_Tests.release.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/BSGridCollectionViewLayout" "$PODS_CONFIGURATION_BUILD_DIR/BSImagePicker" "$PODS_CONFIGURATION_BUILD_DIR/UIImageViewModeScaleAspect" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/BSGridCollectionViewLayout/BSGridCollectionViewLayout.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/BSImagePicker/BSImagePicker.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/UIImageViewModeScaleAspect/UIImageViewModeScaleAspect.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "BSGridCollectionViewLayout" -framework "BSImagePicker" -framework "UIImageViewModeScaleAspect" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Tests/CameraDataSourceTests.swift b/Example/Tests/CameraDataSourceTests.swift index 9d800d93..10bee74d 100644 --- a/Example/Tests/CameraDataSourceTests.swift +++ b/Example/Tests/CameraDataSourceTests.swift @@ -26,14 +26,14 @@ import UIKit @testable import BSImagePicker class CameraDataSourceTests: XCTestCase { - let collectionView = UICollectionView(frame: CGRectZero, collectionViewLayout: UICollectionViewFlowLayout()) + let collectionView = UICollectionView(frame: CGRect.zero, collectionViewLayout: UICollectionViewFlowLayout()) func testCameraNotAvailableSettingOn() { let settings = Settings() settings.takePhotos = true let dataSource = CameraCollectionViewDataSource(settings: settings, cameraAvailable: false) - XCTAssert(dataSource.numberOfSectionsInCollectionView(collectionView) == 0) + XCTAssert(dataSource.numberOfSections(in: collectionView) == 0) } func testCameraNotAvailableSettingsOff() { @@ -41,7 +41,7 @@ class CameraDataSourceTests: XCTestCase { settings.takePhotos = false let dataSource = CameraCollectionViewDataSource(settings: settings, cameraAvailable: false) - XCTAssert(dataSource.numberOfSectionsInCollectionView(collectionView) == 0) + XCTAssert(dataSource.numberOfSections(in: collectionView) == 0) } func testCameraAvailableSettingsOn() { @@ -49,7 +49,7 @@ class CameraDataSourceTests: XCTestCase { settings.takePhotos = true let dataSource = CameraCollectionViewDataSource(settings: settings, cameraAvailable: true) - XCTAssert(dataSource.numberOfSectionsInCollectionView(collectionView) == 1) + XCTAssert(dataSource.numberOfSections(in: collectionView) == 1) XCTAssert(dataSource.collectionView(collectionView, numberOfItemsInSection: 0) == 1) } @@ -58,6 +58,6 @@ class CameraDataSourceTests: XCTestCase { settings.takePhotos = false let dataSource = CameraCollectionViewDataSource(settings: settings, cameraAvailable: true) - XCTAssert(dataSource.numberOfSectionsInCollectionView(collectionView) == 0) + XCTAssert(dataSource.numberOfSections(in: collectionView) == 0) } } diff --git a/Example/Tests/ComposedDataSourceTests.swift b/Example/Tests/ComposedDataSourceTests.swift index 32fdf7cb..6e558610 100644 --- a/Example/Tests/ComposedDataSourceTests.swift +++ b/Example/Tests/ComposedDataSourceTests.swift @@ -29,7 +29,7 @@ let secondDataSourceTag = 2 class ComposedDataSourceTest: XCTestCase { var composedDataSource: ComposedCollectionViewDataSource! - let collectionView = UICollectionView(frame: CGRectZero, collectionViewLayout: UICollectionViewFlowLayout()) + let collectionView = UICollectionView(frame: CGRect.zero, collectionViewLayout: UICollectionViewFlowLayout()) override func setUp() { super.setUp() @@ -38,15 +38,15 @@ class ComposedDataSourceTest: XCTestCase { } func testNoDataSourcesSectionCount() { - XCTAssert(ComposedCollectionViewDataSource(dataSources: []).numberOfSectionsInCollectionView(collectionView) == 0) + XCTAssert(ComposedCollectionViewDataSource(dataSources: []).numberOfSections(in: collectionView) == 0) } func testOneDataSourceSectionCount() { - XCTAssert(ComposedCollectionViewDataSource(dataSources: [FirstDataSource()]).numberOfSectionsInCollectionView(collectionView) == 1) + XCTAssert(ComposedCollectionViewDataSource(dataSources: [FirstDataSource()]).numberOfSections(in: collectionView) == 1) } func testTwoDataSourcesSectionCount() { - XCTAssert(composedDataSource.numberOfSectionsInCollectionView(collectionView) == 2) + XCTAssert(composedDataSource.numberOfSections(in: collectionView) == 2) } func testFirstSectionItemCount() { @@ -58,23 +58,23 @@ class ComposedDataSourceTest: XCTestCase { } func testFirstSectionCell() { - XCTAssert(composedDataSource.collectionView(collectionView, cellForItemAtIndexPath: NSIndexPath(forItem: 0, inSection: 0)).tag == firstDataSourceTag) - XCTAssert(composedDataSource.collectionView(collectionView, cellForItemAtIndexPath: NSIndexPath(forItem: 1, inSection: 0)).tag == firstDataSourceTag) + XCTAssert(composedDataSource.collectionView(collectionView, cellForItemAt: IndexPath(item: 0, section: 0)).tag == firstDataSourceTag) + XCTAssert(composedDataSource.collectionView(collectionView, cellForItemAt: IndexPath(item: 1, section: 0)).tag == firstDataSourceTag) } func testSecondSectionCell() { - XCTAssert(composedDataSource.collectionView(collectionView, cellForItemAtIndexPath: NSIndexPath(forItem: 0, inSection: 1)).tag == secondDataSourceTag) - XCTAssert(composedDataSource.collectionView(collectionView, cellForItemAtIndexPath: NSIndexPath(forItem: 1, inSection: 1)).tag == secondDataSourceTag) - XCTAssert(composedDataSource.collectionView(collectionView, cellForItemAtIndexPath: NSIndexPath(forItem: 2, inSection: 1)).tag == secondDataSourceTag) + XCTAssert(composedDataSource.collectionView(collectionView, cellForItemAt: IndexPath(item: 0, section: 1)).tag == secondDataSourceTag) + XCTAssert(composedDataSource.collectionView(collectionView, cellForItemAt: IndexPath(item: 1, section: 1)).tag == secondDataSourceTag) + XCTAssert(composedDataSource.collectionView(collectionView, cellForItemAt: IndexPath(item: 2, section: 1)).tag == secondDataSourceTag) } } class FirstDataSource: NSObject, UICollectionViewDataSource { - func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return 2 } - func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = UICollectionViewCell() cell.tag = firstDataSourceTag @@ -83,11 +83,11 @@ class FirstDataSource: NSObject, UICollectionViewDataSource { } class SecondDataSource: NSObject, UICollectionViewDataSource { - func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return 3 } - func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = UICollectionViewCell() cell.tag = secondDataSourceTag diff --git a/Example/Tests/NSIndexSetIndexPathTests.swift b/Example/Tests/NSIndexSetIndexPathTests.swift index ba558858..28fd310c 100644 --- a/Example/Tests/NSIndexSetIndexPathTests.swift +++ b/Example/Tests/NSIndexSetIndexPathTests.swift @@ -26,18 +26,18 @@ import Foundation class NSIndexSetIndexPathTests: XCTestCase { func testEmptySet() { - let set = NSIndexSet() + let set = IndexSet() XCTAssert(set.bs_indexPathsForSection(0).count == 0) } func testContinuousSet() { - let range = NSMakeRange(2, 2) - let set = NSIndexSet(indexesInRange: range) + let range = 2..<4 + let set = IndexSet(integersIn: range) let expectedIndexPaths = [ - NSIndexPath(forItem: 2, inSection: 0), - NSIndexPath(forItem: 3, inSection: 0) + IndexPath(item: 2, section: 0), + IndexPath(item: 3, section: 0) ] let actualIndexPaths = set.bs_indexPathsForSection(0) @@ -46,15 +46,15 @@ class NSIndexSetIndexPathTests: XCTestCase { } func testDiscontinuousSet() { - let set = NSMutableIndexSet() - set.addIndex(3) - set.addIndex(5) - set.addIndex(12) + var set = IndexSet() + set.insert(3) + set.insert(5) + set.insert(12) let expectedIndexPaths = [ - NSIndexPath(forItem: 3, inSection: 3), - NSIndexPath(forItem: 5, inSection: 3), - NSIndexPath(forItem: 12, inSection: 3) + IndexPath(item: 3, section: 3), + IndexPath(item: 5, section: 3), + IndexPath(item: 12, section: 3) ] let actualIndexPaths = set.bs_indexPathsForSection(3) diff --git a/Pod/Classes/Controller/AlbumsViewController.swift b/Pod/Classes/Controller/AlbumsViewController.swift index 29d0f181..8be6ab39 100644 --- a/Pod/Classes/Controller/AlbumsViewController.swift +++ b/Pod/Classes/Controller/AlbumsViewController.swift @@ -27,13 +27,13 @@ final class AlbumsViewController: UITableViewController { super.loadView() // Add a little bit of blur to the background - let visualEffectView = UIVisualEffectView(effect: UIVibrancyEffect(forBlurEffect: UIBlurEffect(style: .Light))) + let visualEffectView = UIVisualEffectView(effect: UIVibrancyEffect(blurEffect: UIBlurEffect(style: .light))) visualEffectView.frame = tableView.bounds - visualEffectView.autoresizingMask = [.FlexibleWidth , .FlexibleHeight] + visualEffectView.autoresizingMask = [.flexibleWidth , .flexibleHeight] tableView.backgroundView = visualEffectView - tableView.backgroundColor = UIColor.clearColor() + tableView.backgroundColor = UIColor.clear - modalPresentationStyle = .Popover + modalPresentationStyle = .popover preferredContentSize = CGSize(width: 320, height: 300) } } diff --git a/Pod/Classes/Controller/BSImagePickerViewController.swift b/Pod/Classes/Controller/BSImagePickerViewController.swift index 91e6acf7..e29c6ebb 100644 --- a/Pod/Classes/Controller/BSImagePickerViewController.swift +++ b/Pod/Classes/Controller/BSImagePickerViewController.swift @@ -27,46 +27,45 @@ import Photos BSImagePickerViewController. Use settings or buttons to customize it to your needs. */ -public class BSImagePickerViewController : UINavigationController { +open class BSImagePickerViewController : UINavigationController { /** Object that keeps settings for the picker. */ - public var settings: BSImagePickerSettings = Settings() + open var settings: BSImagePickerSettings = Settings() /** Done button. */ - public var doneButton: UIBarButtonItem = UIBarButtonItem(barButtonSystemItem: .Done, target: nil, action: nil) + open var doneButton: UIBarButtonItem = UIBarButtonItem(barButtonSystemItem: .done, target: nil, action: nil) /** Cancel button */ - public var cancelButton: UIBarButtonItem = UIBarButtonItem(barButtonSystemItem: .Cancel, target: nil, action: nil) + open var cancelButton: UIBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: nil, action: nil) /** Default selections */ - public var defaultSelections: PHFetchResult? + private var defaultSelections: PHFetchResult? /** Fetch results. */ - public lazy var fetchResults: [PHFetchResult] = { + private lazy var fetchResults: [PHFetchResult] = { () -> [PHFetchResult] in let fetchOptions = PHFetchOptions() // Camera roll fetch result - let cameraRollResult = PHAssetCollection.fetchAssetCollectionsWithType(.SmartAlbum, subtype: .SmartAlbumUserLibrary, options: fetchOptions) + let cameraRollResult = PHAssetCollection.fetchAssetCollections(with: .smartAlbum, subtype: .smartAlbumUserLibrary, options: fetchOptions) // Albums fetch result - let albumResult = PHAssetCollection.fetchAssetCollectionsWithType(.Album, subtype: .Any, options: fetchOptions) + let albumResult = PHAssetCollection.fetchAssetCollections(with: .album, subtype: .any, options: fetchOptions) return [cameraRollResult, albumResult] }() - var albumTitleView: AlbumTitleView = bundle.loadNibNamed("AlbumTitleView", owner: nil, options: nil)!.first as! AlbumTitleView - static let bundle: NSBundle = NSBundle(path: NSBundle(forClass: PhotosViewController.self).pathForResource("BSImagePicker", ofType: "bundle")!)! + static let bundle: Bundle = Bundle(path: Bundle(for: PhotosViewController.self).path(forResource: "BSImagePicker", ofType: "bundle")!)! lazy var photosViewController: PhotosViewController = { let vc = PhotosViewController(fetchResults: self.fetchResults, @@ -80,21 +79,21 @@ public class BSImagePickerViewController : UINavigationController { return vc }() - class func authorize(status: PHAuthorizationStatus = PHPhotoLibrary.authorizationStatus(), fromViewController: UIViewController, completion: (authorized: Bool) -> Void) { + class func authorize(_ status: PHAuthorizationStatus = PHPhotoLibrary.authorizationStatus(), fromViewController: UIViewController, completion: @escaping (_ authorized: Bool) -> Void) { switch status { - case .Authorized: + case .authorized: // We are authorized. Run block - completion(authorized: true) - case .NotDetermined: + completion(true) + case .notDetermined: // Ask user for permission PHPhotoLibrary.requestAuthorization({ (status) -> Void in - dispatch_async(dispatch_get_main_queue(), { () -> Void in + DispatchQueue.main.async(execute: { () -> Void in self.authorize(status, fromViewController: fromViewController, completion: completion) }) }) default: () - dispatch_async(dispatch_get_main_queue(), { () -> Void in - completion(authorized: false) + DispatchQueue.main.async(execute: { () -> Void in + completion(false) }) } } @@ -116,14 +115,14 @@ public class BSImagePickerViewController : UINavigationController { /** Load view. See apple documentation */ - public override func loadView() { + open override func loadView() { super.loadView() // TODO: Settings - view.backgroundColor = UIColor.whiteColor() + view.backgroundColor = UIColor.white // Make sure we really are authorized - if PHPhotoLibrary.authorizationStatus() == .Authorized { + if PHPhotoLibrary.authorizationStatus() == .authorized { setViewControllers([photosViewController], animated: false) } } @@ -206,7 +205,7 @@ extension BSImagePickerViewController: BSImagePickerSettings { /** See BSImagePicketSettings for documentation */ - public var cellsPerRow: (verticalSize: UIUserInterfaceSizeClass, horizontalSize: UIUserInterfaceSizeClass) -> Int { + public var cellsPerRow: (_ verticalSize: UIUserInterfaceSizeClass, _ horizontalSize: UIUserInterfaceSizeClass) -> Int { get { return settings.cellsPerRow } diff --git a/Pod/Classes/Controller/PhotosViewController.swift b/Pod/Classes/Controller/PhotosViewController.swift index 42cc3ccc..dd4a81f4 100644 --- a/Pod/Classes/Controller/PhotosViewController.swift +++ b/Pod/Classes/Controller/PhotosViewController.swift @@ -23,12 +23,32 @@ import UIKit import Photos import BSGridCollectionViewLayout +fileprivate func < (lhs: T?, rhs: T?) -> Bool { + switch (lhs, rhs) { + case let (l?, r?): + return l < r + case (nil, _?): + return true + default: + return false + } +} + +fileprivate func > (lhs: T?, rhs: T?) -> Bool { + switch (lhs, rhs) { + case let (l?, r?): + return l > r + default: + return rhs < lhs + } +} + final class PhotosViewController : UICollectionViewController { - var selectionClosure: ((asset: PHAsset) -> Void)? - var deselectionClosure: ((asset: PHAsset) -> Void)? - var cancelClosure: ((assets: [PHAsset]) -> Void)? - var finishClosure: ((assets: [PHAsset]) -> Void)? + var selectionClosure: ((_ asset: PHAsset) -> Void)? + var deselectionClosure: ((_ asset: PHAsset) -> Void)? + var cancelClosure: ((_ assets: [PHAsset]) -> Void)? + var finishClosure: ((_ assets: [PHAsset]) -> Void)? var doneBarButton: UIBarButtonItem? var cancelBarButton: UIBarButtonItem? @@ -37,16 +57,16 @@ final class PhotosViewController : UICollectionViewController { let expandAnimator = ZoomAnimator() let shrinkAnimator = ZoomAnimator() - private var photosDataSource: PhotoCollectionViewDataSource? - private var albumsDataSource: AlbumTableViewDataSource - private let cameraDataSource: CameraCollectionViewDataSource - private var composedDataSource: ComposedCollectionViewDataSource? + fileprivate var photosDataSource: PhotoCollectionViewDataSource? + fileprivate var albumsDataSource: AlbumTableViewDataSource + fileprivate let cameraDataSource: CameraCollectionViewDataSource + fileprivate var composedDataSource: ComposedCollectionViewDataSource? - private var defaultSelections: PHFetchResult? + fileprivate var defaultSelections: PHFetchResult? let settings: BSImagePickerSettings - private var doneBarButtonTitle: String? + fileprivate var doneBarButtonTitle: String? lazy var albumsViewController: AlbumsViewController = { let storyboard = UIStoryboard(name: "Albums", bundle: BSImagePickerViewController.bundle) @@ -57,19 +77,19 @@ final class PhotosViewController : UICollectionViewController { return vc }() - private lazy var previewViewContoller: PreviewViewController? = { + fileprivate lazy var previewViewContoller: PreviewViewController? = { return PreviewViewController(nibName: nil, bundle: nil) }() - required init(fetchResults: [PHFetchResult], defaultSelections: PHFetchResult? = nil, settings aSettings: BSImagePickerSettings) { + required init(fetchResults: [PHFetchResult], defaultSelections: PHFetchResult? = nil, settings aSettings: BSImagePickerSettings) { albumsDataSource = AlbumTableViewDataSource(fetchResults: fetchResults) - cameraDataSource = CameraCollectionViewDataSource(settings: aSettings, cameraAvailable: UIImagePickerController.isSourceTypeAvailable(.Camera)) + cameraDataSource = CameraCollectionViewDataSource(settings: aSettings, cameraAvailable: UIImagePickerController.isSourceTypeAvailable(.camera)) self.defaultSelections = defaultSelections settings = aSettings super.init(collectionViewLayout: GridCollectionViewLayout()) - PHPhotoLibrary.sharedPhotoLibrary().registerChangeObserver(self) + PHPhotoLibrary.shared().register(self) } required init?(coder aDecoder: NSCoder) { @@ -77,14 +97,14 @@ final class PhotosViewController : UICollectionViewController { } deinit { - PHPhotoLibrary.sharedPhotoLibrary().unregisterChangeObserver(self) + PHPhotoLibrary.shared().unregisterChangeObserver(self) } override func loadView() { super.loadView() // Setup collection view - collectionView?.backgroundColor = UIColor.whiteColor() + collectionView?.backgroundColor = UIColor.white collectionView?.allowsMultipleSelection = true // Set an empty title to get < back button @@ -95,15 +115,15 @@ final class PhotosViewController : UICollectionViewController { doneBarButton?.action = #selector(PhotosViewController.doneButtonPressed(_:)) cancelBarButton?.target = self cancelBarButton?.action = #selector(PhotosViewController.cancelButtonPressed(_:)) - albumTitleView?.albumButton?.addTarget(self, action: #selector(PhotosViewController.albumButtonPressed(_:)), forControlEvents: .TouchUpInside) + albumTitleView?.albumButton?.addTarget(self, action: #selector(PhotosViewController.albumButtonPressed(_:)), for: .touchUpInside) navigationItem.leftBarButtonItem = cancelBarButton navigationItem.rightBarButtonItem = doneBarButton navigationItem.titleView = albumTitleView - if let album = albumsDataSource.fetchResults.first?.firstObject as? PHAssetCollection { + if let album = albumsDataSource.fetchResults.first?.firstObject { initializePhotosDataSource(album, selections: defaultSelections) updateAlbumTitle(album) - synchronizeCollectionView() + collectionView?.reloadData() } // Add long press recognizer @@ -120,73 +140,72 @@ final class PhotosViewController : UICollectionViewController { } // MARK: Appear/Disappear - override func viewWillAppear(animated: Bool) { + override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) updateDoneButton() } // MARK: Button actions - func cancelButtonPressed(sender: UIBarButtonItem) { + func cancelButtonPressed(_ sender: UIBarButtonItem) { guard let closure = cancelClosure, let photosDataSource = photosDataSource else { - dismissViewControllerAnimated(true, completion: nil) + dismiss(animated: true, completion: nil) return } + DispatchQueue.global().async { + closure(photosDataSource.selections) + } - dispatch_async(dispatch_get_global_queue(0, 0), { () -> Void in - closure(assets: photosDataSource.selections) - }) - - dismissViewControllerAnimated(true, completion: nil) + dismiss(animated: true, completion: nil) } - func doneButtonPressed(sender: UIBarButtonItem) { + func doneButtonPressed(_ sender: UIBarButtonItem) { guard let closure = finishClosure, let photosDataSource = photosDataSource else { - dismissViewControllerAnimated(true, completion: nil) + dismiss(animated: true, completion: nil) return } - dispatch_async(dispatch_get_global_queue(0, 0), { () -> Void in - closure(assets: photosDataSource.selections) - }) + DispatchQueue.global().async { + closure(photosDataSource.selections) + } - dismissViewControllerAnimated(true, completion: nil) + dismiss(animated: true, completion: nil) } - func albumButtonPressed(sender: UIButton) { + func albumButtonPressed(_ sender: UIButton) { guard let popVC = albumsViewController.popoverPresentationController else { return } - popVC.permittedArrowDirections = .Up + popVC.permittedArrowDirections = .up popVC.sourceView = sender - let senderRect = sender.convertRect(sender.frame, fromView: sender.superview) + let senderRect = sender.convert(sender.frame, from: sender.superview) let sourceRect = CGRect(x: senderRect.origin.x, y: senderRect.origin.y + (sender.frame.size.height / 2), width: senderRect.size.width, height: senderRect.size.height) popVC.sourceRect = sourceRect popVC.delegate = self albumsViewController.tableView.reloadData() - presentViewController(albumsViewController, animated: true, completion: nil) + present(albumsViewController, animated: true, completion: nil) } - func collectionViewLongPressed(sender: UIGestureRecognizer) { - if sender.state == .Began { + func collectionViewLongPressed(_ sender: UIGestureRecognizer) { + if sender.state == .began { // Disable recognizer while we are figuring out location and pushing preview - sender.enabled = false - collectionView?.userInteractionEnabled = false + sender.isEnabled = false + collectionView?.isUserInteractionEnabled = false // Calculate which index path long press came from - let location = sender.locationInView(collectionView) - let indexPath = collectionView?.indexPathForItemAtPoint(location) + let location = sender.location(in: collectionView) + let indexPath = collectionView?.indexPathForItem(at: location) - if let vc = previewViewContoller, let indexPath = indexPath, let cell = collectionView?.cellForItemAtIndexPath(indexPath) as? PhotoCell, let asset = cell.asset { + if let vc = previewViewContoller, let indexPath = indexPath, let cell = collectionView?.cellForItem(at: indexPath) as? PhotoCell, let asset = cell.asset { // Setup fetch options to be synchronous let options = PHImageRequestOptions() - options.synchronous = true + options.isSynchronous = true // Load image for preview if let imageView = vc.imageView { - PHCachingImageManager.defaultManager().requestImageForAsset(asset, targetSize:imageView.frame.size, contentMode: .AspectFit, options: options) { (result, _) in + PHCachingImageManager.default().requestImage(for: asset, targetSize:imageView.frame.size, contentMode: .aspectFit, options: options) { (result, _) in imageView.image = result } } @@ -201,9 +220,9 @@ final class PhotosViewController : UICollectionViewController { } // Re-enable recognizer, after animation is done - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(expandAnimator.transitionDuration(nil) * Double(NSEC_PER_SEC))), dispatch_get_main_queue(), { () -> Void in - sender.enabled = true - self.collectionView?.userInteractionEnabled = true + DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(expandAnimator.transitionDuration(using: nil) * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC), execute: { () -> Void in + sender.isEnabled = true + self.collectionView?.isUserInteractionEnabled = true }) } } @@ -213,10 +232,10 @@ final class PhotosViewController : UICollectionViewController { // Find right button if let subViews = navigationController?.navigationBar.subviews, let photosDataSource = photosDataSource { for view in subViews { - if let btn = view as? UIButton where checkIfRightButtonItem(btn) { + if let btn = view as? UIButton , checkIfRightButtonItem(btn) { // Store original title if we havn't got it if doneBarButtonTitle == nil { - doneBarButtonTitle = btn.titleForState(.Normal) + doneBarButtonTitle = btn.title(for: UIControlState()) } // Update title @@ -224,15 +243,15 @@ final class PhotosViewController : UICollectionViewController { // Special case if we have selected 1 image and that is // the max number of allowed selections if (photosDataSource.selections.count == 1 && self.settings.maxNumberOfSelections == 1) { - btn.bs_setTitleWithoutAnimation("\(doneBarButtonTitle)", forState: .Normal) + btn.bs_setTitleWithoutAnimation("\(doneBarButtonTitle)", forState: UIControlState()) } else if photosDataSource.selections.count > 0 { - btn.bs_setTitleWithoutAnimation("\(doneBarButtonTitle) (\(photosDataSource.selections.count))", forState: .Normal) + btn.bs_setTitleWithoutAnimation("\(doneBarButtonTitle) (\(photosDataSource.selections.count))", forState: UIControlState()) } else { - btn.bs_setTitleWithoutAnimation(doneBarButtonTitle, forState: .Normal) + btn.bs_setTitleWithoutAnimation(doneBarButtonTitle, forState: UIControlState()) } // Enabled? - doneBarButton?.enabled = photosDataSource.selections.count > 0 + doneBarButton?.isEnabled = photosDataSource.selections.count > 0 } // Stop loop @@ -244,71 +263,48 @@ final class PhotosViewController : UICollectionViewController { // Check if a give UIButton is the right UIBarButtonItem in the navigation bar // Somewhere along the road, our UIBarButtonItem gets transformed to an UINavigationButton - func checkIfRightButtonItem(btn: UIButton) -> Bool { + func checkIfRightButtonItem(_ btn: UIButton) -> Bool { guard let rightButton = navigationItem.rightBarButtonItem else { return false } // Store previous values - let wasRightEnabled = rightButton.enabled - let wasButtonEnabled = btn.enabled + let wasRightEnabled = rightButton.isEnabled + let wasButtonEnabled = btn.isEnabled // Set a known state for both buttons - rightButton.enabled = false - btn.enabled = false + rightButton.isEnabled = false + btn.isEnabled = false // Change one and see if other also changes - rightButton.enabled = true - let isRightButton = btn.enabled + rightButton.isEnabled = true + let isRightButton = btn.isEnabled // Reset - rightButton.enabled = wasRightEnabled - btn.enabled = wasButtonEnabled + rightButton.isEnabled = wasRightEnabled + btn.isEnabled = wasButtonEnabled return isRightButton } - func synchronizeSelectionInCollectionView(collectionView: UICollectionView) { - guard let photosDataSource = photosDataSource else { - return - } - - // Get indexes of the selected assets - let mutableIndexSet = NSMutableIndexSet() - for object in photosDataSource.selections { - let index = photosDataSource.fetchResult.indexOfObject(object) - if index != NSNotFound { - mutableIndexSet.addIndex(index) - } - } - - // Convert into index paths - let indexPaths = mutableIndexSet.bs_indexPathsForSection(1) - - // Loop through them and set them as selected in the collection view - for indexPath in indexPaths { - collectionView.selectItemAtIndexPath(indexPath, animated: false, scrollPosition: .None) - } - } - - func updateAlbumTitle(album: PHAssetCollection) { + func updateAlbumTitle(_ album: PHAssetCollection) { if let title = album.localizedTitle { // Update album title albumTitleView?.albumTitle = title } } - func initializePhotosDataSource(album: PHAssetCollection, selections: PHFetchResult? = nil) { + func initializePhotosDataSource(_ album: PHAssetCollection, selections: PHFetchResult? = nil) { // Set up a photo data source with album let fetchOptions = PHFetchOptions() fetchOptions.sortDescriptors = [ NSSortDescriptor(key: "creationDate", ascending: false) ] - fetchOptions.predicate = NSPredicate(format: "mediaType = %d", PHAssetMediaType.Image.rawValue) - initializePhotosDataSourceWithFetchResult(PHAsset.fetchAssetsInAssetCollection(album, options: fetchOptions), selections: selections) + fetchOptions.predicate = NSPredicate(format: "mediaType = %d", PHAssetMediaType.image.rawValue) + initializePhotosDataSourceWithFetchResult(PHAsset.fetchAssets(in: album, options: fetchOptions), selections: selections) } - func initializePhotosDataSourceWithFetchResult(fetchResult: PHFetchResult, selections: PHFetchResult? = nil) { + func initializePhotosDataSourceWithFetchResult(_ fetchResult: PHFetchResult, selections: PHFetchResult? = nil) { let newDataSource = PhotoCollectionViewDataSource(fetchResult: fetchResult, selections: selections, settings: settings) // Transfer image size @@ -325,90 +321,89 @@ final class PhotosViewController : UICollectionViewController { collectionView?.dataSource = composedDataSource collectionView?.delegate = self } - - func synchronizeCollectionView() { - guard let collectionView = collectionView else { - return - } - - // Reload and sync selections - collectionView.reloadData() - synchronizeSelectionInCollectionView(collectionView) - } } // MARK: UICollectionViewDelegate extension PhotosViewController { - override func collectionView(collectionView: UICollectionView, shouldSelectItemAtIndexPath indexPath: NSIndexPath) -> Bool { + override func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool { + // NOTE: ALWAYS return false. We don't want the collectionView to be the source of thruth regarding selections + // We can manage it ourself. + // Camera shouldn't be selected, but pop the UIImagePickerController! - if let composedDataSource = composedDataSource where composedDataSource.dataSources[indexPath.section].isEqual(cameraDataSource) { + if let composedDataSource = composedDataSource , composedDataSource.dataSources[indexPath.section].isEqual(cameraDataSource) { let cameraController = UIImagePickerController() cameraController.allowsEditing = false - cameraController.sourceType = .Camera + cameraController.sourceType = .camera cameraController.delegate = self - self.presentViewController(cameraController, animated: true, completion: nil) + self.present(cameraController, animated: true, completion: nil) return false } - - return collectionView.userInteractionEnabled && photosDataSource!.selections.count < settings.maxNumberOfSelections - } - - override func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) { - guard let photosDataSource = photosDataSource, let cell = collectionView.cellForItemAtIndexPath(indexPath) as? PhotoCell, let asset = photosDataSource.fetchResult.objectAtIndex(indexPath.row) as? PHAsset else { - return - } - - // Select asset if not already selected - photosDataSource.selections.append(asset) - - // Set selection number - if let selectionCharacter = settings.selectionCharacter { - cell.selectionString = String(selectionCharacter) - } else { - cell.selectionString = String(photosDataSource.selections.count) - } - - // Update done button - updateDoneButton() - - // Call selection closure - if let closure = selectionClosure { - dispatch_async(dispatch_get_global_queue(0, 0), { () -> Void in - closure(asset: asset) + + // Make sure we have a data source and that we can make selections + guard let photosDataSource = photosDataSource, collectionView.isUserInteractionEnabled && photosDataSource.selections.count < settings.maxNumberOfSelections else { return false } + + // We need a cell + guard let cell = collectionView.cellForItem(at: indexPath) as? PhotoCell else { return false } + let asset = photosDataSource.fetchResult.object(at: indexPath.row) + + // Select or deselect? + if let index = photosDataSource.selections.index(of: asset) { // Deselect + // Deselect asset + photosDataSource.selections.remove(at: index) + + // Update done button + updateDoneButton() + + // Get indexPaths of selected items + let selectedIndexPaths = photosDataSource.selections.flatMap({ (asset) -> IndexPath? in + let index = photosDataSource.fetchResult.index(of: asset) + guard index != NSNotFound else { return nil } + return IndexPath(item: index, section: 1) }) - } - } - - override func collectionView(collectionView: UICollectionView, didDeselectItemAtIndexPath indexPath: NSIndexPath) { - guard let photosDataSource = photosDataSource, let asset = photosDataSource.fetchResult.objectAtIndex(indexPath.row) as? PHAsset, let index = photosDataSource.selections.indexOf(asset) else { - return - } - - // Deselect asset - photosDataSource.selections.removeAtIndex(index) - - // Update done button - updateDoneButton() - - // Reload selected cells to update their selection number - if let selectedIndexPaths = collectionView.indexPathsForSelectedItems() { + + // Reload selected cells to update their selection number UIView.setAnimationsEnabled(false) - collectionView.reloadItemsAtIndexPaths(selectedIndexPaths) - synchronizeSelectionInCollectionView(collectionView) + collectionView.reloadItems(at: selectedIndexPaths) UIView.setAnimationsEnabled(true) + + cell.photoSelected = false + + // Call deselection closure + if let closure = deselectionClosure { + DispatchQueue.global().async { + closure(asset) + } + } + } else { // Select + // Select asset if not already selected + photosDataSource.selections.append(asset) + + // Set selection number + if let selectionCharacter = settings.selectionCharacter { + cell.selectionString = String(selectionCharacter) + } else { + cell.selectionString = String(photosDataSource.selections.count) + } + + cell.photoSelected = true + + // Update done button + updateDoneButton() + + // Call selection closure + if let closure = selectionClosure { + DispatchQueue.global().async { + closure(asset) + } + } } - - // Call deselection closure - if let closure = deselectionClosure { - dispatch_async(dispatch_get_global_queue(0, 0), { () -> Void in - closure(asset: asset) - }) - } + + return false } - override func collectionView(collectionView: UICollectionView, willDisplayCell cell: UICollectionViewCell, forItemAtIndexPath indexPath: NSIndexPath) { + override func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) { guard let cell = cell as? CameraCell else { return } @@ -419,18 +414,18 @@ extension PhotosViewController { // MARK: UIPopoverPresentationControllerDelegate extension PhotosViewController: UIPopoverPresentationControllerDelegate { - func adaptivePresentationStyleForPresentationController(controller: UIPresentationController) -> UIModalPresentationStyle { - return .None + func adaptivePresentationStyle(for controller: UIPresentationController) -> UIModalPresentationStyle { + return .none } - func popoverPresentationControllerShouldDismissPopover(popoverPresentationController: UIPopoverPresentationController) -> Bool { + func popoverPresentationControllerShouldDismissPopover(_ popoverPresentationController: UIPopoverPresentationController) -> Bool { return true } } // MARK: UINavigationControllerDelegate extension PhotosViewController: UINavigationControllerDelegate { - func navigationController(navigationController: UINavigationController, animationControllerForOperation operation: UINavigationControllerOperation, fromViewController fromVC: UIViewController, toViewController toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? { - if operation == .Push { + func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationControllerOperation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? { + if operation == .push { return expandAnimator } else { return shrinkAnimator @@ -440,27 +435,26 @@ extension PhotosViewController: UINavigationControllerDelegate { // MARK: UITableViewDelegate extension PhotosViewController: UITableViewDelegate { - func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { // Update photos data source - if let album = albumsDataSource.fetchResults[indexPath.section][indexPath.row] as? PHAssetCollection { - initializePhotosDataSource(album) - updateAlbumTitle(album) - synchronizeCollectionView() - } + let album = albumsDataSource.fetchResults[indexPath.section][indexPath.row] + initializePhotosDataSource(album) + updateAlbumTitle(album) + collectionView?.reloadData() // Dismiss album selection - albumsViewController.dismissViewControllerAnimated(true, completion: nil) + albumsViewController.dismiss(animated: true, completion: nil) } } // MARK: Traits extension PhotosViewController { - override func traitCollectionDidChange(previousTraitCollection: UITraitCollection?) { + override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { super.traitCollectionDidChange(previousTraitCollection) if let collectionViewFlowLayout = collectionViewLayout as? GridCollectionViewLayout { let itemSpacing: CGFloat = 2.0 - let cellsPerRow = settings.cellsPerRow(verticalSize: traitCollection.verticalSizeClass, horizontalSize: traitCollection.horizontalSizeClass) + let cellsPerRow = settings.cellsPerRow(traitCollection.verticalSizeClass, traitCollection.horizontalSizeClass) collectionViewFlowLayout.itemSpacing = itemSpacing collectionViewFlowLayout.itemsPerRow = cellsPerRow @@ -474,65 +468,65 @@ extension PhotosViewController { // MARK: UIImagePickerControllerDelegate extension PhotosViewController: UIImagePickerControllerDelegate { - func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) { + func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) { guard let image = info[UIImagePickerControllerOriginalImage] as? UIImage else { - picker.dismissViewControllerAnimated(true, completion: nil) + picker.dismiss(animated: true, completion: nil) return } var placeholder: PHObjectPlaceholder? - PHPhotoLibrary.sharedPhotoLibrary().performChanges({ - let request = PHAssetChangeRequest.creationRequestForAssetFromImage(image) + PHPhotoLibrary.shared().performChanges({ + let request = PHAssetChangeRequest.creationRequestForAsset(from: image) placeholder = request.placeholderForCreatedAsset }, completionHandler: { success, error in - guard let placeholder = placeholder, let asset = PHAsset.fetchAssetsWithLocalIdentifiers([placeholder.localIdentifier], options: nil).firstObject as? PHAsset where success == true else { - picker.dismissViewControllerAnimated(true, completion: nil) + guard let placeholder = placeholder, let asset = PHAsset.fetchAssets(withLocalIdentifiers: [placeholder.localIdentifier], options: nil).firstObject, success == true else { + picker.dismiss(animated: true, completion: nil) return } - dispatch_async(dispatch_get_main_queue()) { + DispatchQueue.main.async { // TODO: move to a function. this is duplicated in didSelect self.photosDataSource?.selections.append(asset) self.updateDoneButton() // Call selection closure if let closure = self.selectionClosure { - dispatch_async(dispatch_get_global_queue(0, 0), { () -> Void in - closure(asset: asset) - }) + DispatchQueue.global().async { + closure(asset) + } } - picker.dismissViewControllerAnimated(true, completion: nil) + picker.dismiss(animated: true, completion: nil) } }) } - func imagePickerControllerDidCancel(picker: UIImagePickerController) { - picker.dismissViewControllerAnimated(true, completion: nil) + func imagePickerControllerDidCancel(_ picker: UIImagePickerController) { + picker.dismiss(animated: true, completion: nil) } } // MARK: PHPhotoLibraryChangeObserver extension PhotosViewController: PHPhotoLibraryChangeObserver { - func photoLibraryDidChange(changeInstance: PHChange) { + func photoLibraryDidChange(_ changeInstance: PHChange) { guard let photosDataSource = photosDataSource, let collectionView = collectionView else { return } - dispatch_async(dispatch_get_main_queue(), { () -> Void in - if let photosChanges = changeInstance.changeDetailsForFetchResult(photosDataSource.fetchResult) { + DispatchQueue.main.async(execute: { () -> Void in + if let photosChanges = changeInstance.changeDetails(for: photosDataSource.fetchResult as! PHFetchResult) { // Update collection view // Alright...we get spammed with change notifications, even when there are none. So guard against it if photosChanges.hasIncrementalChanges && (photosChanges.removedIndexes?.count > 0 || photosChanges.insertedIndexes?.count > 0 || photosChanges.changedIndexes?.count > 0) { // Update fetch result - photosDataSource.fetchResult = photosChanges.fetchResultAfterChanges + photosDataSource.fetchResult = photosChanges.fetchResultAfterChanges as! PHFetchResult if let removed = photosChanges.removedIndexes { - collectionView.deleteItemsAtIndexPaths(removed.bs_indexPathsForSection(1)) + collectionView.deleteItems(at: removed.bs_indexPathsForSection(1)) } if let inserted = photosChanges.insertedIndexes { - collectionView.insertItemsAtIndexPaths(inserted.bs_indexPathsForSection(1)) + collectionView.insertItems(at: inserted.bs_indexPathsForSection(1)) } // Changes is causing issues right now...fix me later @@ -547,16 +541,16 @@ extension PhotosViewController: PHPhotoLibraryChangeObserver { // collectionView.reloadItemsAtIndexPaths(changed.bs_indexPathsForSection(1)) // } - // Sync selection - self.synchronizeSelectionInCollectionView(collectionView) + // Reload view + collectionView.reloadData() } else if photosChanges.hasIncrementalChanges == false { // Update fetch result - photosDataSource.fetchResult = photosChanges.fetchResultAfterChanges + photosDataSource.fetchResult = photosChanges.fetchResultAfterChanges as! PHFetchResult collectionView.reloadData() - // Sync selection - self.synchronizeSelectionInCollectionView(collectionView) + // Reload view + collectionView.reloadData() } } }) diff --git a/Pod/Classes/Controller/PreviewViewController.swift b/Pod/Classes/Controller/PreviewViewController.swift index 6fc83310..ba2f6244 100644 --- a/Pod/Classes/Controller/PreviewViewController.swift +++ b/Pod/Classes/Controller/PreviewViewController.swift @@ -24,16 +24,16 @@ import UIKit final class PreviewViewController : UIViewController { var imageView: UIImageView? - private var fullscreen = false + fileprivate var fullscreen = false - override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) { + override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) - view.backgroundColor = UIColor.whiteColor() + view.backgroundColor = UIColor.white imageView = UIImageView(frame: view.bounds) - imageView?.contentMode = .ScaleAspectFit - imageView?.autoresizingMask = [.FlexibleWidth, .FlexibleHeight] + imageView?.contentMode = .scaleAspectFit + imageView?.autoresizingMask = [.flexibleWidth, .flexibleHeight] view.addSubview(imageView!) let tapRecognizer = UITapGestureRecognizer() @@ -52,7 +52,7 @@ final class PreviewViewController : UIViewController { func toggleFullscreen() { fullscreen = !fullscreen - UIView.animateWithDuration(0.3, animations: { () -> Void in + UIView.animate(withDuration: 0.3, animations: { () -> Void in self.toggleNavigationBar() self.toggleStatusBar() self.toggleBackgroundColor() @@ -71,15 +71,15 @@ final class PreviewViewController : UIViewController { let aColor: UIColor if self.fullscreen { - aColor = UIColor.blackColor() + aColor = UIColor.black } else { - aColor = UIColor.whiteColor() + aColor = UIColor.white } self.view.backgroundColor = aColor } - override func prefersStatusBarHidden() -> Bool { + override var prefersStatusBarHidden : Bool { return fullscreen } } diff --git a/Pod/Classes/Controller/ZoomAnimator.swift b/Pod/Classes/Controller/ZoomAnimator.swift index 85d35127..9dc6451a 100644 --- a/Pod/Classes/Controller/ZoomAnimator.swift +++ b/Pod/Classes/Controller/ZoomAnimator.swift @@ -27,38 +27,36 @@ final class ZoomAnimator : NSObject, UIViewControllerAnimatedTransitioning { var sourceImageView: UIImageView? var destinationImageView: UIImageView? - func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) -> NSTimeInterval { + func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { return 0.3 } - func animateTransition(transitionContext: UIViewControllerContextTransitioning) { + func animateTransition(using transitionContext: UIViewControllerContextTransitioning) { // Get to and from view controller - - let containerView = transitionContext.containerView() - - if let toViewController = transitionContext.viewControllerForKey(UITransitionContextToViewControllerKey), let fromViewController = transitionContext.viewControllerForKey(UITransitionContextFromViewControllerKey), let sourceImageView = sourceImageView, let destinationImageView = destinationImageView { + if let toViewController = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.to), let fromViewController = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.from), let sourceImageView = sourceImageView, let destinationImageView = destinationImageView{ + let containerView = transitionContext.containerView // Disable selection so we don't select anything while the push animation is running - fromViewController.view?.userInteractionEnabled = false + fromViewController.view?.isUserInteractionEnabled = false // Setup views - sourceImageView.hidden = true - destinationImageView.hidden = true + sourceImageView.isHidden = true + destinationImageView.isHidden = true toViewController.view.alpha = 0.0 fromViewController.view.alpha = 1.0 containerView.backgroundColor = toViewController.view.backgroundColor // Setup scaling image - let scalingFrame = containerView.convertRect(sourceImageView.frame, fromView: sourceImageView.superview) + let scalingFrame = containerView.convert(sourceImageView.frame, from: sourceImageView.superview) let scalingImage = UIImageViewModeScaleAspect(frame: scalingFrame) scalingImage.contentMode = sourceImageView.contentMode scalingImage.image = sourceImageView.image //Init image scale - let destinationFrame = toViewController.view.convertRect(destinationImageView.bounds, fromView: destinationImageView.superview) - if destinationImageView.contentMode == .ScaleAspectFit { - scalingImage.initToScaleAspectFitToFrame(destinationFrame) + let destinationFrame = toViewController.view.convert(destinationImageView.bounds, from: destinationImageView.superview) + if destinationImageView.contentMode == .scaleAspectFit { + scalingImage.initToScaleAspectFit(toFrame: destinationFrame) } else { - scalingImage.initToScaleAspectFillToFrame(destinationFrame) + scalingImage.initToScaleAspectFill(toFrame: destinationFrame) } // Add views to container view @@ -66,15 +64,15 @@ final class ZoomAnimator : NSObject, UIViewControllerAnimatedTransitioning { containerView.addSubview(scalingImage) // Animate - UIView.animateWithDuration(transitionDuration(transitionContext), + UIView.animate(withDuration: transitionDuration(using: transitionContext), delay: 0.0, - options: UIViewAnimationOptions.TransitionNone, + options: UIViewAnimationOptions(), animations: { () -> Void in // Fade in fromViewController.view.alpha = 0.0 toViewController.view.alpha = 1.0 - if destinationImageView.contentMode == .ScaleAspectFit { + if destinationImageView.contentMode == .scaleAspectFit { scalingImage.animaticToScaleAspectFit() } else { scalingImage.animaticToScaleAspectFill() @@ -82,7 +80,7 @@ final class ZoomAnimator : NSObject, UIViewControllerAnimatedTransitioning { }, completion: { (finished) -> Void in // Finish image scaling and remove image view - if destinationImageView.contentMode == .ScaleAspectFit { + if destinationImageView.contentMode == .scaleAspectFit { scalingImage.animateFinishToScaleAspectFit() } else { scalingImage.animateFinishToScaleAspectFill() @@ -90,15 +88,15 @@ final class ZoomAnimator : NSObject, UIViewControllerAnimatedTransitioning { scalingImage.removeFromSuperview() // Unhide - destinationImageView.hidden = false - sourceImageView.hidden = false + destinationImageView.isHidden = false + sourceImageView.isHidden = false fromViewController.view.alpha = 1.0 // Finish transition - transitionContext.completeTransition(!transitionContext.transitionWasCancelled()) + transitionContext.completeTransition(!transitionContext.transitionWasCancelled) // Enable selection again - fromViewController.view?.userInteractionEnabled = true + fromViewController.view?.isUserInteractionEnabled = true }) } } diff --git a/Pod/Classes/Extension/NSIndexSet+NSIndexPath.swift b/Pod/Classes/Extension/NSIndexSet+NSIndexPath.swift index 23d06d98..63a261bb 100644 --- a/Pod/Classes/Extension/NSIndexSet+NSIndexPath.swift +++ b/Pod/Classes/Extension/NSIndexSet+NSIndexPath.swift @@ -25,16 +25,16 @@ import Foundation /** Extension for creating index paths from an index set */ -extension NSIndexSet { +extension IndexSet { /** - parameter section: The section for the created NSIndexPaths - return: An array with NSIndexPaths */ - func bs_indexPathsForSection(section: Int) -> [NSIndexPath] { - var indexPaths: [NSIndexPath] = [] + func bs_indexPathsForSection(_ section: Int) -> [IndexPath] { + var indexPaths: [IndexPath] = [] - enumerateIndexesUsingBlock { (index, _) -> Void in - indexPaths.append(NSIndexPath(forItem: index, inSection: section)) + for value in self { + indexPaths.append(IndexPath(item: value, section: section)) } return indexPaths diff --git a/Pod/Classes/Extension/UIButton+NoAnimation.swift b/Pod/Classes/Extension/UIButton+NoAnimation.swift index b3d826c5..809a0da7 100644 --- a/Pod/Classes/Extension/UIButton+NoAnimation.swift +++ b/Pod/Classes/Extension/UIButton+NoAnimation.swift @@ -31,18 +31,19 @@ extension UIButton { - parameter title: The String to use as title - parameter forState: Which state it applies to */ - func bs_setTitleWithoutAnimation(title: String?, forState state: UIControlState) { + func bs_setTitleWithoutAnimation(_ title: String?, forState state: UIControlState) { // Disable/enable animations - let animationEnabled = UIView.areAnimationsEnabled() + let animationEnabled = UIView.areAnimationsEnabled UIView.setAnimationsEnabled(false) // Set title without the default animation - self.setTitle(title, forState: state) + self.setTitle(title, for: state) self.layoutIfNeeded() // Enable animations if animation where enabled before UIView.setAnimationsEnabled(animationEnabled) - + + superview?.setNeedsLayout() } -} \ No newline at end of file +} diff --git a/Pod/Classes/Extension/UIViewController+BSImagePicker.swift b/Pod/Classes/Extension/UIViewController+BSImagePicker.swift index 586a2160..57d94bdb 100644 --- a/Pod/Classes/Extension/UIViewController+BSImagePicker.swift +++ b/Pod/Classes/Extension/UIViewController+BSImagePicker.swift @@ -38,7 +38,7 @@ public extension UIViewController { - parameter finish: Closure to call when user finishes or nil - parameter completion: presentation completed closure or nil */ - func bs_presentImagePickerController(imagePicker: BSImagePickerViewController, animated: Bool, select: ((asset: PHAsset) -> Void)?, deselect: ((asset: PHAsset) -> Void)?, cancel: (([PHAsset]) -> Void)?, finish: (([PHAsset]) -> Void)?, completion: (() -> Void)?) { + func bs_presentImagePickerController(_ imagePicker: BSImagePickerViewController, animated: Bool, select: ((_ asset: PHAsset) -> Void)?, deselect: ((_ asset: PHAsset) -> Void)?, cancel: (([PHAsset]) -> Void)?, finish: (([PHAsset]) -> Void)?, completion: (() -> Void)?) { BSImagePickerViewController.authorize(fromViewController: self) { (authorized) -> Void in // Make sure we are authorized before proceding guard authorized == true else { return } @@ -50,7 +50,7 @@ public extension UIViewController { imagePicker.photosViewController.finishClosure = finish // Present - self.presentViewController(imagePicker, animated: animated, completion: completion) + self.present(imagePicker, animated: animated, completion: completion) } } } diff --git a/Pod/Classes/Model/AlbumTableViewDataSource.swift b/Pod/Classes/Model/AlbumTableViewDataSource.swift index cb3592a4..86de70f5 100644 --- a/Pod/Classes/Model/AlbumTableViewDataSource.swift +++ b/Pod/Classes/Model/AlbumTableViewDataSource.swift @@ -27,71 +27,68 @@ import Photos Implements the UITableViewDataSource protocol with a data source and cell factory */ final class AlbumTableViewDataSource : NSObject, UITableViewDataSource { - let fetchResults: [PHFetchResult] - private let albumCellIdentifier = "albumCell" + let fetchResults: [PHFetchResult] + fileprivate let albumCellIdentifier = "albumCell" - init(fetchResults: [PHFetchResult]) { + init(fetchResults: [PHFetchResult]) { self.fetchResults = fetchResults super.init() } - func numberOfSectionsInTableView(tableView: UITableView) -> Int { + func numberOfSections(in tableView: UITableView) -> Int { return fetchResults.count } - func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return fetchResults[section].count } - func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCellWithIdentifier(albumCellIdentifier, forIndexPath: indexPath) as! AlbumCell - let cachingManager = PHCachingImageManager.defaultManager() as? PHCachingImageManager + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: albumCellIdentifier, for: indexPath) as! AlbumCell + let cachingManager = PHCachingImageManager.default() as? PHCachingImageManager cachingManager?.allowsCachingHighQualityImages = false // Fetch album - if let album = fetchResults[indexPath.section][indexPath.row] as? PHAssetCollection { - // Title - cell.albumTitleLabel.text = album.localizedTitle - - // Selection style - cell.selectionStyle = .None - - let fetchOptions = PHFetchOptions() - fetchOptions.sortDescriptors = [ - NSSortDescriptor(key: "creationDate", ascending: false) - ] - fetchOptions.predicate = NSPredicate(format: "mediaType = %d", PHAssetMediaType.Image.rawValue) - - let result = PHAsset.fetchAssetsInAssetCollection(album, options: fetchOptions) - result.enumerateObjectsUsingBlock { (object, idx, stop) in - if let asset = object as? PHAsset { - let imageSize = CGSize(width: 79, height: 79) - let imageContentMode: PHImageContentMode = .AspectFill - switch idx { - case 0: - PHCachingImageManager.defaultManager().requestImageForAsset(asset, targetSize: imageSize, contentMode: imageContentMode, options: nil) { (result, _) in - cell.firstImageView.image = result - cell.secondImageView.image = result - cell.thirdImageView.image = result - } - case 1: - PHCachingImageManager.defaultManager().requestImageForAsset(asset, targetSize: imageSize, contentMode: imageContentMode, options: nil) { (result, _) in - cell.secondImageView.image = result - cell.thirdImageView.image = result - } - case 2: - PHCachingImageManager.defaultManager().requestImageForAsset(asset, targetSize: imageSize, contentMode: imageContentMode, options: nil) { (result, _) in - cell.thirdImageView.image = result - } - - default: - // Stop enumeration - stop.initialize(true) - } + let album = fetchResults[indexPath.section][indexPath.row] + // Title + cell.albumTitleLabel.text = album.localizedTitle + + // Selection style + cell.selectionStyle = .none + + let fetchOptions = PHFetchOptions() + fetchOptions.sortDescriptors = [ + NSSortDescriptor(key: "creationDate", ascending: false) + ] + fetchOptions.predicate = NSPredicate(format: "mediaType = %d", PHAssetMediaType.image.rawValue) + + let result = PHAsset.fetchAssets(in: album, options: fetchOptions) + result.enumerateObjects({ (asset, idx, stop) in + let imageSize = CGSize(width: 79, height: 79) + let imageContentMode: PHImageContentMode = .aspectFill + switch idx { + case 0: + PHCachingImageManager.default().requestImage(for: asset, targetSize: imageSize, contentMode: imageContentMode, options: nil) { (result, _) in + cell.firstImageView.image = result + cell.secondImageView.image = result + cell.thirdImageView.image = result + } + case 1: + PHCachingImageManager.default().requestImage(for: asset, targetSize: imageSize, contentMode: imageContentMode, options: nil) { (result, _) in + cell.secondImageView.image = result + cell.thirdImageView.image = result + } + case 2: + PHCachingImageManager.default().requestImage(for: asset, targetSize: imageSize, contentMode: imageContentMode, options: nil) { (result, _) in + cell.thirdImageView.image = result } + + default: + // Stop enumeration + stop.initialize(to: true) } - } + }) return cell } diff --git a/Pod/Classes/Model/CameraCollectionViewDataSource.swift b/Pod/Classes/Model/CameraCollectionViewDataSource.swift index cf2afa99..1a34d664 100644 --- a/Pod/Classes/Model/CameraCollectionViewDataSource.swift +++ b/Pod/Classes/Model/CameraCollectionViewDataSource.swift @@ -37,23 +37,23 @@ final class CameraCollectionViewDataSource: NSObject, UICollectionViewDataSource super.init() } - func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int { - return Int(cameraAvailable && settings.takePhotos) + func numberOfSections(in collectionView: UICollectionView) -> Int { + return (cameraAvailable && settings.takePhotos) ? 1:0 } - func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - return Int(cameraAvailable && settings.takePhotos) + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return (cameraAvailable && settings.takePhotos) ? 1:0 } - func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { - let cameraCell = collectionView.dequeueReusableCellWithReuseIdentifier(cameraCellIdentifier, forIndexPath: indexPath) as! CameraCell + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + let cameraCell = collectionView.dequeueReusableCell(withReuseIdentifier: cameraCellIdentifier, for: indexPath) as! CameraCell cameraCell.accessibilityIdentifier = "camera_cell_\(indexPath.item)" cameraCell.takePhotoIcon = settings.takePhotoIcon return cameraCell } - func registerCellIdentifiersForCollectionView(collectionView: UICollectionView?) { - collectionView?.registerNib(UINib(nibName: "CameraCell", bundle: BSImagePickerViewController.bundle), forCellWithReuseIdentifier: cameraCellIdentifier) + func registerCellIdentifiersForCollectionView(_ collectionView: UICollectionView?) { + collectionView?.register(UINib(nibName: "CameraCell", bundle: BSImagePickerViewController.bundle), forCellWithReuseIdentifier: cameraCellIdentifier) } } diff --git a/Pod/Classes/Model/ComposedCollectionViewDataSource.swift b/Pod/Classes/Model/ComposedCollectionViewDataSource.swift index 12467af5..0dd78c4f 100644 --- a/Pod/Classes/Model/ComposedCollectionViewDataSource.swift +++ b/Pod/Classes/Model/ComposedCollectionViewDataSource.swift @@ -34,15 +34,15 @@ class ComposedCollectionViewDataSource: NSObject, UICollectionViewDataSource { super.init() } - func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int { + func numberOfSections(in collectionView: UICollectionView) -> Int { return dataSources.count } - func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return dataSources[section].collectionView(collectionView, numberOfItemsInSection: 0) } - func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { - return dataSources[indexPath.section].collectionView(collectionView, cellForItemAtIndexPath: NSIndexPath(forItem: indexPath.row, inSection: 0)) + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + return dataSources[indexPath.section].collectionView(collectionView, cellForItemAt: IndexPath(item: indexPath.row, section: 0)) } } diff --git a/Pod/Classes/Model/PhotoCollectionViewDataSource.swift b/Pod/Classes/Model/PhotoCollectionViewDataSource.swift index 58e6844e..43cedd5e 100644 --- a/Pod/Classes/Model/PhotoCollectionViewDataSource.swift +++ b/Pod/Classes/Model/PhotoCollectionViewDataSource.swift @@ -28,42 +28,41 @@ Gives UICollectionViewDataSource functionality with a given data source and cell */ final class PhotoCollectionViewDataSource : NSObject, UICollectionViewDataSource { var selections = [PHAsset]() - var fetchResult: PHFetchResult + var fetchResult: PHFetchResult - private let photoCellIdentifier = "photoCellIdentifier" - private let photosManager = PHCachingImageManager.defaultManager() - private let imageContentMode: PHImageContentMode = .AspectFill + fileprivate let photoCellIdentifier = "photoCellIdentifier" + fileprivate let photosManager = PHCachingImageManager.default() + fileprivate let imageContentMode: PHImageContentMode = .aspectFill let settings: BSImagePickerSettings? - var imageSize: CGSize = CGSizeZero + var imageSize: CGSize = CGSize.zero - init(fetchResult: PHFetchResult, selections: PHFetchResult? = nil, settings: BSImagePickerSettings?) { + init(fetchResult: PHFetchResult, selections: PHFetchResult? = nil, settings: BSImagePickerSettings?) { self.fetchResult = fetchResult self.settings = settings if let selections = selections { var selectionsArray = [PHAsset]() - selections.enumerateObjectsUsingBlock { (asset, idx, stop) -> Void in - if let asset = asset as? PHAsset { - selectionsArray.append(asset) - } - } + selections.enumerateObjects({ (asset, idx, stop) in + selectionsArray.append(asset) + }) + self.selections = selectionsArray } super.init() } - func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int { + func numberOfSections(in collectionView: UICollectionView) -> Int { return 1 } - func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return fetchResult.count } - func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { UIView.setAnimationsEnabled(false) - let cell = collectionView.dequeueReusableCellWithReuseIdentifier(photoCellIdentifier, forIndexPath: indexPath) as! PhotoCell + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: photoCellIdentifier, for: indexPath) as! PhotoCell cell.accessibilityIdentifier = "photo_cell_\(indexPath.item)" if let settings = settings { cell.settings = settings @@ -74,26 +73,25 @@ final class PhotoCollectionViewDataSource : NSObject, UICollectionViewDataSource photosManager.cancelImageRequest(PHImageRequestID(cell.tag)) } - if let asset = fetchResult[indexPath.row] as? PHAsset { - cell.asset = asset - - // Request image - cell.tag = Int(photosManager.requestImageForAsset(asset, targetSize: imageSize, contentMode: imageContentMode, options: nil) { (result, _) in - cell.imageView.image = result - }) - - // Set selection number - if let asset = fetchResult[indexPath.row] as? PHAsset, let index = selections.indexOf(asset) { - if let character = settings?.selectionCharacter { - cell.selectionString = String(character) - } else { - cell.selectionString = String(index+1) - } - - cell.selected = true + let asset = fetchResult[indexPath.row] + cell.asset = asset + + // Request image + cell.tag = Int(photosManager.requestImage(for: asset, targetSize: imageSize, contentMode: imageContentMode, options: nil) { (result, _) in + cell.imageView.image = result + }) + + // Set selection number + if let index = selections.index(of: asset) { + if let character = settings?.selectionCharacter { + cell.selectionString = String(character) } else { - cell.selected = false + cell.selectionString = String(index+1) } + + cell.photoSelected = true + } else { + cell.photoSelected = false } UIView.setAnimationsEnabled(true) @@ -101,7 +99,7 @@ final class PhotoCollectionViewDataSource : NSObject, UICollectionViewDataSource return cell } - func registerCellIdentifiersForCollectionView(collectionView: UICollectionView?) { - collectionView?.registerNib(UINib(nibName: "PhotoCell", bundle: BSImagePickerViewController.bundle), forCellWithReuseIdentifier: photoCellIdentifier) + func registerCellIdentifiersForCollectionView(_ collectionView: UICollectionView?) { + collectionView?.register(UINib(nibName: "PhotoCell", bundle: BSImagePickerViewController.bundle), forCellWithReuseIdentifier: photoCellIdentifier) } -} \ No newline at end of file +} diff --git a/Pod/Classes/Model/Settings.swift b/Pod/Classes/Model/Settings.swift index 9e5d3bc6..58327df9 100644 --- a/Pod/Classes/Model/Settings.swift +++ b/Pod/Classes/Model/Settings.swift @@ -29,25 +29,25 @@ final class Settings : BSImagePickerSettings { var maxNumberOfSelections: Int = Int.max var selectionCharacter: Character? = nil var selectionFillColor: UIColor = UIView().tintColor - var selectionStrokeColor: UIColor = UIColor.whiteColor() - var selectionShadowColor: UIColor = UIColor.blackColor() + var selectionStrokeColor: UIColor = UIColor.white + var selectionShadowColor: UIColor = UIColor.black var selectionTextAttributes: [String: AnyObject] = { let paragraphStyle = NSMutableParagraphStyle() - paragraphStyle.lineBreakMode = .ByTruncatingTail - paragraphStyle.alignment = .Center + paragraphStyle.lineBreakMode = .byTruncatingTail + paragraphStyle.alignment = .center return [ - NSFontAttributeName: UIFont.boldSystemFontOfSize(10.0), + NSFontAttributeName: UIFont.boldSystemFont(ofSize: 10.0), NSParagraphStyleAttributeName: paragraphStyle, - NSForegroundColorAttributeName: UIColor.whiteColor() + NSForegroundColorAttributeName: UIColor.white ] }() - var cellsPerRow: (verticalSize: UIUserInterfaceSizeClass, horizontalSize: UIUserInterfaceSizeClass) -> Int = {(verticalSize: UIUserInterfaceSizeClass, horizontalSize: UIUserInterfaceSizeClass) -> Int in + var cellsPerRow: (_ verticalSize: UIUserInterfaceSizeClass, _ horizontalSize: UIUserInterfaceSizeClass) -> Int = {(verticalSize: UIUserInterfaceSizeClass, horizontalSize: UIUserInterfaceSizeClass) -> Int in switch (verticalSize, horizontalSize) { - case (.Compact, .Regular): // iPhone5-6 portrait + case (.compact, .regular): // iPhone5-6 portrait return 3 - case (.Compact, .Compact): // iPhone5-6 landscape + case (.compact, .compact): // iPhone5-6 landscape return 5 - case (.Regular, .Regular): // iPad portrait/landscape + case (.regular, .regular): // iPad portrait/landscape return 7 default: return 3 @@ -56,5 +56,5 @@ final class Settings : BSImagePickerSettings { var takePhotos: Bool = false - var takePhotoIcon: UIImage? = UIImage(named: "add_photo", inBundle: BSImagePickerViewController.bundle, compatibleWithTraitCollection: nil) -} \ No newline at end of file + var takePhotoIcon: UIImage? = UIImage(named: "add_photo", in: BSImagePickerViewController.bundle, compatibleWith: nil) +} diff --git a/Pod/Classes/Protocol/BSImagePickerSettings.swift b/Pod/Classes/Protocol/BSImagePickerSettings.swift index 69f4ea93..0a5375f3 100644 --- a/Pod/Classes/Protocol/BSImagePickerSettings.swift +++ b/Pod/Classes/Protocol/BSImagePickerSettings.swift @@ -59,7 +59,7 @@ public protocol BSImagePickerSettings { /** Return how many cells per row you want to show for the given size classes */ - var cellsPerRow: (verticalSize: UIUserInterfaceSizeClass, horizontalSize: UIUserInterfaceSizeClass) -> Int { get set } + var cellsPerRow: (_ verticalSize: UIUserInterfaceSizeClass, _ horizontalSize: UIUserInterfaceSizeClass) -> Int { get set } /** Toggle take photos @@ -71,4 +71,4 @@ public protocol BSImagePickerSettings { If you use a black image tint color will be applied to it. */ var takePhotoIcon: UIImage? { get set } -} \ No newline at end of file +} diff --git a/Pod/Classes/View/AlbumCell.swift b/Pod/Classes/View/AlbumCell.swift index 7fddce20..e9d81d99 100644 --- a/Pod/Classes/View/AlbumCell.swift +++ b/Pod/Classes/View/AlbumCell.swift @@ -36,20 +36,20 @@ final class AlbumCell: UITableViewCell { // Add a little shadow to images views for imageView in [firstImageView, secondImageView, thirdImageView] { - imageView.layer.shadowColor = UIColor.whiteColor().CGColor - imageView.layer.shadowRadius = 1.0 - imageView.layer.shadowOffset = CGSize(width: 0.5, height: -0.5) - imageView.layer.shadowOpacity = 1.0 + imageView?.layer.shadowColor = UIColor.white.cgColor + imageView?.layer.shadowRadius = 1.0 + imageView?.layer.shadowOffset = CGSize(width: 0.5, height: -0.5) + imageView?.layer.shadowOpacity = 1.0 } } - override var selected: Bool { + override var isSelected: Bool { didSet { // Selection checkmark - if selected == true { - accessoryType = .Checkmark + if isSelected == true { + accessoryType = .checkmark } else { - accessoryType = .None + accessoryType = .none } } } diff --git a/Pod/Classes/View/AlbumTitleView.swift b/Pod/Classes/View/AlbumTitleView.swift index 02c1ef82..4a9d579b 100644 --- a/Pod/Classes/View/AlbumTitleView.swift +++ b/Pod/Classes/View/AlbumTitleView.swift @@ -28,13 +28,13 @@ The navigation title view with album name and a button for activating the drop d final class AlbumTitleView: UIView { @IBOutlet weak var albumButton: UIButton! - private var context = 0 + fileprivate var context = 0 var albumTitle = "" { didSet { if let imageView = self.albumButton?.imageView, let titleLabel = self.albumButton?.titleLabel { // Set title on button - albumButton?.setTitle(self.albumTitle, forState: .Normal) + albumButton?.setTitle(self.albumTitle, for: UIControlState()) // Also set title directly to label, since it isn't done right away when setting button title // And we need to know its width to calculate insets @@ -52,21 +52,21 @@ final class AlbumTitleView: UIView { super.awakeFromNib() // Set image - albumButton?.setImage(arrowDownImage, forState: .Normal) + albumButton?.setImage(arrowDownImage, for: UIControlState()) } lazy var arrowDownImage: UIImage? = { // Get path for BSImagePicker bundle - let bundlePath = NSBundle(forClass: PhotosViewController.self).pathForResource("BSImagePicker", ofType: "bundle") - let bundle: NSBundle? + let bundlePath = Bundle(for: PhotosViewController.self).path(forResource: "BSImagePicker", ofType: "bundle") + let bundle: Bundle? // Load bundle if let bundlePath = bundlePath { - bundle = NSBundle(path: bundlePath) + bundle = Bundle(path: bundlePath) } else { bundle = nil } - return UIImage(named: "arrow_down", inBundle: bundle, compatibleWithTraitCollection: nil) + return UIImage(named: "arrow_down", in: bundle, compatibleWith: nil) }() } diff --git a/Pod/Classes/View/CameraCell.swift b/Pod/Classes/View/CameraCell.swift index 4566454e..5f8006c6 100644 --- a/Pod/Classes/View/CameraCell.swift +++ b/Pod/Classes/View/CameraCell.swift @@ -19,19 +19,19 @@ final class CameraCell: UICollectionViewCell { imageView.image = takePhotoIcon // Apply tint to image - imageView.image = imageView.image?.imageWithRenderingMode(.AlwaysTemplate) + imageView.image = imageView.image?.withRenderingMode(.alwaysTemplate) } } var session: AVCaptureSession? var captureLayer: AVCaptureVideoPreviewLayer? - let sessionQueue = dispatch_queue_create("AVCaptureVideoPreviewLayer", nil) + let sessionQueue = DispatchQueue(label: "AVCaptureVideoPreviewLayer", attributes: []) override func awakeFromNib() { super.awakeFromNib() // Don't trigger camera access for the background - guard AVCaptureDevice.authorizationStatusForMediaType(AVMediaTypeVideo) == .Authorized else { + guard AVCaptureDevice.authorizationStatus(forMediaType: AVMediaTypeVideo) == .authorized else { return } @@ -41,7 +41,7 @@ final class CameraCell: UICollectionViewCell { session?.sessionPreset = AVCaptureSessionPresetMedium // Hook upp device - let device = AVCaptureDevice.defaultDeviceWithMediaType(AVMediaTypeVideo) + let device = AVCaptureDevice.defaultDevice(withMediaType: AVMediaTypeVideo) let input = try AVCaptureDeviceInput(device: device) session?.addInput(input) @@ -65,13 +65,13 @@ final class CameraCell: UICollectionViewCell { } func startLiveBackground() { - dispatch_async(sessionQueue) { () -> Void in + sessionQueue.async { () -> Void in self.session?.startRunning() } } func stopLiveBackground() { - dispatch_async(sessionQueue) { () -> Void in + sessionQueue.async { () -> Void in self.session?.stopRunning() } } diff --git a/Pod/Classes/View/PhotoCell.swift b/Pod/Classes/View/PhotoCell.swift index ae809d9c..3129eb2b 100644 --- a/Pod/Classes/View/PhotoCell.swift +++ b/Pod/Classes/View/PhotoCell.swift @@ -51,35 +51,29 @@ final class PhotoCell: UICollectionViewCell { } } - override var selected: Bool { - get { - return super.selected - } - - set { - let hasChanged = selected != newValue - super.selected = newValue - - if UIView.areAnimationsEnabled() && hasChanged { - UIView.animateWithDuration(NSTimeInterval(0.1), animations: { () -> Void in + var photoSelected: Bool = false { + didSet { + let hasChanged = photoSelected != oldValue + if UIView.areAnimationsEnabled && hasChanged { + UIView.animate(withDuration: TimeInterval(0.1), animations: { () -> Void in // Set alpha for views - self.updateAlpha(newValue) - + self.updateAlpha(self.photoSelected) + // Scale all views down a little - self.transform = CGAffineTransformMakeScale(0.95, 0.95) - }) { (finished: Bool) -> Void in - UIView.animateWithDuration(NSTimeInterval(0.1), animations: { () -> Void in + self.transform = CGAffineTransform(scaleX: 0.95, y: 0.95) + }, completion: { (finished: Bool) -> Void in + UIView.animate(withDuration: TimeInterval(0.1), animations: { () -> Void in // And then scale them back upp again to give a bounce effect - self.transform = CGAffineTransformMakeScale(1.0, 1.0) + self.transform = CGAffineTransform(scaleX: 1.0, y: 1.0) }, completion: nil) - } + }) } else { - updateAlpha(newValue) + updateAlpha(photoSelected) } } } - private func updateAlpha(selected: Bool) { + fileprivate func updateAlpha(_ selected: Bool) { if selected == true { self.selectionView.alpha = 1.0 self.selectionOverlayView.alpha = 0.3 diff --git a/Pod/Classes/View/SelectionView.swift b/Pod/Classes/View/SelectionView.swift index 76136907..5e041056 100644 --- a/Pod/Classes/View/SelectionView.swift +++ b/Pod/Classes/View/SelectionView.swift @@ -36,11 +36,9 @@ Used as an overlay on selected cells var settings: BSImagePickerSettings = Settings() - override func drawRect(rect: CGRect) { + override func draw(_ rect: CGRect) { //// General Declarations - guard let context = UIGraphicsGetCurrentContext() else { - return - } + let context = UIGraphicsGetCurrentContext() //// Color Declarations @@ -52,41 +50,41 @@ Used as an overlay on selected cells let checkmarkFrame = bounds; //// Subframes - let group = CGRect(x: CGRectGetMinX(checkmarkFrame) + 3, y: CGRectGetMinY(checkmarkFrame) + 3, width: CGRectGetWidth(checkmarkFrame) - 6, height: CGRectGetHeight(checkmarkFrame) - 6) + let group = CGRect(x: checkmarkFrame.minX + 3, y: checkmarkFrame.minY + 3, width: checkmarkFrame.width - 6, height: checkmarkFrame.height - 6) //// CheckedOval Drawing - let checkedOvalPath = UIBezierPath(ovalInRect: CGRectMake(CGRectGetMinX(group) + floor(CGRectGetWidth(group) * 0.0 + 0.5), CGRectGetMinY(group) + floor(CGRectGetHeight(group) * 0.0 + 0.5), floor(CGRectGetWidth(group) * 1.0 + 0.5) - floor(CGRectGetWidth(group) * 0.0 + 0.5), floor(CGRectGetHeight(group) * 1.0 + 0.5) - floor(CGRectGetHeight(group) * 0.0 + 0.5))) - CGContextSaveGState(context) - CGContextSetShadowWithColor(context, shadow2Offset, shadow2BlurRadius, settings.selectionShadowColor.CGColor) + let checkedOvalPath = UIBezierPath(ovalIn: CGRect(x: group.minX + floor(group.width * 0.0 + 0.5), y: group.minY + floor(group.height * 0.0 + 0.5), width: floor(group.width * 1.0 + 0.5) - floor(group.width * 0.0 + 0.5), height: floor(group.height * 1.0 + 0.5) - floor(group.height * 0.0 + 0.5))) + context?.saveGState() + context?.setShadow(offset: shadow2Offset, blur: shadow2BlurRadius, color: settings.selectionShadowColor.cgColor) settings.selectionFillColor.setFill() checkedOvalPath.fill() - CGContextRestoreGState(context) + context?.restoreGState() settings.selectionStrokeColor.setStroke() checkedOvalPath.lineWidth = 1 checkedOvalPath.stroke() - CGContextSetFillColorWithColor(context, UIColor.whiteColor().CGColor) + context?.setFillColor(UIColor.white.cgColor) //// Check mark for single assets if (settings.maxNumberOfSelections == 1) { - CGContextSetStrokeColorWithColor(context, UIColor.whiteColor().CGColor) + context?.setStrokeColor(UIColor.white.cgColor) let checkPath = UIBezierPath() - checkPath.moveToPoint(CGPoint(x: 7, y: 12.5)) - checkPath.addLineToPoint(CGPoint(x: 11, y: 16)) - checkPath.addLineToPoint(CGPoint(x: 17.5, y: 9.5)) + checkPath.move(to: CGPoint(x: 7, y: 12.5)) + checkPath.addLine(to: CGPoint(x: 11, y: 16)) + checkPath.addLine(to: CGPoint(x: 17.5, y: 9.5)) checkPath.stroke() return; } //// Bezier Drawing (Picture Number) - let size = selectionString.sizeWithAttributes(settings.selectionTextAttributes) + let size = selectionString.size(attributes: settings.selectionTextAttributes) - selectionString.drawInRect(CGRectMake(CGRectGetMidX(checkmarkFrame) - size.width / 2.0, - CGRectGetMidY(checkmarkFrame) - size.height / 2.0, - size.width, - size.height), withAttributes: settings.selectionTextAttributes) + selectionString.draw(in: CGRect(x: checkmarkFrame.midX - size.width / 2.0, + y: checkmarkFrame.midY - size.height / 2.0, + width: size.width, + height: size.height), withAttributes: settings.selectionTextAttributes) } }