From 4d1017a4d7604c0d9d5b4e3f08aef8de663311b2 Mon Sep 17 00:00:00 2001 From: vytick Date: Thu, 22 Sep 2016 22:20:37 +0200 Subject: [PATCH] updated for Swift 3.0 and SnapKit 3.0.0 -> version 0.2.0 --- DialogView.podspec | 4 +- Example/DialogView.xcodeproj/project.pbxproj | 52 +- Example/DialogView/AppDelegate.swift | 12 +- Example/DialogView/ViewController.swift | 26 +- Example/Podfile | 8 +- Example/Podfile.lock | 18 +- .../Local Podspecs/DialogView.podspec.json | 6 +- Example/Pods/Manifest.lock | 18 +- Example/Pods/Pods.xcodeproj/project.pbxproj | 578 ++++++++++------- .../xcschemes/DialogView.xcscheme | 71 -- Example/Pods/SnapKit/README.md | 105 ++- Example/Pods/SnapKit/Source/Constraint.swift | 604 +++++------------ .../SnapKit/Source/ConstraintAttributes.swift | 196 +++--- .../{SnapKit.swift => ConstraintConfig.swift} | 23 +- .../Source/ConstraintConstantTarget.swift | 147 +++++ .../Pods/SnapKit/Source/ConstraintDSL.swift | 179 +++++ .../Source/ConstraintDescription.swift | 613 ++---------------- .../Source/ConstraintInsetTarget.swift | 72 ++ .../SnapKit/Source/ConstraintInsets.swift | 35 + .../Pods/SnapKit/Source/ConstraintItem.swift | 55 +- .../Source/ConstraintLayoutGuide.swift | 36 + .../Source/ConstraintLayoutGuideDSL.swift | 45 ++ .../Source/ConstraintLayoutSupport.swift | 36 + ...swift => ConstraintLayoutSupportDSL.swift} | 41 +- .../Pods/SnapKit/Source/ConstraintMaker.swift | 236 +++---- .../Source/ConstraintMakerEditable.swift | 56 ++ .../Source/ConstraintMakerExtendable.swift | 163 +++++ .../Source/ConstraintMakerFinalizable.swift | 49 ++ .../Source/ConstraintMakerPriortizable.swift | 67 ++ .../Source/ConstraintMakerRelatable.swift | 95 +++ .../Source/ConstraintMultiplierTarget.swift | 75 +++ .../Source/ConstraintOffsetTarget.swift | 69 ++ .../Source/ConstraintPriorityTarget.swift | 75 +++ ....swift => ConstraintRelatableTarget.swift} | 50 +- .../SnapKit/Source/ConstraintRelation.swift | 28 +- .../Source/ConstraintView+Extensions.swift | 152 +++++ .../Pods/SnapKit/Source/ConstraintView.swift | 35 + .../SnapKit/Source/ConstraintViewDSL.swift | 135 ++++ Example/Pods/SnapKit/Source/Debugging.swift | 198 +++--- .../SnapKit/Source/LayoutConstraint.swift | 50 +- .../Source/UILayoutGuide+Extensions.swift | 36 + .../Source/UILayoutSupport+Extensions.swift | 36 + .../Pods/SnapKit/Source/View+SnapKit.swift | 183 ------ .../DialogView/DialogView.xcconfig | 7 +- .../DialogView/Info.plist | 40 +- ...-DialogView_Example-acknowledgements.plist | 4 + .../Pods-DialogView_Example-frameworks.sh | 4 +- .../Pods-DialogView_Example-resources.sh | 34 +- .../Pods-DialogView_Example.debug.xcconfig | 7 +- .../Pods-DialogView_Example.release.xcconfig | 7 +- ...ds-DialogView_Tests-acknowledgements.plist | 4 + .../Pods-DialogView_Tests-frameworks.sh | 4 +- .../Pods-DialogView_Tests-resources.sh | 34 +- .../Pods-DialogView_Tests.debug.xcconfig | 7 +- .../Pods-DialogView_Tests.release.xcconfig | 7 +- .../Target Support Files/SnapKit/Info.plist | 40 +- .../SnapKit/SnapKit.xcconfig | 5 +- Pod/Classes/DialogView.swift | 168 ++--- 58 files changed, 2958 insertions(+), 2182 deletions(-) delete mode 100644 Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/DialogView.xcscheme rename Example/Pods/SnapKit/Source/{SnapKit.swift => ConstraintConfig.swift} (68%) create mode 100644 Example/Pods/SnapKit/Source/ConstraintConstantTarget.swift create mode 100644 Example/Pods/SnapKit/Source/ConstraintDSL.swift create mode 100644 Example/Pods/SnapKit/Source/ConstraintInsetTarget.swift create mode 100644 Example/Pods/SnapKit/Source/ConstraintInsets.swift create mode 100644 Example/Pods/SnapKit/Source/ConstraintLayoutGuide.swift create mode 100644 Example/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift create mode 100644 Example/Pods/SnapKit/Source/ConstraintLayoutSupport.swift rename Example/Pods/SnapKit/Source/{ViewController+SnapKit.swift => ConstraintLayoutSupportDSL.swift} (56%) create mode 100644 Example/Pods/SnapKit/Source/ConstraintMakerEditable.swift create mode 100644 Example/Pods/SnapKit/Source/ConstraintMakerExtendable.swift create mode 100644 Example/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift create mode 100644 Example/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift create mode 100644 Example/Pods/SnapKit/Source/ConstraintMakerRelatable.swift create mode 100644 Example/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift create mode 100644 Example/Pods/SnapKit/Source/ConstraintOffsetTarget.swift create mode 100644 Example/Pods/SnapKit/Source/ConstraintPriorityTarget.swift rename Example/Pods/SnapKit/Source/{EdgeInsets.swift => ConstraintRelatableTarget.swift} (62%) create mode 100644 Example/Pods/SnapKit/Source/ConstraintView+Extensions.swift create mode 100644 Example/Pods/SnapKit/Source/ConstraintView.swift create mode 100644 Example/Pods/SnapKit/Source/ConstraintViewDSL.swift create mode 100644 Example/Pods/SnapKit/Source/UILayoutGuide+Extensions.swift create mode 100644 Example/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift delete mode 100644 Example/Pods/SnapKit/Source/View+SnapKit.swift diff --git a/DialogView.podspec b/DialogView.podspec index 8bb077b..c77a3a0 100644 --- a/DialogView.podspec +++ b/DialogView.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = "DialogView" - s.version = "0.1.3" + s.version = "0.2.0" s.summary = "Highly customisable dialog (alert) view made in swift." s.description = "You can customise pretty much anything prom inner paddings and margins to all colors and views. Please refer to the README.md for instructions" @@ -30,5 +30,5 @@ Pod::Spec.new do |s| # s.public_header_files = 'Pod/Classes/**/*.h' # s.frameworks = 'UIKit', 'MapKit' - s.dependency 'SnapKit', '~> 0.20.0' + s.dependency 'SnapKit', '~> 3.0' end diff --git a/Example/DialogView.xcodeproj/project.pbxproj b/Example/DialogView.xcodeproj/project.pbxproj index 22a0826..462ff71 100644 --- a/Example/DialogView.xcodeproj/project.pbxproj +++ b/Example/DialogView.xcodeproj/project.pbxproj @@ -166,12 +166,12 @@ isa = PBXNativeTarget; buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "DialogView_Example" */; buildPhases = ( - F66F26A59919B9561B3FED2D /* 📦 Check Pods Manifest.lock */, + F66F26A59919B9561B3FED2D /* [CP] Check Pods Manifest.lock */, 607FACCC1AFB9204008FA782 /* Sources */, 607FACCD1AFB9204008FA782 /* Frameworks */, 607FACCE1AFB9204008FA782 /* Resources */, - 73352EA91C8106DF91B88A58 /* 📦 Embed Pods Frameworks */, - 47F352B51038106AFA540F00 /* 📦 Copy Pods Resources */, + 73352EA91C8106DF91B88A58 /* [CP] Embed Pods Frameworks */, + 47F352B51038106AFA540F00 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -186,12 +186,12 @@ isa = PBXNativeTarget; buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "DialogView_Tests" */; buildPhases = ( - B4CA5D581390463C0038FB83 /* 📦 Check Pods Manifest.lock */, + B4CA5D581390463C0038FB83 /* [CP] Check Pods Manifest.lock */, 607FACE11AFB9204008FA782 /* Sources */, 607FACE21AFB9204008FA782 /* Frameworks */, 607FACE31AFB9204008FA782 /* Resources */, - C0CBA8B8375C2B2D2BCC25D5 /* 📦 Embed Pods Frameworks */, - 90350B864DB1CA2678B84C3C /* 📦 Copy Pods Resources */, + C0CBA8B8375C2B2D2BCC25D5 /* [CP] Embed Pods Frameworks */, + 90350B864DB1CA2678B84C3C /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -215,9 +215,13 @@ TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; + DevelopmentTeam = YAY8QNNRBC; + LastSwiftMigration = 0800; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; + DevelopmentTeam = 3T3Q9PBUAH; + LastSwiftMigration = 0800; TestTargetID = 607FACCF1AFB9204008FA782; }; }; @@ -262,14 +266,14 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 47F352B51038106AFA540F00 /* 📦 Copy Pods Resources */ = { + 47F352B51038106AFA540F00 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -277,14 +281,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 73352EA91C8106DF91B88A58 /* 📦 Embed Pods Frameworks */ = { + 73352EA91C8106DF91B88A58 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Embed Pods Frameworks"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -292,14 +296,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 90350B864DB1CA2678B84C3C /* 📦 Copy Pods Resources */ = { + 90350B864DB1CA2678B84C3C /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -307,29 +311,29 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests-resources.sh\"\n"; showEnvVarsInLog = 0; }; - B4CA5D581390463C0038FB83 /* 📦 Check Pods Manifest.lock */ = { + B4CA5D581390463C0038FB83 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Check Pods Manifest.lock"; + 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 cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + 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; }; - C0CBA8B8375C2B2D2BCC25D5 /* 📦 Embed Pods Frameworks */ = { + C0CBA8B8375C2B2D2BCC25D5 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Embed Pods Frameworks"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -337,19 +341,19 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - F66F26A59919B9561B3FED2D /* 📦 Check Pods Manifest.lock */ = { + F66F26A59919B9561B3FED2D /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Check Pods Manifest.lock"; + 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 cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + 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; }; /* End PBXShellScriptBuildPhase section */ @@ -489,11 +493,13 @@ baseConfigurationReference = CDDEBB171A917374C426EDDF /* Pods-DialogView_Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = YAY8QNNRBC; INFOPLIST_FILE = DialogView/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -502,11 +508,13 @@ baseConfigurationReference = C6E3288F152D980F207E9701 /* Pods-DialogView_Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = YAY8QNNRBC; INFOPLIST_FILE = DialogView/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; }; name = Release; }; @@ -515,6 +523,7 @@ baseConfigurationReference = 32B4816DA5CEB8CAFEFE689A /* Pods-DialogView_Tests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; + DEVELOPMENT_TEAM = 3T3Q9PBUAH; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", @@ -527,6 +536,7 @@ 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 = 3.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DialogView_Example.app/DialogView_Example"; }; name = Debug; @@ -536,6 +546,7 @@ baseConfigurationReference = 51FD60226455F61677BEEAF6 /* Pods-DialogView_Tests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; + DEVELOPMENT_TEAM = 3T3Q9PBUAH; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", @@ -544,6 +555,7 @@ 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 = 3.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DialogView_Example.app/DialogView_Example"; }; name = Release; diff --git a/Example/DialogView/AppDelegate.swift b/Example/DialogView/AppDelegate.swift index a4da3b0..fa04fa3 100644 --- a/Example/DialogView/AppDelegate.swift +++ b/Example/DialogView/AppDelegate.swift @@ -15,30 +15,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } - func applicationWillResignActive(application: UIApplication) { + func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } - func applicationDidEnterBackground(application: UIApplication) { + func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - func applicationWillEnterForeground(application: UIApplication) { + func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } - func applicationDidBecomeActive(application: UIApplication) { + func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - func applicationWillTerminate(application: UIApplication) { + func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } diff --git a/Example/DialogView/ViewController.swift b/Example/DialogView/ViewController.swift index 86fea15..35e6c72 100644 --- a/Example/DialogView/ViewController.swift +++ b/Example/DialogView/ViewController.swift @@ -13,17 +13,17 @@ import DialogView class ViewController: UIViewController { - @IBAction func giveMeDialogView(sender: UIButton) { + @IBAction func giveMeDialogView(_ sender: UIButton) { let alert: DialogView = DialogView() alert.setTitle("Dialog Title") alert.setMessage("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque a augue eget felis dictum ultrices ac a arcu.") - let button: DialogButton = alert.addButton("Ok", type: .Done) - button.addTarget(self, action: "myAlertAction:", forControlEvents: .TouchUpInside) + let button: DialogButton = alert.addButton("Ok", type: .done) + button.addTarget(self, action: "myAlertAction:", for: .touchUpInside) alert.showInController(self) } - @IBAction func giveMeAdvancedDialogView(sender: UIButton) { + @IBAction func giveMeAdvancedDialogView(_ sender: UIButton) { let alert: DialogView = DialogView() var attr: [String: AnyObject] = [String: AnyObject](); @@ -33,20 +33,20 @@ class ViewController: UIViewController { attr[NSFontAttributeName] = UIFont.init(name: "HelveticaNeue-UltraLight", size: 14)! alert.setMessage("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque a augue eget felis dictum ultrices ac a arcu.", attributes: attr) - var button: DialogButton = alert.addButton("Accept", type: .Accept) - button.addTarget(self, action: "myAlertAction:", forControlEvents: .TouchUpInside) + var button: DialogButton = alert.addButton("Accept", type: .accept) + button.addTarget(self, action: #selector(ViewController.myAlertAction(_:)), for: .touchUpInside) button.titleLabel?.font = UIFont.init(name: "HelveticaNeue-Light", size: 14)! - button = alert.addButton("Delete", type: .Destruct) - button.addTarget(self, action: "myAlertAction:", forControlEvents: .TouchUpInside) + button = alert.addButton("Delete", type: .destruct) + button.addTarget(self, action: #selector(ViewController.myAlertAction(_:)), for: .touchUpInside) button.titleLabel?.font = UIFont.init(name: "HelveticaNeue-Light", size: 14)! - button = alert.addButton("Done", type: .Done) - button.addTarget(self, action: "myAlertAction:", forControlEvents: .TouchUpInside) + button = alert.addButton("Done", type: .done) + button.addTarget(self, action: #selector(ViewController.myAlertAction(_:)), for: .touchUpInside) button.titleLabel?.font = UIFont.init(name: "HelveticaNeue-Light", size: 14)! - button = alert.addButton("Default", type: .Default) - button.addTarget(self, action: "myAlertAction:", forControlEvents: .TouchUpInside) + button = alert.addButton("Default", type: .default) + button.addTarget(self, action: #selector(ViewController.myAlertAction(_:)), for: .touchUpInside) button.titleLabel?.font = UIFont.init(name: "HelveticaNeue-Light", size: 14)! alert.showInController(self) @@ -54,7 +54,7 @@ class ViewController: UIViewController { // MARK: Alert actions - func myAlertAction(sender: DialogButton) { + func myAlertAction(_ sender: DialogButton) { sender.dialogView.hide(true) } diff --git a/Example/Podfile b/Example/Podfile index a7599ea..03d0f3e 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -3,15 +3,11 @@ use_frameworks! target 'DialogView_Example' do pod 'DialogView', :path => '../' - pod 'SnapKit', '~> 0.20.0' + pod 'SnapKit', '~> 3.0' end target 'DialogView_Tests' do pod 'DialogView', :path => '../' -#pod 'Quick', '~> 0.8' -#pod 'Nimble', '~> 3.0' -#pod 'FBSnapshotTestCase' -#pod 'Nimble-Snapshots' - pod 'SnapKit', '~> 0.20.0' + pod 'SnapKit', '~> 3.0' end diff --git a/Example/Podfile.lock b/Example/Podfile.lock index cbdc36b..be0d1c7 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,20 +1,20 @@ PODS: - - DialogView (0.1.1): - - SnapKit (~> 0.20.0) - - SnapKit (0.20.0) + - DialogView (0.2.0): + - SnapKit (~> 3.0) + - SnapKit (3.0.0) DEPENDENCIES: - DialogView (from `../`) - - SnapKit (~> 0.20.0) + - SnapKit (~> 3.0) EXTERNAL SOURCES: DialogView: - :path: "../" + :path: ../ SPEC CHECKSUMS: - DialogView: 6ee9afb190d8916094196beae3f1ae7faa5bf071 - SnapKit: 5fce3c1bbbf1fbd31de9aa92f33eb9fa03f15650 + DialogView: 448410f7d30f60092bc62b98b072a61a8b80818f + SnapKit: 98af0a4e9369d3c58f758967518081dbdc7eb1d9 -PODFILE CHECKSUM: 745a7afc48ddc703d332f60a1e90a082b8f72f49 +PODFILE CHECKSUM: 56bad7dc7b58bee02e37a5b8dd070b76c0814759 -COCOAPODS: 1.0.0.beta.6 +COCOAPODS: 1.1.0.rc.2 diff --git a/Example/Pods/Local Podspecs/DialogView.podspec.json b/Example/Pods/Local Podspecs/DialogView.podspec.json index d25baa2..5b440d7 100644 --- a/Example/Pods/Local Podspecs/DialogView.podspec.json +++ b/Example/Pods/Local Podspecs/DialogView.podspec.json @@ -1,6 +1,6 @@ { "name": "DialogView", - "version": "0.1.1", + "version": "0.2.0", "summary": "Highly customisable dialog (alert) view made in swift.", "description": "You can customise pretty much anything prom inner paddings and margins to all colors and views. Please refer to the README.md for instructions", "homepage": "https://github.com/manGoweb/DialogView", @@ -14,7 +14,7 @@ }, "source": { "git": "https://github.com/manGoweb/DialogView.git", - "tag": "0.1.1" + "tag": "0.2.0" }, "social_media_url": "https://twitter.com/rafiki270", "platforms": { @@ -24,7 +24,7 @@ "source_files": "Pod/Classes/**/*", "dependencies": { "SnapKit": [ - "~> 0.20.0" + "~> 3.0" ] } } diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index cbdc36b..be0d1c7 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,20 +1,20 @@ PODS: - - DialogView (0.1.1): - - SnapKit (~> 0.20.0) - - SnapKit (0.20.0) + - DialogView (0.2.0): + - SnapKit (~> 3.0) + - SnapKit (3.0.0) DEPENDENCIES: - DialogView (from `../`) - - SnapKit (~> 0.20.0) + - SnapKit (~> 3.0) EXTERNAL SOURCES: DialogView: - :path: "../" + :path: ../ SPEC CHECKSUMS: - DialogView: 6ee9afb190d8916094196beae3f1ae7faa5bf071 - SnapKit: 5fce3c1bbbf1fbd31de9aa92f33eb9fa03f15650 + DialogView: 448410f7d30f60092bc62b98b072a61a8b80818f + SnapKit: 98af0a4e9369d3c58f758967518081dbdc7eb1d9 -PODFILE CHECKSUM: 745a7afc48ddc703d332f60a1e90a082b8f72f49 +PODFILE CHECKSUM: 56bad7dc7b58bee02e37a5b8dd070b76c0814759 -COCOAPODS: 1.0.0.beta.6 +COCOAPODS: 1.1.0.rc.2 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index c04d594..2598411 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,32 +7,51 @@ objects = { /* Begin PBXBuildFile section */ + 0173DCDAD65FC7B9D179244715BEF22C /* ConstraintView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E11295210FBB75091BE22529081A2720 /* ConstraintView+Extensions.swift */; }; 04818884023198FA9236BB33ACF2DF66 /* Pods-DialogView_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 78001BB7954D1B66404DDBD46FDE9059 /* Pods-DialogView_Tests-dummy.m */; }; - 0769E8C580C2DDFBBD5346882B6B602D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E57C2EDB004EA206806C110158AD3C71 /* Foundation.framework */; }; + 21A73F824B18E546F50F7D8B57495EA7 /* LayoutConstraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73878F9931EAA78C3DAAF7DDA048218E /* LayoutConstraint.swift */; }; 2E18127B6983E54807D33DF493A37C1A /* DialogView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2882F434DBA94B9DA05B9DABB9AA3678 /* DialogView-dummy.m */; }; 357E9D092C74CF372C92E6465D0726ED /* DialogView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CA9A53A33CC0ED88B4EC3117B55BFB3 /* DialogView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 37F3E35CE7EDF36D59EAC7AF16747BC2 /* Constraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C745F502C842A223464EC61885F02BB /* Constraint.swift */; }; - 389B87CBF8224A1A601B87386B626450 /* SnapKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 079E5EE3CDB090004C84E658BC83AEB7 /* SnapKit-dummy.m */; }; - 440EAD708ADB0C7BB5FDC5CD7CFE7751 /* ConstraintMaker.swift in Sources */ = {isa = PBXBuildFile; fileRef = A03EFFB295211A70F01FAD48D41DF5F3 /* ConstraintMaker.swift */; }; - 45F6C9CC7C5E13C113ACFFD762083BB7 /* Debugging.swift in Sources */ = {isa = PBXBuildFile; fileRef = 415D45FAC3D162C8D3F9CFE592F79E42 /* Debugging.swift */; }; + 3B2788BD70F40184F592DC4CF70EA107 /* ConstraintPriorityTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97F0138AE8EA08984375344610BE7E1E /* ConstraintPriorityTarget.swift */; }; + 440D368061A971CFF7E1D8EE95DE6915 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D1D10525428EE42117D40A1A64556D6 /* Foundation.framework */; }; + 4452F95BDE1BFB4DA22B8124F441C76C /* ConstraintDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FE15693153A62AC79B129BA5FFB7C3D /* ConstraintDSL.swift */; }; + 44882522574E897D7A7E69B37B35B1DF /* ConstraintMakerEditable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F8ECEBD49CA569FC524CB77465180B6 /* ConstraintMakerEditable.swift */; }; + 46737F9A8B5B12EEC8861F966FF61E7A /* ConstraintLayoutGuideDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 446C79107F482F7B2D7E4061657DCA44 /* ConstraintLayoutGuideDSL.swift */; }; 4EA72283A7B0853B647A1F77F0B5847A /* Pods-DialogView_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 44BCC97F411C44B46A9EEF153C5ED7C2 /* Pods-DialogView_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 61E9299C1337C938A97D00ED2B203F4C /* SnapKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 17ED37A4D4337C9AC445D07BA9E09051 /* SnapKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 753F424BD6E8F56B9D4C7B7AD6F04947 /* EdgeInsets.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C496DA4CA3F61B29BB063F74876C70 /* EdgeInsets.swift */; }; - 7A7535E04325887F24124849448D7F70 /* SnapKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EA1CFBED61FB63BBC905CD3AFEE402C /* SnapKit.swift */; }; - 7D5BED27F0064D6D2AE08B004227C815 /* View+SnapKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55BB547CA6D4862CCE70A4B51F1EABAE /* View+SnapKit.swift */; }; - 898488A438C4C36F3DAFDC4CDA728CFF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E57C2EDB004EA206806C110158AD3C71 /* Foundation.framework */; }; - A1795A53343F952EE0E61537F942DFE7 /* ConstraintRelation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92DD83C2BF9A16815558CBFACD79C938 /* ConstraintRelation.swift */; }; - A37673EEA9015F9DA15807C3138E9CA6 /* ViewController+SnapKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A877C5C14A8B495ECAB69BE839FFA44 /* ViewController+SnapKit.swift */; }; + 57E60F7B334EFF2259A81548F61EC3C4 /* UILayoutSupport+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AB21FA0A2E5B45AB133215CC241236D /* UILayoutSupport+Extensions.swift */; }; + 58AE8BDEB41471B0B08CF67D8EC0B1F1 /* ConstraintMakerPriortizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 261BC3C65CE6EBBED920977848212F6F /* ConstraintMakerPriortizable.swift */; }; + 5B60FDE8AA66C72B0EA783AE4AD209DC /* ConstraintViewDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B78113584563565B18CD0248D9D0A93 /* ConstraintViewDSL.swift */; }; + 5E516D7C4C32D16432B621EAE61A5D0A /* Debugging.swift in Sources */ = {isa = PBXBuildFile; fileRef = 737B1700C2C19AD11C2872C1C46EC8D4 /* Debugging.swift */; }; + 6026162CE9CF69109A07F68476E8E987 /* ConstraintMakerFinalizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8AA583273C076DD4A1EBAFDDA0E89A8 /* ConstraintMakerFinalizable.swift */; }; + 61E9299C1337C938A97D00ED2B203F4C /* SnapKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 50BF4E341DC91F918DC3DD74CA4ADC22 /* SnapKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 65115A59E747F3887E4C68CD83E14123 /* ConstraintDescription.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB70FEBA9EF66CAAA461E6F3F819716B /* ConstraintDescription.swift */; }; + 75006919CAABF0D9AD29E09B2011D91C /* ConstraintMaker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A6167E299BA9862893D87DDBF170B70 /* ConstraintMaker.swift */; }; + 753384B95C202A7293794A9D8C24743D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D1D10525428EE42117D40A1A64556D6 /* Foundation.framework */; }; + 7D761328B14DFB9F0F5E6A23E39F8BAB /* ConstraintConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 597734A7EDE6E13F6D1939A7C7373CD1 /* ConstraintConfig.swift */; }; + 82653E481D3B76577F1EE15275D967CE /* ConstraintInsets.swift in Sources */ = {isa = PBXBuildFile; fileRef = E855200DC6085FF07EBD87301AD370C9 /* ConstraintInsets.swift */; }; + 9AA34BA318AE4B4E7505F0AAB901A4F3 /* UILayoutGuide+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B4759EEB4180EAF3DA189AAE28199AC /* UILayoutGuide+Extensions.swift */; }; + 9B211854541B4028305A31E78A315789 /* ConstraintLayoutSupportDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CC7FF80150FA3840AD57BCE994C9FAB /* ConstraintLayoutSupportDSL.swift */; }; + 9C3A37658BA02CCE01E86D327788C7A1 /* ConstraintLayoutSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212E2771F1CD458D21A0FB3CA1C914F3 /* ConstraintLayoutSupport.swift */; }; + A452EEF622ECFFC0337237DBB96702BD /* ConstraintInsetTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F2B728DCF7E9F88008827314C2AE823 /* ConstraintInsetTarget.swift */; }; AC1182998046B6764103F316B993DDFE /* Pods-DialogView_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E64D0ED5812303DB6873DF0E896FE425 /* Pods-DialogView_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BCF855621283FA16949D96CAA986CF41 /* ConstraintItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7ED5648C0C88C2BBB8B1737D3C811DF /* ConstraintItem.swift */; }; + ACC34A814FED725723ABD46B5A3037C3 /* ConstraintOffsetTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF1BDEFD46348EE8C41DE053AEDBFD1B /* ConstraintOffsetTarget.swift */; }; + B156B8D96DDFE1791E44AB9DCDC95AF1 /* ConstraintConstantTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9319AF949935BC0602093E0830E8B10 /* ConstraintConstantTarget.swift */; }; + B4AE2CA74D08D06D5CEE9172374BDB3A /* SnapKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F675DF8551ECAD72F0C6D96084C6DD4 /* SnapKit-dummy.m */; }; + B96ACDAEC5BCBDB398752E5BB54E7777 /* ConstraintMakerRelatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87CCF4DB7EFBDC070B92BFC0BC0D2C8C /* ConstraintMakerRelatable.swift */; }; + BCEAE53ED58E68605210978164E5223C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D1D10525428EE42117D40A1A64556D6 /* Foundation.framework */; }; + BFFB3124B9F6AADCCBC697F4ED3E076B /* ConstraintAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041C7DFD4E40027278BABCCCD69743B2 /* ConstraintAttributes.swift */; }; C2247C375918672415C338477575BF42 /* DialogView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8704C36A3D4544882CB1345265152732 /* DialogView.swift */; }; - D2DF4F8E11FDBFABFD96F05C0F4E6613 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E57C2EDB004EA206806C110158AD3C71 /* Foundation.framework */; }; - D3ADC2DE63BF016A3C10E19ACE1B0B55 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E57C2EDB004EA206806C110158AD3C71 /* Foundation.framework */; }; - D822A05F7554760BD437199629FE1807 /* LayoutConstraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = B869919EAC3B1E5EF05B0107B595C13C /* LayoutConstraint.swift */; }; - E367A4EFCE0A0A39C38A00D299E44B54 /* ConstraintAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEFB846E6A499B21514C1E298F56DE3B /* ConstraintAttributes.swift */; }; + C58AA8E95D01709073C07921D40CC3DF /* Constraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B90EF7CA55AE01CE50EAF5C3C574CDD /* Constraint.swift */; }; + CBD97442E640A408C23FC5A449101AAD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D1D10525428EE42117D40A1A64556D6 /* Foundation.framework */; }; + E00D4CB74DD20F447866D75234C1FCB5 /* ConstraintView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBCF77FFA89397B4F19B5CD8A7BDB0A3 /* ConstraintView.swift */; }; + E4A7028E784A7A45BBC5807E222EAE44 /* ConstraintMakerExtendable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8705AFD8FF18225FA8BB0228A69E72AA /* ConstraintMakerExtendable.swift */; }; E97B127B3077FB173300B72B3553C3FE /* SnapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C42E6B36692CB79785C933E25719FA6F /* SnapKit.framework */; }; + EAD34AAA6E6A1EAEED885694D100D25C /* ConstraintMultiplierTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0729DC38B02A17974FD7A7238FCB1836 /* ConstraintMultiplierTarget.swift */; }; + EE666E39DD768A72DCAEC0EA3B113118 /* ConstraintRelatableTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 813C2A5263E149C889A2DF40FFDD89BA /* ConstraintRelatableTarget.swift */; }; + EE997C236118F16F1BF18E8BEE498CEB /* ConstraintRelation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4C807430C3A7B9A82E2DDD844C58759 /* ConstraintRelation.swift */; }; F43198CBA41AAC73B9C4AA33CFC4A96C /* Pods-DialogView_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C01EA80776A6118ABB04FEBC5F94287A /* Pods-DialogView_Example-dummy.m */; }; - FD716D17FABA2CB7C27AA1F324366854 /* ConstraintDescription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3061A45F7542E986BCB23EBBD8AD4A13 /* ConstraintDescription.swift */; }; + F69EDC85248137F40ACC9ABBB7D72634 /* ConstraintItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BEA23F4393572EE30AED50A651CD185 /* ConstraintItem.swift */; }; + FACF03E9C5A87AADB0A60E6B28DE2C64 /* ConstraintLayoutGuide.swift in Sources */ = {isa = PBXBuildFile; fileRef = B525F7008B3760076D71FE29C0859BDC /* ConstraintLayoutGuide.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -74,55 +93,74 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 041C7DFD4E40027278BABCCCD69743B2 /* ConstraintAttributes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintAttributes.swift; path = Source/ConstraintAttributes.swift; sourceTree = ""; }; 04FDB1D927DB2042BCBBBB0873E72A0B /* Pods-DialogView_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DialogView_Example.release.xcconfig"; sourceTree = ""; }; - 079E5EE3CDB090004C84E658BC83AEB7 /* SnapKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SnapKit-dummy.m"; sourceTree = ""; }; + 0729DC38B02A17974FD7A7238FCB1836 /* ConstraintMultiplierTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMultiplierTarget.swift; path = Source/ConstraintMultiplierTarget.swift; sourceTree = ""; }; 0A7F152DC4DD0E75398A2C7F24239E5C /* Pods_DialogView_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DialogView_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 0AB21FA0A2E5B45AB133215CC241236D /* UILayoutSupport+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UILayoutSupport+Extensions.swift"; path = "Source/UILayoutSupport+Extensions.swift"; sourceTree = ""; }; 0AD97FC1281CBE06BED94E8041E0E006 /* DialogView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = DialogView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 17ED37A4D4337C9AC445D07BA9E09051 /* SnapKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SnapKit-umbrella.h"; sourceTree = ""; }; - 1A877C5C14A8B495ECAB69BE839FFA44 /* ViewController+SnapKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ViewController+SnapKit.swift"; path = "Source/ViewController+SnapKit.swift"; sourceTree = ""; }; - 1EA1CFBED61FB63BBC905CD3AFEE402C /* SnapKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SnapKit.swift; path = Source/SnapKit.swift; sourceTree = ""; }; + 14426FA5248A96FBC6A531879E24CFA5 /* SnapKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SnapKit-prefix.pch"; sourceTree = ""; }; + 1F2B728DCF7E9F88008827314C2AE823 /* ConstraintInsetTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintInsetTarget.swift; path = Source/ConstraintInsetTarget.swift; sourceTree = ""; }; + 212E2771F1CD458D21A0FB3CA1C914F3 /* ConstraintLayoutSupport.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutSupport.swift; path = Source/ConstraintLayoutSupport.swift; sourceTree = ""; }; + 261BC3C65CE6EBBED920977848212F6F /* ConstraintMakerPriortizable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerPriortizable.swift; path = Source/ConstraintMakerPriortizable.swift; sourceTree = ""; }; 2882F434DBA94B9DA05B9DABB9AA3678 /* DialogView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "DialogView-dummy.m"; sourceTree = ""; }; 2D05333E092154D1684FBD07B4F84770 /* Pods-DialogView_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-DialogView_Example-acknowledgements.plist"; sourceTree = ""; }; 2FE0A7A99C8BD220915F31C50288A5ED /* Pods-DialogView_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DialogView_Tests-resources.sh"; sourceTree = ""; }; - 3061A45F7542E986BCB23EBBD8AD4A13 /* ConstraintDescription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintDescription.swift; path = Source/ConstraintDescription.swift; sourceTree = ""; }; - 415D45FAC3D162C8D3F9CFE592F79E42 /* Debugging.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debugging.swift; path = Source/Debugging.swift; sourceTree = ""; }; + 3A6167E299BA9862893D87DDBF170B70 /* ConstraintMaker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMaker.swift; path = Source/ConstraintMaker.swift; sourceTree = ""; }; + 3B90EF7CA55AE01CE50EAF5C3C574CDD /* Constraint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Constraint.swift; path = Source/Constraint.swift; sourceTree = ""; }; + 3FE15693153A62AC79B129BA5FFB7C3D /* ConstraintDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintDSL.swift; path = Source/ConstraintDSL.swift; sourceTree = ""; }; + 446C79107F482F7B2D7E4061657DCA44 /* ConstraintLayoutGuideDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutGuideDSL.swift; path = Source/ConstraintLayoutGuideDSL.swift; sourceTree = ""; }; 44BCC97F411C44B46A9EEF153C5ED7C2 /* Pods-DialogView_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-DialogView_Tests-umbrella.h"; sourceTree = ""; }; - 495929FB6F57FC07CF2233838AD92579 /* SnapKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SnapKit-prefix.pch"; sourceTree = ""; }; 4BDF132FE6914CCE68921AD703EAFBAE /* DialogView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = DialogView.xcconfig; sourceTree = ""; }; - 55BB547CA6D4862CCE70A4B51F1EABAE /* View+SnapKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "View+SnapKit.swift"; path = "Source/View+SnapKit.swift"; sourceTree = ""; }; - 56B1FCA085C2AC4CDCEB52E3588F26EB /* SnapKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = SnapKit.modulemap; sourceTree = ""; }; + 4D1D10525428EE42117D40A1A64556D6 /* 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; }; + 50BF4E341DC91F918DC3DD74CA4ADC22 /* SnapKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SnapKit-umbrella.h"; sourceTree = ""; }; + 597734A7EDE6E13F6D1939A7C7373CD1 /* ConstraintConfig.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintConfig.swift; path = Source/ConstraintConfig.swift; sourceTree = ""; }; 5C013806E598F93E09A5296992173E3C /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5CA9A53A33CC0ED88B4EC3117B55BFB3 /* DialogView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "DialogView-umbrella.h"; sourceTree = ""; }; 613A2B2CA97097BF3E5B95EB2176F05A /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6CC7FF80150FA3840AD57BCE994C9FAB /* ConstraintLayoutSupportDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutSupportDSL.swift; path = Source/ConstraintLayoutSupportDSL.swift; sourceTree = ""; }; + 737B1700C2C19AD11C2872C1C46EC8D4 /* Debugging.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debugging.swift; path = Source/Debugging.swift; sourceTree = ""; }; + 73878F9931EAA78C3DAAF7DDA048218E /* LayoutConstraint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutConstraint.swift; path = Source/LayoutConstraint.swift; sourceTree = ""; }; 78001BB7954D1B66404DDBD46FDE9059 /* Pods-DialogView_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-DialogView_Tests-dummy.m"; sourceTree = ""; }; 7A17D171D8EE2D9D365C6DE9D808BDBD /* Pods-DialogView_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-DialogView_Example-acknowledgements.markdown"; sourceTree = ""; }; + 7B4759EEB4180EAF3DA189AAE28199AC /* UILayoutGuide+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UILayoutGuide+Extensions.swift"; path = "Source/UILayoutGuide+Extensions.swift"; sourceTree = ""; }; + 7BEA23F4393572EE30AED50A651CD185 /* ConstraintItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintItem.swift; path = Source/ConstraintItem.swift; sourceTree = ""; }; 7ED179AFBC9AAF5069A9D591791F3BC9 /* Pods-DialogView_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DialogView_Example-resources.sh"; sourceTree = ""; }; + 813C2A5263E149C889A2DF40FFDD89BA /* ConstraintRelatableTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintRelatableTarget.swift; path = Source/ConstraintRelatableTarget.swift; sourceTree = ""; }; 8704C36A3D4544882CB1345265152732 /* DialogView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DialogView.swift; sourceTree = ""; }; + 8705AFD8FF18225FA8BB0228A69E72AA /* ConstraintMakerExtendable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerExtendable.swift; path = Source/ConstraintMakerExtendable.swift; sourceTree = ""; }; + 87CCF4DB7EFBDC070B92BFC0BC0D2C8C /* ConstraintMakerRelatable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerRelatable.swift; path = Source/ConstraintMakerRelatable.swift; sourceTree = ""; }; + 8B78113584563565B18CD0248D9D0A93 /* ConstraintViewDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintViewDSL.swift; path = Source/ConstraintViewDSL.swift; sourceTree = ""; }; 8DB3E813B6B2D7790860E22E6B7FAAA3 /* Pods-DialogView_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DialogView_Tests-frameworks.sh"; sourceTree = ""; }; - 90D8599FCFCA98DB19D3DE0AD81D9CD6 /* SnapKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SnapKit.xcconfig; sourceTree = ""; }; - 92DD83C2BF9A16815558CBFACD79C938 /* ConstraintRelation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintRelation.swift; path = Source/ConstraintRelation.swift; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9C745F502C842A223464EC61885F02BB /* Constraint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Constraint.swift; path = Source/Constraint.swift; sourceTree = ""; }; + 97F0138AE8EA08984375344610BE7E1E /* ConstraintPriorityTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintPriorityTarget.swift; path = Source/ConstraintPriorityTarget.swift; sourceTree = ""; }; 9F06AEE4485BFCCADC378F6886D5A4D6 /* Pods_DialogView_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DialogView_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A03EFFB295211A70F01FAD48D41DF5F3 /* ConstraintMaker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMaker.swift; path = Source/ConstraintMaker.swift; sourceTree = ""; }; + 9F675DF8551ECAD72F0C6D96084C6DD4 /* SnapKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SnapKit-dummy.m"; sourceTree = ""; }; + 9F8ECEBD49CA569FC524CB77465180B6 /* ConstraintMakerEditable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerEditable.swift; path = Source/ConstraintMakerEditable.swift; sourceTree = ""; }; A799E835925C1F6A5D3187ED4442D86C /* Pods-DialogView_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-DialogView_Tests.modulemap"; sourceTree = ""; }; - A7C496DA4CA3F61B29BB063F74876C70 /* EdgeInsets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EdgeInsets.swift; path = Source/EdgeInsets.swift; sourceTree = ""; }; - A804ABA92EC1DA52844E140917F08DF4 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + AF1BDEFD46348EE8C41DE053AEDBFD1B /* ConstraintOffsetTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintOffsetTarget.swift; path = Source/ConstraintOffsetTarget.swift; sourceTree = ""; }; B22E3EE058A526FA75634A8F04D7E458 /* Pods-DialogView_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-DialogView_Example.modulemap"; sourceTree = ""; }; - B869919EAC3B1E5EF05B0107B595C13C /* LayoutConstraint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutConstraint.swift; path = Source/LayoutConstraint.swift; sourceTree = ""; }; + B525F7008B3760076D71FE29C0859BDC /* ConstraintLayoutGuide.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutGuide.swift; path = Source/ConstraintLayoutGuide.swift; sourceTree = ""; }; + B7D4645BD3C0100FB7E1B4A6FDC96E0B /* SnapKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = SnapKit.modulemap; sourceTree = ""; }; B8EE7ADC5AD0F30E6FAA0D057583858D /* DialogView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "DialogView-prefix.pch"; sourceTree = ""; }; C01EA80776A6118ABB04FEBC5F94287A /* Pods-DialogView_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-DialogView_Example-dummy.m"; sourceTree = ""; }; C42E6B36692CB79785C933E25719FA6F /* SnapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SnapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C4C807430C3A7B9A82E2DDD844C58759 /* ConstraintRelation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintRelation.swift; path = Source/ConstraintRelation.swift; sourceTree = ""; }; C5E72AC36B44838CD1359AE23A0EA14F /* Pods-DialogView_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DialogView_Tests.debug.xcconfig"; sourceTree = ""; }; + CA274E8C59BA433F4975D535FA594EFA /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + CB70FEBA9EF66CAAA461E6F3F819716B /* ConstraintDescription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintDescription.swift; path = Source/ConstraintDescription.swift; sourceTree = ""; }; + D8AA583273C076DD4A1EBAFDDA0E89A8 /* ConstraintMakerFinalizable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerFinalizable.swift; path = Source/ConstraintMakerFinalizable.swift; sourceTree = ""; }; DDE1DDA63C3501A9A23F61DBE1FA81BE /* SnapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SnapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - DEFB846E6A499B21514C1E298F56DE3B /* ConstraintAttributes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintAttributes.swift; path = Source/ConstraintAttributes.swift; sourceTree = ""; }; - E57C2EDB004EA206806C110158AD3C71 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + E11295210FBB75091BE22529081A2720 /* ConstraintView+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ConstraintView+Extensions.swift"; path = "Source/ConstraintView+Extensions.swift"; sourceTree = ""; }; E584FB2A87280FD668A990D4B78621DE /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; E64D0ED5812303DB6873DF0E896FE425 /* Pods-DialogView_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-DialogView_Example-umbrella.h"; sourceTree = ""; }; - E7ED5648C0C88C2BBB8B1737D3C811DF /* ConstraintItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintItem.swift; path = Source/ConstraintItem.swift; sourceTree = ""; }; + E855200DC6085FF07EBD87301AD370C9 /* ConstraintInsets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintInsets.swift; path = Source/ConstraintInsets.swift; sourceTree = ""; }; + E885DC7A2C93B352F3CCBAF6C4F30F7F /* SnapKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SnapKit.xcconfig; sourceTree = ""; }; + EBCF77FFA89397B4F19B5CD8A7BDB0A3 /* ConstraintView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintView.swift; path = Source/ConstraintView.swift; sourceTree = ""; }; F07C84FB6ED2E6EC60B8C23061405432 /* Pods-DialogView_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-DialogView_Tests-acknowledgements.markdown"; sourceTree = ""; }; F2F8179D541822FD802B61270D08431D /* DialogView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = DialogView.modulemap; sourceTree = ""; }; F5FA3CFF104B72810C8A47DD92023C5F /* Pods-DialogView_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DialogView_Example.debug.xcconfig"; sourceTree = ""; }; + F9319AF949935BC0602093E0830E8B10 /* ConstraintConstantTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintConstantTarget.swift; path = Source/ConstraintConstantTarget.swift; sourceTree = ""; }; F9A9DEAE3862E7469472D7F704B17A0A /* Pods-DialogView_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-DialogView_Tests-acknowledgements.plist"; sourceTree = ""; }; FDE5720EA64A3355460F9B30000C7C35 /* Pods-DialogView_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DialogView_Example-frameworks.sh"; sourceTree = ""; }; FE36C9E60FC61F39D27D006516BFD9E1 /* Pods-DialogView_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DialogView_Tests.release.xcconfig"; sourceTree = ""; }; @@ -133,7 +171,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 898488A438C4C36F3DAFDC4CDA728CFF /* Foundation.framework in Frameworks */, + 753384B95C202A7293794A9D8C24743D /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -141,7 +179,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0769E8C580C2DDFBBD5346882B6B602D /* Foundation.framework in Frameworks */, + BCEAE53ED58E68605210978164E5223C /* Foundation.framework in Frameworks */, E97B127B3077FB173300B72B3553C3FE /* SnapKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -150,7 +188,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D3ADC2DE63BF016A3C10E19ACE1B0B55 /* Foundation.framework in Frameworks */, + 440D368061A971CFF7E1D8EE95DE6915 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -158,7 +196,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D2DF4F8E11FDBFABFD96F05C0F4E6613 /* Foundation.framework in Frameworks */, + CBD97442E640A408C23FC5A449101AAD /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -173,6 +211,45 @@ name = "Development Pods"; sourceTree = ""; }; + 05703C849B29D1EF8195C8FE0EC6AF9E /* SnapKit */ = { + isa = PBXGroup; + children = ( + 3B90EF7CA55AE01CE50EAF5C3C574CDD /* Constraint.swift */, + 041C7DFD4E40027278BABCCCD69743B2 /* ConstraintAttributes.swift */, + 597734A7EDE6E13F6D1939A7C7373CD1 /* ConstraintConfig.swift */, + F9319AF949935BC0602093E0830E8B10 /* ConstraintConstantTarget.swift */, + CB70FEBA9EF66CAAA461E6F3F819716B /* ConstraintDescription.swift */, + 3FE15693153A62AC79B129BA5FFB7C3D /* ConstraintDSL.swift */, + E855200DC6085FF07EBD87301AD370C9 /* ConstraintInsets.swift */, + 1F2B728DCF7E9F88008827314C2AE823 /* ConstraintInsetTarget.swift */, + 7BEA23F4393572EE30AED50A651CD185 /* ConstraintItem.swift */, + B525F7008B3760076D71FE29C0859BDC /* ConstraintLayoutGuide.swift */, + 446C79107F482F7B2D7E4061657DCA44 /* ConstraintLayoutGuideDSL.swift */, + 212E2771F1CD458D21A0FB3CA1C914F3 /* ConstraintLayoutSupport.swift */, + 6CC7FF80150FA3840AD57BCE994C9FAB /* ConstraintLayoutSupportDSL.swift */, + 3A6167E299BA9862893D87DDBF170B70 /* ConstraintMaker.swift */, + 9F8ECEBD49CA569FC524CB77465180B6 /* ConstraintMakerEditable.swift */, + 8705AFD8FF18225FA8BB0228A69E72AA /* ConstraintMakerExtendable.swift */, + D8AA583273C076DD4A1EBAFDDA0E89A8 /* ConstraintMakerFinalizable.swift */, + 261BC3C65CE6EBBED920977848212F6F /* ConstraintMakerPriortizable.swift */, + 87CCF4DB7EFBDC070B92BFC0BC0D2C8C /* ConstraintMakerRelatable.swift */, + 0729DC38B02A17974FD7A7238FCB1836 /* ConstraintMultiplierTarget.swift */, + AF1BDEFD46348EE8C41DE053AEDBFD1B /* ConstraintOffsetTarget.swift */, + 97F0138AE8EA08984375344610BE7E1E /* ConstraintPriorityTarget.swift */, + 813C2A5263E149C889A2DF40FFDD89BA /* ConstraintRelatableTarget.swift */, + C4C807430C3A7B9A82E2DDD844C58759 /* ConstraintRelation.swift */, + EBCF77FFA89397B4F19B5CD8A7BDB0A3 /* ConstraintView.swift */, + E11295210FBB75091BE22529081A2720 /* ConstraintView+Extensions.swift */, + 8B78113584563565B18CD0248D9D0A93 /* ConstraintViewDSL.swift */, + 737B1700C2C19AD11C2872C1C46EC8D4 /* Debugging.swift */, + 73878F9931EAA78C3DAAF7DDA048218E /* LayoutConstraint.swift */, + 7B4759EEB4180EAF3DA189AAE28199AC /* UILayoutGuide+Extensions.swift */, + 0AB21FA0A2E5B45AB133215CC241236D /* UILayoutSupport+Extensions.swift */, + 458932A7F6390E9028454F0A27A50A13 /* Support Files */, + ); + path = SnapKit; + sourceTree = ""; + }; 18C4E8E07F572AAEE3709513D10350B9 /* Pods-DialogView_Tests */ = { isa = PBXGroup; children = ( @@ -191,21 +268,27 @@ path = "Target Support Files/Pods-DialogView_Tests"; sourceTree = ""; }; - 19855AB75FC2AACD2FEB47809A31C0E7 /* iOS */ = { + 2C4174DCBAEBB6C6B93B625680EF0251 /* Targets Support Files */ = { isa = PBXGroup; children = ( - E57C2EDB004EA206806C110158AD3C71 /* Foundation.framework */, + A39EA5ED06274C933CCEBB405BB3D082 /* Pods-DialogView_Example */, + 18C4E8E07F572AAEE3709513D10350B9 /* Pods-DialogView_Tests */, ); - name = iOS; + name = "Targets Support Files"; sourceTree = ""; }; - 2C4174DCBAEBB6C6B93B625680EF0251 /* Targets Support Files */ = { + 458932A7F6390E9028454F0A27A50A13 /* Support Files */ = { isa = PBXGroup; children = ( - A39EA5ED06274C933CCEBB405BB3D082 /* Pods-DialogView_Example */, - 18C4E8E07F572AAEE3709513D10350B9 /* Pods-DialogView_Tests */, + CA274E8C59BA433F4975D535FA594EFA /* Info.plist */, + B7D4645BD3C0100FB7E1B4A6FDC96E0B /* SnapKit.modulemap */, + E885DC7A2C93B352F3CCBAF6C4F30F7F /* SnapKit.xcconfig */, + 9F675DF8551ECAD72F0C6D96084C6DD4 /* SnapKit-dummy.m */, + 14426FA5248A96FBC6A531879E24CFA5 /* SnapKit-prefix.pch */, + 50BF4E341DC91F918DC3DD74CA4ADC22 /* SnapKit-umbrella.h */, ); - name = "Targets Support Files"; + name = "Support Files"; + path = "../Target Support Files/SnapKit"; sourceTree = ""; }; 5733D2D3A6936AB57D95C2CB6E4C97CA /* Support Files */ = { @@ -222,18 +305,12 @@ path = "Example/Pods/Target Support Files/DialogView"; sourceTree = ""; }; - 7A30ADABC44CCA0D9BC282B82A6F71FB /* Support Files */ = { + 7BD5C0E670D2006F5A5363B366998FC5 /* iOS */ = { isa = PBXGroup; children = ( - A804ABA92EC1DA52844E140917F08DF4 /* Info.plist */, - 56B1FCA085C2AC4CDCEB52E3588F26EB /* SnapKit.modulemap */, - 90D8599FCFCA98DB19D3DE0AD81D9CD6 /* SnapKit.xcconfig */, - 079E5EE3CDB090004C84E658BC83AEB7 /* SnapKit-dummy.m */, - 495929FB6F57FC07CF2233838AD92579 /* SnapKit-prefix.pch */, - 17ED37A4D4337C9AC445D07BA9E09051 /* SnapKit-umbrella.h */, + 4D1D10525428EE42117D40A1A64556D6 /* Foundation.framework */, ); - name = "Support Files"; - path = "../Target Support Files/SnapKit"; + name = iOS; sourceTree = ""; }; 7DB346D0F39D3F0E887471402A8071AB = { @@ -242,7 +319,7 @@ 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 02A5E4F973FCCD673B8C579AC3F8C158 /* Development Pods */, D8B25C6DF01BE2C3F2FA6A25AEE6417A /* Frameworks */, - AAD880A40C1D678CA44C4575218EDE0E /* Pods */, + FCB3E800ADEFE141C46C6B85E298DF53 /* Pods */, F15485668EC4057B540B47F86D1E005A /* Products */, 2C4174DCBAEBB6C6B93B625680EF0251 /* Targets Support Files */, ); @@ -284,39 +361,11 @@ path = ../..; sourceTree = ""; }; - AAD880A40C1D678CA44C4575218EDE0E /* Pods */ = { - isa = PBXGroup; - children = ( - B3254E0B2B4708A89CF556DF239CDBA9 /* SnapKit */, - ); - name = Pods; - sourceTree = ""; - }; - B3254E0B2B4708A89CF556DF239CDBA9 /* SnapKit */ = { - isa = PBXGroup; - children = ( - 9C745F502C842A223464EC61885F02BB /* Constraint.swift */, - DEFB846E6A499B21514C1E298F56DE3B /* ConstraintAttributes.swift */, - 3061A45F7542E986BCB23EBBD8AD4A13 /* ConstraintDescription.swift */, - E7ED5648C0C88C2BBB8B1737D3C811DF /* ConstraintItem.swift */, - A03EFFB295211A70F01FAD48D41DF5F3 /* ConstraintMaker.swift */, - 92DD83C2BF9A16815558CBFACD79C938 /* ConstraintRelation.swift */, - 415D45FAC3D162C8D3F9CFE592F79E42 /* Debugging.swift */, - A7C496DA4CA3F61B29BB063F74876C70 /* EdgeInsets.swift */, - B869919EAC3B1E5EF05B0107B595C13C /* LayoutConstraint.swift */, - 1EA1CFBED61FB63BBC905CD3AFEE402C /* SnapKit.swift */, - 55BB547CA6D4862CCE70A4B51F1EABAE /* View+SnapKit.swift */, - 1A877C5C14A8B495ECAB69BE839FFA44 /* ViewController+SnapKit.swift */, - 7A30ADABC44CCA0D9BC282B82A6F71FB /* Support Files */, - ); - path = SnapKit; - sourceTree = ""; - }; D8B25C6DF01BE2C3F2FA6A25AEE6417A /* Frameworks */ = { isa = PBXGroup; children = ( C42E6B36692CB79785C933E25719FA6F /* SnapKit.framework */, - 19855AB75FC2AACD2FEB47809A31C0E7 /* iOS */, + 7BD5C0E670D2006F5A5363B366998FC5 /* iOS */, ); name = Frameworks; sourceTree = ""; @@ -340,6 +389,14 @@ name = Products; sourceTree = ""; }; + FCB3E800ADEFE141C46C6B85E298DF53 /* Pods */ = { + isa = PBXGroup; + children = ( + 05703C849B29D1EF8195C8FE0EC6AF9E /* SnapKit */, + ); + name = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -401,7 +458,7 @@ isa = PBXNativeTarget; buildConfigurationList = 61A5511E5BE0D6D41AD9A6F840B802C2 /* Build configuration list for PBXNativeTarget "SnapKit" */; buildPhases = ( - 6310585D28342943279D9E16C1998DA2 /* Sources */, + E544E0124CE7362349EF52CDD2D60D81 /* Sources */, 1CA4F34E27EF861842DAEF83D058EEA8 /* Frameworks */, A786B8B129892F172DCBDF817A0E8B6E /* Headers */, ); @@ -457,8 +514,8 @@ D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0730; + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0700; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -506,23 +563,42 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 6310585D28342943279D9E16C1998DA2 /* Sources */ = { + E544E0124CE7362349EF52CDD2D60D81 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 37F3E35CE7EDF36D59EAC7AF16747BC2 /* Constraint.swift in Sources */, - E367A4EFCE0A0A39C38A00D299E44B54 /* ConstraintAttributes.swift in Sources */, - FD716D17FABA2CB7C27AA1F324366854 /* ConstraintDescription.swift in Sources */, - BCF855621283FA16949D96CAA986CF41 /* ConstraintItem.swift in Sources */, - 440EAD708ADB0C7BB5FDC5CD7CFE7751 /* ConstraintMaker.swift in Sources */, - A1795A53343F952EE0E61537F942DFE7 /* ConstraintRelation.swift in Sources */, - 45F6C9CC7C5E13C113ACFFD762083BB7 /* Debugging.swift in Sources */, - 753F424BD6E8F56B9D4C7B7AD6F04947 /* EdgeInsets.swift in Sources */, - D822A05F7554760BD437199629FE1807 /* LayoutConstraint.swift in Sources */, - 389B87CBF8224A1A601B87386B626450 /* SnapKit-dummy.m in Sources */, - 7A7535E04325887F24124849448D7F70 /* SnapKit.swift in Sources */, - 7D5BED27F0064D6D2AE08B004227C815 /* View+SnapKit.swift in Sources */, - A37673EEA9015F9DA15807C3138E9CA6 /* ViewController+SnapKit.swift in Sources */, + C58AA8E95D01709073C07921D40CC3DF /* Constraint.swift in Sources */, + BFFB3124B9F6AADCCBC697F4ED3E076B /* ConstraintAttributes.swift in Sources */, + 7D761328B14DFB9F0F5E6A23E39F8BAB /* ConstraintConfig.swift in Sources */, + B156B8D96DDFE1791E44AB9DCDC95AF1 /* ConstraintConstantTarget.swift in Sources */, + 65115A59E747F3887E4C68CD83E14123 /* ConstraintDescription.swift in Sources */, + 4452F95BDE1BFB4DA22B8124F441C76C /* ConstraintDSL.swift in Sources */, + 82653E481D3B76577F1EE15275D967CE /* ConstraintInsets.swift in Sources */, + A452EEF622ECFFC0337237DBB96702BD /* ConstraintInsetTarget.swift in Sources */, + F69EDC85248137F40ACC9ABBB7D72634 /* ConstraintItem.swift in Sources */, + FACF03E9C5A87AADB0A60E6B28DE2C64 /* ConstraintLayoutGuide.swift in Sources */, + 46737F9A8B5B12EEC8861F966FF61E7A /* ConstraintLayoutGuideDSL.swift in Sources */, + 9C3A37658BA02CCE01E86D327788C7A1 /* ConstraintLayoutSupport.swift in Sources */, + 9B211854541B4028305A31E78A315789 /* ConstraintLayoutSupportDSL.swift in Sources */, + 75006919CAABF0D9AD29E09B2011D91C /* ConstraintMaker.swift in Sources */, + 44882522574E897D7A7E69B37B35B1DF /* ConstraintMakerEditable.swift in Sources */, + E4A7028E784A7A45BBC5807E222EAE44 /* ConstraintMakerExtendable.swift in Sources */, + 6026162CE9CF69109A07F68476E8E987 /* ConstraintMakerFinalizable.swift in Sources */, + 58AE8BDEB41471B0B08CF67D8EC0B1F1 /* ConstraintMakerPriortizable.swift in Sources */, + B96ACDAEC5BCBDB398752E5BB54E7777 /* ConstraintMakerRelatable.swift in Sources */, + EAD34AAA6E6A1EAEED885694D100D25C /* ConstraintMultiplierTarget.swift in Sources */, + ACC34A814FED725723ABD46B5A3037C3 /* ConstraintOffsetTarget.swift in Sources */, + 3B2788BD70F40184F592DC4CF70EA107 /* ConstraintPriorityTarget.swift in Sources */, + EE666E39DD768A72DCAEC0EA3B113118 /* ConstraintRelatableTarget.swift in Sources */, + EE997C236118F16F1BF18E8BEE498CEB /* ConstraintRelation.swift in Sources */, + 0173DCDAD65FC7B9D179244715BEF22C /* ConstraintView+Extensions.swift in Sources */, + E00D4CB74DD20F447866D75234C1FCB5 /* ConstraintView.swift in Sources */, + 5B60FDE8AA66C72B0EA783AE4AD209DC /* ConstraintViewDSL.swift in Sources */, + 5E516D7C4C32D16432B621EAE61A5D0A /* Debugging.swift in Sources */, + 21A73F824B18E546F50F7D8B57495EA7 /* LayoutConstraint.swift in Sources */, + B4AE2CA74D08D06D5CEE9172374BDB3A /* SnapKit-dummy.m in Sources */, + 9AA34BA318AE4B4E7505F0AAB901A4F3 /* UILayoutGuide+Extensions.swift in Sources */, + 57E60F7B334EFF2259A81548F61EC3C4 /* UILayoutSupport+Extensions.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -562,11 +638,13 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 227664449ABDE2C487640B42AB70B0B6 /* Debug */ = { + 0908938F6F2111298921F17D00B0135E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 90D8599FCFCA98DB19D3DE0AD81D9CD6 /* SnapKit.xcconfig */; + baseConfigurationReference = 4BDF132FE6914CCE68921AD703EAFBAE /* DialogView.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; @@ -575,68 +653,33 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/SnapKit/SnapKit-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SnapKit/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/DialogView/DialogView-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/DialogView/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/SnapKit/SnapKit.modulemap"; + MODULEMAP_FILE = "Target Support Files/DialogView/DialogView.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "${PRODUCT_BUNDLE_IDENTIFIER}"; - PRODUCT_NAME = SnapKit; + PRODUCT_NAME = DialogView; 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; }; - 372FF5048FF42C3A7A18B70A30D785C1 /* Release */ = { + 276FF1C135921E64747D6141276CD6E4 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = F5FA3CFF104B72810C8A47DD92023C5F /* Pods-DialogView_Example.debug.xcconfig */; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 4EB291978D8B70D1B5760166EABE3816 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 04FDB1D927DB2042BCBBBB0873E72A0B /* Pods-DialogView_Example.release.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; @@ -649,7 +692,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; + MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -657,60 +700,22 @@ PRODUCT_NAME = Pods_DialogView_Example; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; - }; - 70F0378D63DE3D2DCC739550669BD46A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; - ONLY_ACTIVE_ARCH = YES; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; name = Debug; }; - 74C694A88288F71B71986A70C9A8BBE5 /* Debug */ = { + 490C7AA910C0958351E8FD95585F12B5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F5FA3CFF104B72810C8A47DD92023C5F /* Pods-DialogView_Example.debug.xcconfig */; + baseConfigurationReference = 04FDB1D927DB2042BCBBBB0873E72A0B /* Pods-DialogView_Example.release.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; @@ -723,7 +728,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -731,20 +736,21 @@ PRODUCT_NAME = Pods_DialogView_Example; 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; }; - 75A4A5C64A7A60E10AE34473FE6F364E /* Release */ = { + 5DF4FDF05229D32606D4272FBE79DE90 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 90D8599FCFCA98DB19D3DE0AD81D9CD6 /* SnapKit.xcconfig */; + baseConfigurationReference = E885DC7A2C93B352F3CCBAF6C4F30F7F /* SnapKit.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; @@ -757,22 +763,25 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/SnapKit/SnapKit.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "${PRODUCT_BUNDLE_IDENTIFIER}"; + MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_NAME = SnapKit; 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; }; - AFD7270252F83567D2970FEEDF2D19D0 /* Release */ = { + 683830BCD89F6F8ACABA23E684CDDA87 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = FE36C9E60FC61F39D27D006516BFD9E1 /* Pods-DialogView_Tests.release.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; @@ -801,11 +810,97 @@ }; name = Release; }; - CA4D0F115B2FFE09FB38A7A788D08598 /* Debug */ = { + 8DED8AD26D381A6ACFF202E5217EC498 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 9E1E4E48AF2EAB23169E611BF694090A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + ONLY_ACTIVE_ARCH = YES; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + C17017096829D6C33154954B7276CC97 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = C5E72AC36B44838CD1359AE23A0EA14F /* Pods-DialogView_Tests.debug.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; @@ -835,11 +930,13 @@ }; name = Debug; }; - E57037AC4E9DFB79781680E5D4B4ADEE /* Release */ = { + CBD1E5118B941B005464F3CC11EA622A /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 4BDF132FE6914CCE68921AD703EAFBAE /* DialogView.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; @@ -855,46 +952,47 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/DialogView/DialogView.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "${PRODUCT_BUNDLE_IDENTIFIER}"; PRODUCT_NAME = DialogView; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - F54562F7673031AE3A7D1B3B420F8E30 /* Debug */ = { + F444D795C6D748FA3503F4C6F979CC42 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4BDF132FE6914CCE68921AD703EAFBAE /* DialogView.xcconfig */; + baseConfigurationReference = E885DC7A2C93B352F3CCBAF6C4F30F7F /* SnapKit.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; - GCC_PREFIX_HEADER = "Target Support Files/DialogView/DialogView-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/DialogView/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/SnapKit/SnapKit-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SnapKit/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/DialogView/DialogView.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "${PRODUCT_BUNDLE_IDENTIFIER}"; - PRODUCT_NAME = DialogView; + MODULEMAP_FILE = "Target Support Files/SnapKit/SnapKit.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = SnapKit; 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; }; /* End XCBuildConfiguration section */ @@ -902,8 +1000,8 @@ 13BB1C1714BE12FA54A03588A14EC210 /* Build configuration list for PBXNativeTarget "Pods-DialogView_Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - 74C694A88288F71B71986A70C9A8BBE5 /* Debug */, - 4EB291978D8B70D1B5760166EABE3816 /* Release */, + 276FF1C135921E64747D6141276CD6E4 /* Debug */, + 490C7AA910C0958351E8FD95585F12B5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -911,8 +1009,8 @@ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 70F0378D63DE3D2DCC739550669BD46A /* Debug */, - 372FF5048FF42C3A7A18B70A30D785C1 /* Release */, + 9E1E4E48AF2EAB23169E611BF694090A /* Debug */, + 8DED8AD26D381A6ACFF202E5217EC498 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -920,8 +1018,8 @@ 61A5511E5BE0D6D41AD9A6F840B802C2 /* Build configuration list for PBXNativeTarget "SnapKit" */ = { isa = XCConfigurationList; buildConfigurations = ( - 227664449ABDE2C487640B42AB70B0B6 /* Debug */, - 75A4A5C64A7A60E10AE34473FE6F364E /* Release */, + 5DF4FDF05229D32606D4272FBE79DE90 /* Debug */, + F444D795C6D748FA3503F4C6F979CC42 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -929,8 +1027,8 @@ 8428933DED07CEF60BA3554209E085B9 /* Build configuration list for PBXNativeTarget "Pods-DialogView_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( - CA4D0F115B2FFE09FB38A7A788D08598 /* Debug */, - AFD7270252F83567D2970FEEDF2D19D0 /* Release */, + C17017096829D6C33154954B7276CC97 /* Debug */, + 683830BCD89F6F8ACABA23E684CDDA87 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -938,8 +1036,8 @@ FEABAAF9F23E49C64BBDC826A3AD2AFD /* Build configuration list for PBXNativeTarget "DialogView" */ = { isa = XCConfigurationList; buildConfigurations = ( - F54562F7673031AE3A7D1B3B420F8E30 /* Debug */, - E57037AC4E9DFB79781680E5D4B4ADEE /* Release */, + 0908938F6F2111298921F17D00B0135E /* Debug */, + CBD1E5118B941B005464F3CC11EA622A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/DialogView.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/DialogView.xcscheme deleted file mode 100644 index 77c6192..0000000 --- a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/DialogView.xcscheme +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/SnapKit/README.md b/Example/Pods/SnapKit/README.md index 14be1f0..e419447 100644 --- a/Example/Pods/SnapKit/README.md +++ b/Example/Pods/SnapKit/README.md @@ -3,9 +3,96 @@ SnapKit is a DSL to make Auto Layout easy on both iOS and OS X. [![Build Status](https://travis-ci.org/SnapKit/SnapKit.svg)](https://travis-ci.org/SnapKit/SnapKit) -[![Cocoapods Compatible](https://img.shields.io/cocoapods/v/SnapKit.svg)](https://img.shields.io/cocoapods/v/SnapKit.svg) +[![Platform](https://img.shields.io/cocoapods/p/SnapKit.svg?style=flat)](https://github.com/SnapKit/SnapKit) +[![Cocoapods Compatible](https://img.shields.io/cocoapods/v/SnapKit.svg)](https://cocoapods.org/pods/SnapKit) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +- [Requirements](#requirements) +- [Migration Guides](#migration-guides) +- [Communication](#communication) +- [Installation](#installation) +- [Usage](#usage) +- [Credits](#credits) +- [License](#license) + +## Requirements + +- iOS 9.0+ / Mac OS X 10.11+ / tvOS 9.0+ +- Xcode 8.0+ +- Swift 3.0+ + +## Migration Guides + +- [SnapKit 3.0 Migration Guide](https://github.com/SnapKit/SnapKit/blob/master/Documentation/SnapKit%203.0%20Migration%20Guide.md) + +## Communication + +- If you **need help**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/snapkit). (Tag 'snapkit') +- If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/snapkit). +- If you **found a bug**, open an issue. +- If you **have a feature request**, open an issue. +- If you **want to contribute**, submit a pull request. + + +## Installation + +### CocoaPods + +[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: + +```bash +$ gem install cocoapods +``` + +> CocoaPods 1.1.0+ is required to build SnapKit 3.0.0+. + +To integrate SnapKit into your Xcode project using CocoaPods, specify it in your `Podfile`: + +```ruby +source 'https://github.com/CocoaPods/Specs.git' +platform :ios, '10.0' +use_frameworks! + +target '' do + pod 'SnapKit', '~> 3.0' +end +``` + +Then, run the following command: + +```bash +$ pod install +``` + +### Carthage + +[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. + +You can install Carthage with [Homebrew](http://brew.sh/) using the following command: + +```bash +$ brew update +$ brew install carthage +``` + +To integrate SnapKit into your Xcode project using Carthage, specify it in your `Cartfile`: + +```ogdl +github "SnapKit/SnapKit" ~> 3.0 +``` + +Run `carthage update` to build the framework and drag the built `SnapKit.framework` into your Xcode project. + +### Manually + +If you prefer not to use either of the aforementioned dependency managers, you can integrate SnapKit into your project manually. + +--- + +## Usage + +### Quick Start + ```swift import SnapKit @@ -17,7 +104,7 @@ class MyViewController: UIViewController { super.viewDidLoad() self.view.addSubview(box) - box.snp_makeConstraints { (make) -> Void in + box.snp.makeConstraints { (make) -> Void in make.width.height.equalTo(50) make.center.equalTo(self.view) } @@ -26,12 +113,16 @@ class MyViewController: UIViewController { } ``` -## Resources +### Resources + +- [Documentation](http://snapkit.io/docs/) +- [F.A.Q.](http://snapkit.io/faq/) + +## Credits -* [Documentation](http://snapkit.io/docs/) -* [F.A.Q.](http://snapkit.io/faq/) -* [Legacy Platforms (iOS 7.0, OS X 10.9)](http://snapkit.io/legacy-platforms/) +- Robert Payne ([@robertjpayne](https://twitter.com/robertjpayne)) +- Many other contributors ## License -MIT license. See the `LICENSE` file for details. +SnapKit is released under the MIT license. See LICENSE for details. diff --git a/Example/Pods/SnapKit/Source/Constraint.swift b/Example/Pods/SnapKit/Source/Constraint.swift index 4f291e6..6123ac5 100644 --- a/Example/Pods/SnapKit/Source/Constraint.swift +++ b/Example/Pods/SnapKit/Source/Constraint.swift @@ -22,483 +22,239 @@ // THE SOFTWARE. #if os(iOS) || os(tvOS) -import UIKit + import UIKit #else -import AppKit + import AppKit #endif -/** - Used to expose API's for a Constraint -*/ public class Constraint { - public func install() -> [LayoutConstraint] { fatalError("Must be implemented by Concrete subclass.") } - public func uninstall() -> Void { fatalError("Must be implemented by Concrete subclass.") } - public func activate() -> Void { fatalError("Must be implemented by Concrete subclass.") } - public func deactivate() -> Void { fatalError("Must be implemented by Concrete subclass.") } + internal let sourceLocation: (String, UInt) + internal let label: String? - public func updateOffset(amount: Float) -> Void { fatalError("Must be implemented by Concrete subclass.") } - public func updateOffset(amount: Double) -> Void { fatalError("Must be implemented by Concrete subclass.") } - public func updateOffset(amount: CGFloat) -> Void { fatalError("Must be implemented by Concrete subclass.") } - public func updateOffset(amount: Int) -> Void { fatalError("Must be implemented by Concrete subclass.") } - public func updateOffset(amount: UInt) -> Void { fatalError("Must be implemented by Concrete subclass.") } - public func updateOffset(amount: CGPoint) -> Void { fatalError("Must be implemented by Concrete subclass.") } - public func updateOffset(amount: CGSize) -> Void { fatalError("Must be implemented by Concrete subclass.") } - public func updateOffset(amount: EdgeInsets) -> Void { fatalError("Must be implemented by Concrete subclass.") } - - public func updateInsets(amount: EdgeInsets) -> Void { fatalError("Must be implemented by Concrete subclass.") } - - public func updatePriority(priority: Float) -> Void { fatalError("Must be implemented by Concrete subclass.") } - public func updatePriority(priority: Double) -> Void { fatalError("Must be implemented by Concrete subclass.") } - public func updatePriority(priority: CGFloat) -> Void { fatalError("Must be implemented by Concrete subclass.") } - public func updatePriority(priority: UInt) -> Void { fatalError("Must be implemented by Concrete subclass.") } - public func updatePriority(priority: Int) -> Void { fatalError("Must be implemented by Concrete subclass.") } - public func updatePriorityRequired() -> Void { fatalError("Must be implemented by Concrete subclass.") } - public func updatePriorityHigh() -> Void { fatalError("Must be implemented by Concrete subclass.") } - public func updatePriorityMedium() -> Void { fatalError("Must be implemented by Concrete subclass.") } - public func updatePriorityLow() -> Void { fatalError("Must be implemented by Concrete subclass.") } - - internal var makerFile: String = "Unknown" - internal var makerLine: UInt = 0 - -} - -/** - Used internally to implement a ConcreteConstraint -*/ -internal class ConcreteConstraint: Constraint { - - internal override func updateOffset(amount: Float) -> Void { - self.constant = amount - } - internal override func updateOffset(amount: Double) -> Void { - self.updateOffset(Float(amount)) - } - internal override func updateOffset(amount: CGFloat) -> Void { - self.updateOffset(Float(amount)) - } - internal override func updateOffset(amount: Int) -> Void { - self.updateOffset(Float(amount)) - } - internal override func updateOffset(amount: UInt) -> Void { - self.updateOffset(Float(amount)) - } - internal override func updateOffset(amount: CGPoint) -> Void { - self.constant = amount - } - internal override func updateOffset(amount: CGSize) -> Void { - self.constant = amount - } - internal override func updateOffset(amount: EdgeInsets) -> Void { - self.constant = amount - } - - internal override func updateInsets(amount: EdgeInsets) -> Void { - self.constant = EdgeInsets(top: amount.top, left: amount.left, bottom: -amount.bottom, right: -amount.right) - } - - internal override func updatePriority(priority: Float) -> Void { - self.priority = priority - } - internal override func updatePriority(priority: Double) -> Void { - self.updatePriority(Float(priority)) - } - internal override func updatePriority(priority: CGFloat) -> Void { - self.updatePriority(Float(priority)) - } - internal override func updatePriority(priority: UInt) -> Void { - self.updatePriority(Float(priority)) - } - internal override func updatePriority(priority: Int) -> Void { - self.updatePriority(Float(priority)) - } - internal override func updatePriorityRequired() -> Void { - self.updatePriority(Float(1000.0)) - } - internal override func updatePriorityHigh() -> Void { - self.updatePriority(Float(750.0)) - } - internal override func updatePriorityMedium() -> Void { - #if os(iOS) || os(tvOS) - self.updatePriority(Float(500.0)) - #else - self.updatePriority(Float(501.0)) - #endif - } - internal override func updatePriorityLow() -> Void { - self.updatePriority(Float(250.0)) - } - - internal override func install() -> [LayoutConstraint] { - return self.installOnView(updateExisting: false, file: self.makerFile, line: self.makerLine) - } - - internal override func uninstall() -> Void { - self.uninstallFromView() - } - - internal override func activate() -> Void { - guard self.installInfo != nil else { - self.install() - return - } - #if SNAPKIT_DEPLOYMENT_LEGACY - guard #available(iOS 8.0, OSX 10.10, *) else { - self.install() - return - } - #endif - let layoutConstraints = self.installInfo!.layoutConstraints.allObjects as! [LayoutConstraint] - if layoutConstraints.count > 0 { - NSLayoutConstraint.activateConstraints(layoutConstraints) - } - } - - internal override func deactivate() -> Void { - guard self.installInfo != nil else { - return - } - #if SNAPKIT_DEPLOYMENT_LEGACY - guard #available(iOS 8.0, OSX 10.10, *) else { - return - } - #endif - let layoutConstraints = self.installInfo!.layoutConstraints.allObjects as! [LayoutConstraint] - if layoutConstraints.count > 0 { - NSLayoutConstraint.deactivateConstraints(layoutConstraints) - } - } - - private let fromItem: ConstraintItem - private let toItem: ConstraintItem + private let from: ConstraintItem + private let to: ConstraintItem private let relation: ConstraintRelation - private let multiplier: Float - private var constant: Any { + private let multiplier: ConstraintMultiplierTarget + private var constant: ConstraintConstantTarget { didSet { - if let installInfo = self.installInfo { - for layoutConstraint in installInfo.layoutConstraints.allObjects as! [LayoutConstraint] { - let attribute = (layoutConstraint.secondAttribute == .NotAnAttribute) ? layoutConstraint.firstAttribute : layoutConstraint.secondAttribute - layoutConstraint.constant = attribute.snp_constantForValue(self.constant) - } - } + self.updateConstantAndPriorityIfNeeded() } } - private var priority: Float { + private var priority: ConstraintPriorityTarget { didSet { - if let installInfo = self.installInfo { - for layoutConstraint in installInfo.layoutConstraints.allObjects as! [LayoutConstraint] { - layoutConstraint.priority = self.priority - } - } + self.updateConstantAndPriorityIfNeeded() } } + private var layoutConstraints: [LayoutConstraint] - private let label: String? + // MARK: Initialization - private var installInfo: ConcreteConstraintInstallInfo? = nil - - internal init(fromItem: ConstraintItem, toItem: ConstraintItem, relation: ConstraintRelation, constant: Any, multiplier: Float, priority: Float, label: String? = nil) { - self.fromItem = fromItem - self.toItem = toItem + internal init(from: ConstraintItem, + to: ConstraintItem, + relation: ConstraintRelation, + sourceLocation: (String, UInt), + label: String?, + multiplier: ConstraintMultiplierTarget, + constant: ConstraintConstantTarget, + priority: ConstraintPriorityTarget) { + self.from = from + self.to = to self.relation = relation - self.constant = constant + self.sourceLocation = sourceLocation + self.label = label self.multiplier = multiplier + self.constant = constant self.priority = priority - self.label = label - } - - internal func installOnView(updateExisting updateExisting: Bool = false, file: String? = nil, line: UInt? = nil) -> [LayoutConstraint] { - var installOnView: View? = nil - if self.toItem.view != nil { - installOnView = closestCommonSuperviewFromView(self.fromItem.view, toView: self.toItem.view) - if installOnView == nil { - NSException(name: "Cannot Install Constraint", reason: "No common superview between views (@\(self.makerFile)#\(self.makerLine))", userInfo: nil).raise() - return [] - } - } else { - - if self.fromItem.attributes.isSubsetOf(ConstraintAttributes.Width.union(.Height)) { - installOnView = self.fromItem.view - } else { - installOnView = self.fromItem.view?.superview - if installOnView == nil { - NSException(name: "Cannot Install Constraint", reason: "Missing superview (@\(self.makerFile)#\(self.makerLine))", userInfo: nil).raise() - return [] - } - } - } + self.layoutConstraints = [] - if let installedOnView = self.installInfo?.view { - if installedOnView != installOnView { - NSException(name: "Cannot Install Constraint", reason: "Already installed on different view. (@\(self.makerFile)#\(self.makerLine))", userInfo: nil).raise() - return [] - } - return self.installInfo?.layoutConstraints.allObjects as? [LayoutConstraint] ?? [] - } - - var newLayoutConstraints = [LayoutConstraint]() - let layoutFromAttributes = self.fromItem.attributes.layoutAttributes - let layoutToAttributes = self.toItem.attributes.layoutAttributes + // get attributes + let layoutFromAttributes = self.from.attributes.layoutAttributes + let layoutToAttributes = self.to.attributes.layoutAttributes // get layout from - let layoutFrom: View? = self.fromItem.view + let layoutFrom: ConstraintView = self.from.view! - // get layout relation - let layoutRelation: NSLayoutRelation = self.relation.layoutRelation + // get relation + let layoutRelation = self.relation.layoutRelation for layoutFromAttribute in layoutFromAttributes { // get layout to attribute - let layoutToAttribute = (layoutToAttributes.count > 0) ? layoutToAttributes[0] : layoutFromAttribute + let layoutToAttribute: NSLayoutAttribute + #if os(iOS) || os(tvOS) + if layoutToAttributes.count > 0 { + if self.from.attributes == .edges && self.to.attributes == .margins { + switch layoutFromAttribute { + case .left: + layoutToAttribute = .leftMargin + case .right: + layoutToAttribute = .rightMargin + case .top: + layoutToAttribute = .topMargin + case .bottom: + layoutToAttribute = .bottomMargin + default: + fatalError() + } + } else if self.from.attributes == .margins && self.to.attributes == .edges { + switch layoutFromAttribute { + case .leftMargin: + layoutToAttribute = .left + case .rightMargin: + layoutToAttribute = .right + case .topMargin: + layoutToAttribute = .top + case .bottomMargin: + layoutToAttribute = .bottom + default: + fatalError() + } + } else if self.from.attributes == self.to.attributes { + layoutToAttribute = layoutFromAttribute + } else { + layoutToAttribute = layoutToAttributes[0] + } + } else { + layoutToAttribute = layoutFromAttribute + } + #else + if layoutToAttributes.count > 0 { + layoutToAttribute = layoutToAttributes[0] + } else { + layoutToAttribute = layoutFromAttribute + } + #endif // get layout constant - let layoutConstant: CGFloat = layoutToAttribute.snp_constantForValue(self.constant) + let layoutConstant: CGFloat = self.constant.constraintConstantTargetValueFor(layoutAttribute: layoutToAttribute) // get layout to - #if os(iOS) || os(tvOS) - var layoutTo: AnyObject? = self.toItem.view ?? self.toItem.layoutSupport - #else - var layoutTo: AnyObject? = self.toItem.view - #endif - if layoutTo == nil && layoutToAttribute != .Width && layoutToAttribute != .Height { - layoutTo = installOnView + var layoutTo: AnyObject? = self.to.target + + // use superview if possible + if layoutTo == nil && layoutToAttribute != .width && layoutToAttribute != .height { + layoutTo = layoutFrom.superview } // create layout constraint let layoutConstraint = LayoutConstraint( - item: layoutFrom!, + item: layoutFrom, attribute: layoutFromAttribute, relatedBy: layoutRelation, toItem: layoutTo, attribute: layoutToAttribute, - multiplier: CGFloat(self.multiplier), - constant: layoutConstant) - layoutConstraint.identifier = self.label + multiplier: self.multiplier.constraintMultiplierTargetValue, + constant: layoutConstant + ) + + // set label + layoutConstraint.label = self.label // set priority - layoutConstraint.priority = self.priority + layoutConstraint.priority = self.priority.constraintPriorityTargetValue // set constraint - layoutConstraint.snp_constraint = self + layoutConstraint.constraint = self - newLayoutConstraints.append(layoutConstraint) + // append + self.layoutConstraints.append(layoutConstraint) } - - // special logic for updating - if updateExisting { - // get existing constraints for this view - let existingLayoutConstraints = layoutFrom!.snp_installedLayoutConstraints.reverse() - - // array that will contain only new layout constraints to keep - var newLayoutConstraintsToKeep = [LayoutConstraint]() - - // begin looping - for layoutConstraint in newLayoutConstraints { - // layout constraint that should be updated - var updateLayoutConstraint: LayoutConstraint? = nil - - // loop through existing and check for match - for existingLayoutConstraint in existingLayoutConstraints { - if existingLayoutConstraint == layoutConstraint { - updateLayoutConstraint = existingLayoutConstraint - break - } - } - - // if we have existing one lets just update the constant - if updateLayoutConstraint != nil { - updateLayoutConstraint!.constant = layoutConstraint.constant - } - // otherwise add this layout constraint to new keep list - else { - newLayoutConstraintsToKeep.append(layoutConstraint) - } - } - - // set constraints to only new ones - newLayoutConstraints = newLayoutConstraintsToKeep - } - - // add constraints - #if SNAPKIT_DEPLOYMENT_LEGACY && !os(OSX) - if #available(iOS 8.0, *) { - NSLayoutConstraint.activateConstraints(newLayoutConstraints) - } else { - installOnView!.addConstraints(newLayoutConstraints) - } - #else - NSLayoutConstraint.activateConstraints(newLayoutConstraints) - #endif - - // set install info - self.installInfo = ConcreteConstraintInstallInfo(view: installOnView, layoutConstraints: NSHashTable.weakObjectsHashTable()) - - // store which layout constraints are installed for this constraint - for layoutConstraint in newLayoutConstraints { - self.installInfo!.layoutConstraints.addObject(layoutConstraint) - } - - // store the layout constraints against the layout from view - layoutFrom!.snp_installedLayoutConstraints += newLayoutConstraints - - // return the new constraints - return newLayoutConstraints } - internal func uninstallFromView() { - if let installInfo = self.installInfo, - let installedLayoutConstraints = installInfo.layoutConstraints.allObjects as? [LayoutConstraint] { - - if installedLayoutConstraints.count > 0 { - // remove the constraints from the UIView's storage - #if SNAPKIT_DEPLOYMENT_LEGACY && !os(OSX) - if #available(iOS 8.0, *) { - NSLayoutConstraint.deactivateConstraints(installedLayoutConstraints) - } else if let installedOnView = installInfo.view { - installedOnView.removeConstraints(installedLayoutConstraints) - } - #else - NSLayoutConstraint.deactivateConstraints(installedLayoutConstraints) - #endif - - // remove the constraints from the from item view - if let fromView = self.fromItem.view { - fromView.snp_installedLayoutConstraints = fromView.snp_installedLayoutConstraints.filter { - return !installedLayoutConstraints.contains($0) - } - } - } - - } - self.installInfo = nil + // MARK: Public + + @available(*, deprecated:3.0, message:"Use activate().") + public func install() { + self.activate() } -} - -private struct ConcreteConstraintInstallInfo { + @available(*, deprecated:3.0, message:"Use deactivate().") + public func uninstall() { + self.deactivate() + } - weak var view: View? = nil - let layoutConstraints: NSHashTable + public func activate() { + self.activateIfNeeded() + } -} - -private extension NSLayoutAttribute { + public func deactivate() { + self.deactivateIfNeeded() + } - private func snp_constantForValue(value: Any?) -> CGFloat { - // Float - if let float = value as? Float { - return CGFloat(float) - } - // Double - else if let double = value as? Double { - return CGFloat(double) - } - // UInt - else if let int = value as? Int { - return CGFloat(int) - } - // Int - else if let uint = value as? UInt { - return CGFloat(uint) - } - // CGFloat - else if let float = value as? CGFloat { - return float - } - // CGSize - else if let size = value as? CGSize { - if self == .Width { - return size.width - } else if self == .Height { - return size.height - } - } - // CGPoint - else if let point = value as? CGPoint { - #if os(iOS) || os(tvOS) - switch self { - case .Left, .CenterX, .LeftMargin, .CenterXWithinMargins: return point.x - case .Top, .CenterY, .TopMargin, .CenterYWithinMargins, .Baseline, .FirstBaseline: return point.y - case .Right, .RightMargin: return point.x - case .Bottom, .BottomMargin: return point.y - case .Leading, .LeadingMargin: return point.x - case .Trailing, .TrailingMargin: return point.x - case .Width, .Height, .NotAnAttribute: return CGFloat(0) - } - #else - switch self { - case .Left, .CenterX: return point.x - case .Top, .CenterY, .Baseline: return point.y - case .Right: return point.x - case .Bottom: return point.y - case .Leading: return point.x - case .Trailing: return point.x - case .Width, .Height, .NotAnAttribute: return CGFloat(0) - case .FirstBaseline: return point.y - } - #endif - } - // EdgeInsets - else if let insets = value as? EdgeInsets { - #if os(iOS) || os(tvOS) - switch self { - case .Left, .CenterX, .LeftMargin, .CenterXWithinMargins: return insets.left - case .Top, .CenterY, .TopMargin, .CenterYWithinMargins, .Baseline, .FirstBaseline: return insets.top - case .Right, .RightMargin: return insets.right - case .Bottom, .BottomMargin: return insets.bottom - case .Leading, .LeadingMargin: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.left : -insets.right - case .Trailing, .TrailingMargin: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.right : -insets.left - case .Width: return -insets.left + insets.right - case .Height: return -insets.top + insets.bottom - case .NotAnAttribute: return CGFloat(0) - } - #else - switch self { - case .Left, .CenterX: return insets.left - case .Top, .CenterY, .Baseline: return insets.top - case .Right: return insets.right - case .Bottom: return insets.bottom - case .Leading: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.left : -insets.right - case .Trailing: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.right : -insets.left - case .Width: return -insets.left + insets.right - case .Height: return -insets.top + insets.bottom - case .NotAnAttribute: return CGFloat(0) - case .FirstBaseline: return insets.bottom - } - #endif - } - - return CGFloat(0); + @discardableResult + public func update(offset: ConstraintOffsetTarget) -> Constraint { + self.constant = offset.constraintOffsetTargetValue + return self } -} - -private func closestCommonSuperviewFromView(fromView: View?, toView: View?) -> View? { - var views = Set() - var fromView = fromView - var toView = toView - repeat { - if let view = toView { - if views.contains(view) { - return view - } - views.insert(view) - toView = view.superview + + @discardableResult + public func update(inset: ConstraintInsetTarget) -> Constraint { + self.constant = inset.constraintInsetTargetValue + return self + } + + @discardableResult + public func update(priority: ConstraintPriorityTarget) -> Constraint { + self.priority = priority.constraintPriorityTargetValue + return self + } + + @available(*, deprecated:3.0, message:"Use update(offset: ConstraintOffsetTarget) instead.") + public func updateOffset(amount: ConstraintOffsetTarget) -> Void { self.update(offset: amount) } + + @available(*, deprecated:3.0, message:"Use update(inset: ConstraintInsetTarget) instead.") + public func updateInsets(amount: ConstraintInsetTarget) -> Void { self.update(inset: amount) } + + @available(*, deprecated:3.0, message:"Use update(priority: ConstraintPriorityTarget) instead.") + public func updatePriority(amount: ConstraintPriorityTarget) -> Void { self.update(priority: amount) } + + @available(*, obsoleted:3.0, message:"Use update(priority: ConstraintPriorityTarget) instead.") + public func updatePriorityRequired() -> Void {} + + @available(*, obsoleted:3.0, message:"Use update(priority: ConstraintPriorityTarget) instead.") + public func updatePriorityHigh() -> Void { fatalError("Must be implemented by Concrete subclass.") } + + @available(*, obsoleted:3.0, message:"Use update(priority: ConstraintPriorityTarget) instead.") + public func updatePriorityMedium() -> Void { fatalError("Must be implemented by Concrete subclass.") } + + @available(*, obsoleted:3.0, message:"Use update(priority: ConstraintPriorityTarget) instead.") + public func updatePriorityLow() -> Void { fatalError("Must be implemented by Concrete subclass.") } + + // MARK: Internal + + internal func updateConstantAndPriorityIfNeeded() { + for layoutConstraint in self.layoutConstraints { + let attribute = (layoutConstraint.secondAttribute == .notAnAttribute) ? layoutConstraint.firstAttribute : layoutConstraint.secondAttribute + layoutConstraint.constant = self.constant.constraintConstantTargetValueFor(layoutAttribute: attribute) + layoutConstraint.priority = self.priority.constraintPriorityTargetValue } - if let view = fromView { - if views.contains(view) { - return view + } + + internal func activateIfNeeded(updatingExisting: Bool = false) { + let view = self.from.view! + let layoutConstraints = self.layoutConstraints + let existingLayoutConstraints = view.snp.layoutConstraints + + if updatingExisting { + for layoutConstraint in layoutConstraints { + let existingLayoutConstraint = existingLayoutConstraints.first { $0 == layoutConstraint } + guard let updateLayoutConstraint = existingLayoutConstraint else { + fatalError("Updated constraint could not find existing matching constraint to update: \(layoutConstraint)") + } + + let updateLayoutAttribute = (updateLayoutConstraint.secondAttribute == .notAnAttribute) ? updateLayoutConstraint.firstAttribute : updateLayoutConstraint.secondAttribute + updateLayoutConstraint.constant = self.constant.constraintConstantTargetValueFor(layoutAttribute: updateLayoutAttribute) } - views.insert(view) - fromView = view.superview + } else { + NSLayoutConstraint.activate(layoutConstraints) + view.snp.add(layoutConstraints: layoutConstraints) } - } while (fromView != nil || toView != nil) + } - return nil -} - -private func ==(left: ConcreteConstraint, right: ConcreteConstraint) -> Bool { - return (left.fromItem == right.fromItem && - left.toItem == right.toItem && - left.relation == right.relation && - left.multiplier == right.multiplier && - left.priority == right.priority) + internal func deactivateIfNeeded() { + let view = self.from.view! + let layoutConstraints = self.layoutConstraints + NSLayoutConstraint.deactivate(layoutConstraints) + view.snp.remove(layoutConstraints: layoutConstraints) + } } diff --git a/Example/Pods/SnapKit/Source/ConstraintAttributes.swift b/Example/Pods/SnapKit/Source/ConstraintAttributes.swift index 95bfddb..7236d24 100644 --- a/Example/Pods/SnapKit/Source/ConstraintAttributes.swift +++ b/Example/Pods/SnapKit/Source/ConstraintAttributes.swift @@ -1,7 +1,7 @@ // // SnapKit // -// Copyright (c) 2011-2015 SnapKit Team - https://github.com/SnapKit +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -22,15 +22,13 @@ // THE SOFTWARE. #if os(iOS) || os(tvOS) -import UIKit + import UIKit #else -import AppKit + import AppKit #endif -/** - Used to define `NSLayoutAttributes` in a more concise and composite manner -*/ -internal struct ConstraintAttributes: OptionSetType, BooleanType { + +internal struct ConstraintAttributes: OptionSet { internal init(rawValue: UInt) { self.rawValue = rawValue @@ -48,135 +46,145 @@ internal struct ConstraintAttributes: OptionSetType, BooleanType { internal var boolValue: Bool { return self.rawValue != 0 } internal func toRaw() -> UInt { return self.rawValue } - internal static func fromRaw(raw: UInt) -> ConstraintAttributes? { return self.init(raw) } - internal static func fromMask(raw: UInt) -> ConstraintAttributes { return self.init(raw) } + internal static func fromRaw(_ raw: UInt) -> ConstraintAttributes? { return self.init(raw) } + internal static func fromMask(_ raw: UInt) -> ConstraintAttributes { return self.init(raw) } // normal - internal static var None: ConstraintAttributes { return self.init(0) } - internal static var Left: ConstraintAttributes { return self.init(1) } - internal static var Top: ConstraintAttributes { return self.init(2) } - internal static var Right: ConstraintAttributes { return self.init(4) } - internal static var Bottom: ConstraintAttributes { return self.init(8) } - internal static var Leading: ConstraintAttributes { return self.init(16) } - internal static var Trailing: ConstraintAttributes { return self.init(32) } - internal static var Width: ConstraintAttributes { return self.init(64) } - internal static var Height: ConstraintAttributes { return self.init(128) } - internal static var CenterX: ConstraintAttributes { return self.init(256) } - internal static var CenterY: ConstraintAttributes { return self.init(512) } - internal static var Baseline: ConstraintAttributes { return self.init(1024) } + internal static var none: ConstraintAttributes { return self.init(0) } + internal static var left: ConstraintAttributes { return self.init(1) } + internal static var top: ConstraintAttributes { return self.init(2) } + internal static var right: ConstraintAttributes { return self.init(4) } + internal static var bottom: ConstraintAttributes { return self.init(8) } + internal static var leading: ConstraintAttributes { return self.init(16) } + internal static var trailing: ConstraintAttributes { return self.init(32) } + internal static var width: ConstraintAttributes { return self.init(64) } + internal static var height: ConstraintAttributes { return self.init(128) } + internal static var centerX: ConstraintAttributes { return self.init(256) } + internal static var centerY: ConstraintAttributes { return self.init(512) } + internal static var lastBaseline: ConstraintAttributes { return self.init(1024) } + + @available(iOS 8.0, OSX 10.11, *) + internal static var firstBaseline: ConstraintAttributes { return self.init(2048) } @available(iOS 8.0, *) - internal static var FirstBaseline: ConstraintAttributes { return self.init(2048) } - @available(iOS 8.0, *) - internal static var LeftMargin: ConstraintAttributes { return self.init(4096) } + internal static var leftMargin: ConstraintAttributes { return self.init(4096) } + @available(iOS 8.0, *) - internal static var RightMargin: ConstraintAttributes { return self.init(8192) } + internal static var rightMargin: ConstraintAttributes { return self.init(8192) } + @available(iOS 8.0, *) - internal static var TopMargin: ConstraintAttributes { return self.init(16384) } + internal static var topMargin: ConstraintAttributes { return self.init(16384) } + @available(iOS 8.0, *) - internal static var BottomMargin: ConstraintAttributes { return self.init(32768) } + internal static var bottomMargin: ConstraintAttributes { return self.init(32768) } + @available(iOS 8.0, *) - internal static var LeadingMargin: ConstraintAttributes { return self.init(65536) } + internal static var leadingMargin: ConstraintAttributes { return self.init(65536) } + @available(iOS 8.0, *) - internal static var TrailingMargin: ConstraintAttributes { return self.init(131072) } + internal static var trailingMargin: ConstraintAttributes { return self.init(131072) } + @available(iOS 8.0, *) - internal static var CenterXWithinMargins: ConstraintAttributes { return self.init(262144) } + internal static var centerXWithinMargins: ConstraintAttributes { return self.init(262144) } + @available(iOS 8.0, *) - internal static var CenterYWithinMargins: ConstraintAttributes { return self.init(524288) } + internal static var centerYWithinMargins: ConstraintAttributes { return self.init(524288) } // aggregates - internal static var Edges: ConstraintAttributes { return self.init(15) } - internal static var Size: ConstraintAttributes { return self.init(192) } - internal static var Center: ConstraintAttributes { return self.init(768) } + internal static var edges: ConstraintAttributes { return self.init(15) } + internal static var size: ConstraintAttributes { return self.init(192) } + internal static var center: ConstraintAttributes { return self.init(768) } @available(iOS 8.0, *) - internal static var Margins: ConstraintAttributes { return self.init(61440) } + internal static var margins: ConstraintAttributes { return self.init(61440) } @available(iOS 8.0, *) - internal static var CenterWithinMargins: ConstraintAttributes { return self.init(786432) } + internal static var centerWithinMargins: ConstraintAttributes { return self.init(786432) } internal var layoutAttributes:[NSLayoutAttribute] { var attrs = [NSLayoutAttribute]() - if (self.contains(ConstraintAttributes.Left)) { - attrs.append(.Left) + if (self.contains(ConstraintAttributes.left)) { + attrs.append(.left) } - if (self.contains(ConstraintAttributes.Top)) { - attrs.append(.Top) + if (self.contains(ConstraintAttributes.top)) { + attrs.append(.top) } - if (self.contains(ConstraintAttributes.Right)) { - attrs.append(.Right) + if (self.contains(ConstraintAttributes.right)) { + attrs.append(.right) } - if (self.contains(ConstraintAttributes.Bottom)) { - attrs.append(.Bottom) + if (self.contains(ConstraintAttributes.bottom)) { + attrs.append(.bottom) } - if (self.contains(ConstraintAttributes.Leading)) { - attrs.append(.Leading) + if (self.contains(ConstraintAttributes.leading)) { + attrs.append(.leading) } - if (self.contains(ConstraintAttributes.Trailing)) { - attrs.append(.Trailing) + if (self.contains(ConstraintAttributes.trailing)) { + attrs.append(.trailing) } - if (self.contains(ConstraintAttributes.Width)) { - attrs.append(.Width) + if (self.contains(ConstraintAttributes.width)) { + attrs.append(.width) } - if (self.contains(ConstraintAttributes.Height)) { - attrs.append(.Height) + if (self.contains(ConstraintAttributes.height)) { + attrs.append(.height) } - if (self.contains(ConstraintAttributes.CenterX)) { - attrs.append(.CenterX) + if (self.contains(ConstraintAttributes.centerX)) { + attrs.append(.centerX) } - if (self.contains(ConstraintAttributes.CenterY)) { - attrs.append(.CenterY) + if (self.contains(ConstraintAttributes.centerY)) { + attrs.append(.centerY) } - if (self.contains(ConstraintAttributes.Baseline)) { - attrs.append(.Baseline) + if (self.contains(ConstraintAttributes.lastBaseline)) { + attrs.append(.lastBaseline) } #if os(iOS) || os(tvOS) - #if SNAPKIT_DEPLOYMENT_LEGACY - guard #available(iOS 8.0, *) else { - return attrs - } - #endif - if (self.contains(ConstraintAttributes.FirstBaseline)) { - attrs.append(.FirstBaseline) - } - if (self.contains(ConstraintAttributes.LeftMargin)) { - attrs.append(.LeftMargin) - } - if (self.contains(ConstraintAttributes.RightMargin)) { - attrs.append(.RightMargin) - } - if (self.contains(ConstraintAttributes.TopMargin)) { - attrs.append(.TopMargin) - } - if (self.contains(ConstraintAttributes.BottomMargin)) { - attrs.append(.BottomMargin) - } - if (self.contains(ConstraintAttributes.LeadingMargin)) { - attrs.append(.LeadingMargin) - } - if (self.contains(ConstraintAttributes.TrailingMargin)) { - attrs.append(.TrailingMargin) - } - if (self.contains(ConstraintAttributes.CenterXWithinMargins)) { - attrs.append(.CenterXWithinMargins) - } - if (self.contains(ConstraintAttributes.CenterYWithinMargins)) { - attrs.append(.CenterYWithinMargins) - } + if (self.contains(ConstraintAttributes.firstBaseline)) { + attrs.append(.firstBaseline) + } + if (self.contains(ConstraintAttributes.leftMargin)) { + attrs.append(.leftMargin) + } + if (self.contains(ConstraintAttributes.rightMargin)) { + attrs.append(.rightMargin) + } + if (self.contains(ConstraintAttributes.topMargin)) { + attrs.append(.topMargin) + } + if (self.contains(ConstraintAttributes.bottomMargin)) { + attrs.append(.bottomMargin) + } + if (self.contains(ConstraintAttributes.leadingMargin)) { + attrs.append(.leadingMargin) + } + if (self.contains(ConstraintAttributes.trailingMargin)) { + attrs.append(.trailingMargin) + } + if (self.contains(ConstraintAttributes.centerXWithinMargins)) { + attrs.append(.centerXWithinMargins) + } + if (self.contains(ConstraintAttributes.centerYWithinMargins)) { + attrs.append(.centerYWithinMargins) + } #endif return attrs } } -internal func +=(inout left: ConstraintAttributes, right: ConstraintAttributes) { - left.unionInPlace(right) + +internal func + (left: ConstraintAttributes, right: ConstraintAttributes) -> ConstraintAttributes { + return left.union(right) +} + +internal func +=(left: inout ConstraintAttributes, right: ConstraintAttributes) { + left.formUnion(right) } -internal func -=(inout left: ConstraintAttributes, right: ConstraintAttributes) { - left.subtractInPlace(right) + +internal func -=(left: inout ConstraintAttributes, right: ConstraintAttributes) { + left.subtract(right) } + internal func ==(left: ConstraintAttributes, right: ConstraintAttributes) -> Bool { return left.rawValue == right.rawValue } diff --git a/Example/Pods/SnapKit/Source/SnapKit.swift b/Example/Pods/SnapKit/Source/ConstraintConfig.swift similarity index 68% rename from Example/Pods/SnapKit/Source/SnapKit.swift rename to Example/Pods/SnapKit/Source/ConstraintConfig.swift index 3aa5181..2746b7d 100644 --- a/Example/Pods/SnapKit/Source/SnapKit.swift +++ b/Example/Pods/SnapKit/Source/ConstraintConfig.swift @@ -1,7 +1,7 @@ // // SnapKit // -// Copyright (c) 2011-2015 SnapKit Team - https://github.com/SnapKit +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -22,21 +22,16 @@ // THE SOFTWARE. #if os(iOS) || os(tvOS) -import UIKit -public typealias InterfaceLayoutDirection = UIUserInterfaceLayoutDirection -public typealias LayoutSupport = UILayoutSupport + import UIKit + public typealias ConstraintInterfaceLayoutDirection = UIUserInterfaceLayoutDirection #else -import AppKit -public typealias InterfaceLayoutDirection = NSUserInterfaceLayoutDirection -public class LayoutSupport {} + import AppKit + public typealias ConstraintInterfaceLayoutDirection = NSUserInterfaceLayoutDirection #endif -/** - Used to configure different parts of SnapKit -*/ -public struct Config { + +public struct ConstraintConfig { - /// The interface layout direction - public static var interfaceLayoutDirection = InterfaceLayoutDirection.LeftToRight + public static var interfaceLayoutDirection: ConstraintInterfaceLayoutDirection = .leftToRight -} \ No newline at end of file +} diff --git a/Example/Pods/SnapKit/Source/ConstraintConstantTarget.swift b/Example/Pods/SnapKit/Source/ConstraintConstantTarget.swift new file mode 100644 index 0000000..8a32519 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintConstantTarget.swift @@ -0,0 +1,147 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public protocol ConstraintConstantTarget { +} + +extension CGPoint: ConstraintConstantTarget { +} + +extension CGSize: ConstraintConstantTarget { +} + +extension ConstraintInsets: ConstraintConstantTarget { +} + +extension ConstraintConstantTarget { + + internal func constraintConstantTargetValueFor(layoutAttribute: NSLayoutAttribute) -> CGFloat { + if let value = self as? CGFloat { + return value + } + + if let value = self as? Float { + return CGFloat(value) + } + + if let value = self as? Double { + return CGFloat(value) + } + + if let value = self as? Int { + return CGFloat(value) + } + + if let value = self as? UInt { + return CGFloat(value) + } + + if let value = self as? CGSize { + if layoutAttribute == .width { + return value.width + } else if layoutAttribute == .height { + return value.height + } else { + return 0.0 + } + } + + if let value = self as? CGPoint { + #if os(iOS) || os(tvOS) + switch layoutAttribute { + case .left, .right, .leading, .trailing, .centerX, .leftMargin, .rightMargin, .leadingMargin, .trailingMargin, .centerXWithinMargins: + return value.x + case .top, .bottom, .centerY, .topMargin, .bottomMargin, .centerYWithinMargins, .lastBaseline, .firstBaseline: + return value.y + case .width, .height, .notAnAttribute: + return 0.0 + } + #else + switch layoutAttribute { + case .left, .right, .leading, .trailing, .centerX: + return value.x + case .top, .bottom, .centerY, .lastBaseline, .firstBaseline: + return value.y + case .width, .height, .notAnAttribute: + return 0.0 + } + #endif + } + + if let value = self as? ConstraintInsets { + #if os(iOS) || os(tvOS) + switch layoutAttribute { + case .left, .leftMargin, .centerX, .centerXWithinMargins: + return value.left + case .top, .topMargin, .centerY, .centerYWithinMargins, .lastBaseline, .firstBaseline: + return value.top + case .right, .rightMargin: + return -value.right + case .bottom, .bottomMargin: + return -value.bottom + case .leading, .leadingMargin: + return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.left : -value.right + case .trailing, .trailingMargin: + return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.right : -value.left + case .width: + return -(value.left + value.right) + case .height: + return -(value.top + value.bottom) + case .notAnAttribute: + return 0.0 + } + #else + switch layoutAttribute { + case .left, .centerX: + return value.left + case .top, .centerY, .lastBaseline, .firstBaseline: + return value.top + case .right: + return -value.right + case .bottom: + return -value.bottom + case .leading: + return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.left : -value.right + case .trailing: + return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.right : -value.left + case .width: + return -(value.left + value.right) + case .height: + return -(value.top + value.bottom) + case .notAnAttribute: + return 0.0 + } + #endif + } + + return 0.0 + } + +} diff --git a/Example/Pods/SnapKit/Source/ConstraintDSL.swift b/Example/Pods/SnapKit/Source/ConstraintDSL.swift new file mode 100644 index 0000000..f5248f5 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintDSL.swift @@ -0,0 +1,179 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public protocol ConstraintDSL { + + var label: String? { get set } + var target: AnyObject? { get } + +} +extension ConstraintDSL { + + public var label: String? { + get { + return objc_getAssociatedObject(self.target, &labelKey) as? String + } + set { + objc_setAssociatedObject(self.target, &labelKey, newValue, .OBJC_ASSOCIATION_COPY_NONATOMIC) + } + } + +} +private var labelKey: UInt8 = 0 + + +public protocol ConstraintAttributesDSL: ConstraintDSL { +} +extension ConstraintAttributesDSL { + + // MARK: Basics + + public var left: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.left) + } + + public var top: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.top) + } + + public var right: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.right) + } + + public var bottom: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.bottom) + } + + public var leading: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.leading) + } + + public var trailing: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.trailing) + } + + public var width: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.width) + } + + public var height: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.height) + } + + public var centerX: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerX) + } + + public var centerY: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerY) + } + + public var edges: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.edges) + } + + public var size: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.size) + } + + public var center: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.center) + } + + // MARK: Baselines + + @available(*, deprecated:3.0, message:"Use .lastBaseline instead") + public var baseline: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.lastBaseline) + } + + @available(iOS 8.0, OSX 10.11, *) + public var lastBaseline: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.lastBaseline) + } + + @available(iOS 8.0, OSX 10.11, *) + public var firstBaseline: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.firstBaseline) + } + + // MARK: Margins + + @available(iOS 8.0, *) + public var leftMargin: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.leftMargin) + } + + @available(iOS 8.0, *) + public var topMargin: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.topMargin) + } + + @available(iOS 8.0, *) + public var rightMargin: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.rightMargin) + } + + @available(iOS 8.0, *) + public var bottomMargin: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.bottomMargin) + } + + @available(iOS 8.0, *) + public var leadingMargin: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.leadingMargin) + } + + @available(iOS 8.0, *) + public var trailingMargin: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.trailingMargin) + } + + @available(iOS 8.0, *) + public var centerXWithinMargins: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerXWithinMargins) + } + + @available(iOS 8.0, *) + public var centerYWithinMargins: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerYWithinMargins) + } + + @available(iOS 8.0, *) + public var margins: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.margins) + } + + @available(iOS 8.0, *) + public var centerWithinMargins: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerWithinMargins) + } + +} diff --git a/Example/Pods/SnapKit/Source/ConstraintDescription.swift b/Example/Pods/SnapKit/Source/ConstraintDescription.swift index 6eb5492..d961fb5 100644 --- a/Example/Pods/SnapKit/Source/ConstraintDescription.swift +++ b/Example/Pods/SnapKit/Source/ConstraintDescription.swift @@ -1,7 +1,7 @@ // // SnapKit // -// Copyright (c) 2011-2015 SnapKit Team - https://github.com/SnapKit +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -22,585 +22,48 @@ // THE SOFTWARE. #if os(iOS) || os(tvOS) -import UIKit + import UIKit #else -import AppKit + import AppKit #endif -/** - Used to expose the final API of a `ConstraintDescription` which allows getting a constraint from it - */ -public protocol ConstraintDescriptionFinalizable: class { - - var constraint: Constraint { get } - - func labeled(label: String) -> ConstraintDescriptionFinalizable - -} - -/** - Used to expose priority APIs - */ -public protocol ConstraintDescriptionPriortizable: ConstraintDescriptionFinalizable { - - func priority(priority: Float) -> ConstraintDescriptionFinalizable - func priority(priority: Double) -> ConstraintDescriptionFinalizable - func priority(priority: CGFloat) -> ConstraintDescriptionFinalizable - func priority(priority: UInt) -> ConstraintDescriptionFinalizable - func priority(priority: Int) -> ConstraintDescriptionFinalizable - func priorityRequired() -> ConstraintDescriptionFinalizable - func priorityHigh() -> ConstraintDescriptionFinalizable - func priorityMedium() -> ConstraintDescriptionFinalizable - func priorityLow() -> ConstraintDescriptionFinalizable -} - -/** - Used to expose multiplier & constant APIs -*/ -public protocol ConstraintDescriptionEditable: ConstraintDescriptionPriortizable { - - func multipliedBy(amount: Float) -> ConstraintDescriptionEditable - func multipliedBy(amount: Double) -> ConstraintDescriptionEditable - func multipliedBy(amount: CGFloat) -> ConstraintDescriptionEditable - func multipliedBy(amount: Int) -> ConstraintDescriptionEditable - func multipliedBy(amount: UInt) -> ConstraintDescriptionEditable - - func dividedBy(amount: Float) -> ConstraintDescriptionEditable - func dividedBy(amount: Double) -> ConstraintDescriptionEditable - func dividedBy(amount: CGFloat) -> ConstraintDescriptionEditable - func dividedBy(amount: Int) -> ConstraintDescriptionEditable - func dividedBy(amount: UInt) -> ConstraintDescriptionEditable - - func offset(amount: Float) -> ConstraintDescriptionEditable - func offset(amount: Double) -> ConstraintDescriptionEditable - func offset(amount: CGFloat) -> ConstraintDescriptionEditable - func offset(amount: Int) -> ConstraintDescriptionEditable - func offset(amount: UInt) -> ConstraintDescriptionEditable - func offset(amount: CGPoint) -> ConstraintDescriptionEditable - func offset(amount: CGSize) -> ConstraintDescriptionEditable - func offset(amount: EdgeInsets) -> ConstraintDescriptionEditable - - func inset(amount: Float) -> ConstraintDescriptionEditable - func inset(amount: Double) -> ConstraintDescriptionEditable - func inset(amount: CGFloat) -> ConstraintDescriptionEditable - func inset(amount: Int) -> ConstraintDescriptionEditable - func inset(amount: UInt) -> ConstraintDescriptionEditable - func inset(amount: EdgeInsets) -> ConstraintDescriptionEditable -} - -/** - Used to expose relation APIs -*/ -public protocol ConstraintDescriptionRelatable: class { - - func equalTo(other: ConstraintItem) -> ConstraintDescriptionEditable - func equalTo(other: View) -> ConstraintDescriptionEditable - @available(iOS 7.0, *) - func equalTo(other: LayoutSupport) -> ConstraintDescriptionEditable - @available(iOS 9.0, OSX 10.11, *) - func equalTo(other: NSLayoutAnchor) -> ConstraintDescriptionEditable - func equalTo(other: Float) -> ConstraintDescriptionEditable - func equalTo(other: Double) -> ConstraintDescriptionEditable - func equalTo(other: CGFloat) -> ConstraintDescriptionEditable - func equalTo(other: Int) -> ConstraintDescriptionEditable - func equalTo(other: UInt) -> ConstraintDescriptionEditable - func equalTo(other: CGSize) -> ConstraintDescriptionEditable - func equalTo(other: CGPoint) -> ConstraintDescriptionEditable - func equalTo(other: EdgeInsets) -> ConstraintDescriptionEditable - - func lessThanOrEqualTo(other: ConstraintItem) -> ConstraintDescriptionEditable - func lessThanOrEqualTo(other: View) -> ConstraintDescriptionEditable - @available(iOS 7.0, *) - func lessThanOrEqualTo(other: LayoutSupport) -> ConstraintDescriptionEditable - @available(iOS 9.0, OSX 10.11, *) - func lessThanOrEqualTo(other: NSLayoutAnchor) -> ConstraintDescriptionEditable - func lessThanOrEqualTo(other: Float) -> ConstraintDescriptionEditable - func lessThanOrEqualTo(other: Double) -> ConstraintDescriptionEditable - func lessThanOrEqualTo(other: CGFloat) -> ConstraintDescriptionEditable - func lessThanOrEqualTo(other: Int) -> ConstraintDescriptionEditable - func lessThanOrEqualTo(other: UInt) -> ConstraintDescriptionEditable - func lessThanOrEqualTo(other: CGSize) -> ConstraintDescriptionEditable - func lessThanOrEqualTo(other: CGPoint) -> ConstraintDescriptionEditable - func lessThanOrEqualTo(other: EdgeInsets) -> ConstraintDescriptionEditable - - func greaterThanOrEqualTo(other: ConstraintItem) -> ConstraintDescriptionEditable - func greaterThanOrEqualTo(other: View) -> ConstraintDescriptionEditable - @available(iOS 7.0, *) - func greaterThanOrEqualTo(other: LayoutSupport) -> ConstraintDescriptionEditable - @available(iOS 9.0, OSX 10.11, *) - func greaterThanOrEqualTo(other: NSLayoutAnchor) -> ConstraintDescriptionEditable - func greaterThanOrEqualTo(other: Float) -> ConstraintDescriptionEditable - func greaterThanOrEqualTo(other: Double) -> ConstraintDescriptionEditable - func greaterThanOrEqualTo(other: CGFloat) -> ConstraintDescriptionEditable - func greaterThanOrEqualTo(other: Int) -> ConstraintDescriptionEditable - func greaterThanOrEqualTo(other: UInt) -> ConstraintDescriptionEditable - func greaterThanOrEqualTo(other: CGSize) -> ConstraintDescriptionEditable - func greaterThanOrEqualTo(other: CGPoint) -> ConstraintDescriptionEditable - func greaterThanOrEqualTo(other: EdgeInsets) -> ConstraintDescriptionEditable - -} -/** - Used to expose chaining APIs -*/ -public protocol ConstraintDescriptionExtendable: ConstraintDescriptionRelatable { - - var left: ConstraintDescriptionExtendable { get } - var top: ConstraintDescriptionExtendable { get } - var bottom: ConstraintDescriptionExtendable { get } - var right: ConstraintDescriptionExtendable { get } - var leading: ConstraintDescriptionExtendable { get } - var trailing: ConstraintDescriptionExtendable { get } - var width: ConstraintDescriptionExtendable { get } - var height: ConstraintDescriptionExtendable { get } - var centerX: ConstraintDescriptionExtendable { get } - var centerY: ConstraintDescriptionExtendable { get } - var baseline: ConstraintDescriptionExtendable { get } - - @available(iOS 8.0, *) - var firstBaseline: ConstraintDescriptionExtendable { get } - @available(iOS 8.0, *) - var leftMargin: ConstraintDescriptionExtendable { get } - @available(iOS 8.0, *) - var rightMargin: ConstraintDescriptionExtendable { get } - @available(iOS 8.0, *) - var topMargin: ConstraintDescriptionExtendable { get } - @available(iOS 8.0, *) - var bottomMargin: ConstraintDescriptionExtendable { get } - @available(iOS 8.0, *) - var leadingMargin: ConstraintDescriptionExtendable { get } - @available(iOS 8.0, *) - var trailingMargin: ConstraintDescriptionExtendable { get } - @available(iOS 8.0, *) - var centerXWithinMargins: ConstraintDescriptionExtendable { get } - @available(iOS 8.0, *) - var centerYWithinMargins: ConstraintDescriptionExtendable { get } -} - -/** - Used to internally manage building constraint - */ -internal class ConstraintDescription: ConstraintDescriptionExtendable, ConstraintDescriptionEditable, ConstraintDescriptionFinalizable { - - internal var left: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.Left) } - internal var top: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.Top) } - internal var right: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.Right) } - internal var bottom: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.Bottom) } - internal var leading: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.Leading) } - internal var trailing: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.Trailing) } - internal var width: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.Width) } - internal var height: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.Height) } - internal var centerX: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.CenterX) } - internal var centerY: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.CenterY) } - internal var baseline: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.Baseline) } - internal var label: String? - - @available(iOS 8.0, *) - internal var firstBaseline: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.FirstBaseline) } - @available(iOS 8.0, *) - internal var leftMargin: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.LeftMargin) } - @available(iOS 8.0, *) - internal var rightMargin: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.RightMargin) } - @available(iOS 8.0, *) - internal var topMargin: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.TopMargin) } - @available(iOS 8.0, *) - internal var bottomMargin: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.BottomMargin) } - @available(iOS 8.0, *) - internal var leadingMargin: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.LeadingMargin) } - @available(iOS 8.0, *) - internal var trailingMargin: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.TrailingMargin) } - @available(iOS 8.0, *) - internal var centerXWithinMargins: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.CenterXWithinMargins) } - @available(iOS 8.0, *) - internal var centerYWithinMargins: ConstraintDescriptionExtendable { return self.addConstraint(ConstraintAttributes.CenterYWithinMargins) } - - // MARK: initializer - - init(fromItem: ConstraintItem) { - self.fromItem = fromItem - self.toItem = ConstraintItem(object: nil, attributes: ConstraintAttributes.None) - } - - // MARK: equalTo - - internal func equalTo(other: ConstraintItem) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .Equal) - } - internal func equalTo(other: View) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .Equal) - } - @available(iOS 7.0, *) - internal func equalTo(other: LayoutSupport) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .Equal) - } - @available(iOS 9.0, OSX 10.11, *) - internal func equalTo(other: NSLayoutAnchor) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .Equal) - } - internal func equalTo(other: Float) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .Equal) - } - internal func equalTo(other: Double) -> ConstraintDescriptionEditable { - return self.constrainTo(Float(other), relation: .Equal) - } - internal func equalTo(other: CGFloat) -> ConstraintDescriptionEditable { - return self.constrainTo(Float(other), relation: .Equal) - } - internal func equalTo(other: Int) -> ConstraintDescriptionEditable { - return self.constrainTo(Float(other), relation: .Equal) - } - internal func equalTo(other: UInt) -> ConstraintDescriptionEditable { - return self.constrainTo(Float(other), relation: .Equal) - } - internal func equalTo(other: CGSize) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .Equal) - } - internal func equalTo(other: CGPoint) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .Equal) - } - internal func equalTo(other: EdgeInsets) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .Equal) - } - - // MARK: lessThanOrEqualTo - - internal func lessThanOrEqualTo(other: ConstraintItem) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .LessThanOrEqualTo) - } - internal func lessThanOrEqualTo(other: View) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .LessThanOrEqualTo) - } - @available(iOS 7.0, *) - internal func lessThanOrEqualTo(other: LayoutSupport) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .LessThanOrEqualTo) - } - @available(iOS 9.0, OSX 10.11, *) - internal func lessThanOrEqualTo(other: NSLayoutAnchor) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .LessThanOrEqualTo) - } - internal func lessThanOrEqualTo(other: Float) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .LessThanOrEqualTo) - } - internal func lessThanOrEqualTo(other: Double) -> ConstraintDescriptionEditable { - return self.constrainTo(Float(other), relation: .LessThanOrEqualTo) - } - internal func lessThanOrEqualTo(other: CGFloat) -> ConstraintDescriptionEditable { - return self.constrainTo(Float(other), relation: .LessThanOrEqualTo) - } - internal func lessThanOrEqualTo(other: Int) -> ConstraintDescriptionEditable { - return self.constrainTo(Float(other), relation: .LessThanOrEqualTo) - } - internal func lessThanOrEqualTo(other: UInt) -> ConstraintDescriptionEditable { - return self.constrainTo(Float(other), relation: .LessThanOrEqualTo) - } - internal func lessThanOrEqualTo(other: CGSize) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .LessThanOrEqualTo) - } - internal func lessThanOrEqualTo(other: CGPoint) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .LessThanOrEqualTo) - } - internal func lessThanOrEqualTo(other: EdgeInsets) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .LessThanOrEqualTo) - } - - // MARK: greaterThanOrEqualTo - - internal func greaterThanOrEqualTo(other: ConstraintItem) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .GreaterThanOrEqualTo) - } - internal func greaterThanOrEqualTo(other: View) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .GreaterThanOrEqualTo) - } - @available(iOS 7.0, *) - internal func greaterThanOrEqualTo(other: LayoutSupport) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .GreaterThanOrEqualTo) - } - @available(iOS 9.0, OSX 10.11, *) - internal func greaterThanOrEqualTo(other: NSLayoutAnchor) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .LessThanOrEqualTo) - } - internal func greaterThanOrEqualTo(other: Float) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .GreaterThanOrEqualTo) - } - internal func greaterThanOrEqualTo(other: Double) -> ConstraintDescriptionEditable { - return self.constrainTo(Float(other), relation: .GreaterThanOrEqualTo) - } - internal func greaterThanOrEqualTo(other: CGFloat) -> ConstraintDescriptionEditable { - return self.constrainTo(Float(other), relation: .GreaterThanOrEqualTo) - } - internal func greaterThanOrEqualTo(other: Int) -> ConstraintDescriptionEditable { - return self.constrainTo(Float(other), relation: .GreaterThanOrEqualTo) - } - internal func greaterThanOrEqualTo(other: UInt) -> ConstraintDescriptionEditable { - return self.constrainTo(Float(other), relation: .GreaterThanOrEqualTo) - } - internal func greaterThanOrEqualTo(other: CGSize) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .GreaterThanOrEqualTo) - } - internal func greaterThanOrEqualTo(other: CGPoint) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .GreaterThanOrEqualTo) - } - internal func greaterThanOrEqualTo(other: EdgeInsets) -> ConstraintDescriptionEditable { - return self.constrainTo(other, relation: .GreaterThanOrEqualTo) - } - - // MARK: multiplier - - internal func multipliedBy(amount: Float) -> ConstraintDescriptionEditable { - self.multiplier = amount - return self - } - internal func multipliedBy(amount: Double) -> ConstraintDescriptionEditable { - return self.multipliedBy(Float(amount)) - } - internal func multipliedBy(amount: CGFloat) -> ConstraintDescriptionEditable { - return self.multipliedBy(Float(amount)) - } - internal func multipliedBy(amount: Int) -> ConstraintDescriptionEditable { - return self.multipliedBy(Float(amount)) - } - internal func multipliedBy(amount: UInt) -> ConstraintDescriptionEditable { - return self.multipliedBy(Float(amount)) - } - - internal func dividedBy(amount: Float) -> ConstraintDescriptionEditable { - self.multiplier = 1.0 / amount; - return self - } - internal func dividedBy(amount: Double) -> ConstraintDescriptionEditable { - return self.dividedBy(Float(amount)) - } - internal func dividedBy(amount: CGFloat) -> ConstraintDescriptionEditable { - return self.dividedBy(Float(amount)) - } - internal func dividedBy(amount: Int) -> ConstraintDescriptionEditable { - return self.dividedBy(Float(amount)) - } - internal func dividedBy(amount: UInt) -> ConstraintDescriptionEditable { - return self.dividedBy(Float(amount)) - } - - // MARK: offset - - internal func offset(amount: Float) -> ConstraintDescriptionEditable { - self.constant = amount - return self - } - internal func offset(amount: Double) -> ConstraintDescriptionEditable { - return self.offset(Float(amount)) - } - internal func offset(amount: CGFloat) -> ConstraintDescriptionEditable { - return self.offset(Float(amount)) - } - internal func offset(amount: Int) -> ConstraintDescriptionEditable { - return self.offset(Float(amount)) - } - internal func offset(amount: UInt) -> ConstraintDescriptionEditable { - return self.offset(Float(amount)) - } - internal func offset(amount: CGPoint) -> ConstraintDescriptionEditable { - self.constant = amount - return self - } - internal func offset(amount: CGSize) -> ConstraintDescriptionEditable { - self.constant = amount - return self - } - internal func offset(amount: EdgeInsets) -> ConstraintDescriptionEditable { - self.constant = amount - return self - } - - // MARK: inset - - internal func inset(amount: Float) -> ConstraintDescriptionEditable { - let value = CGFloat(amount) - self.constant = EdgeInsets(top: value, left: value, bottom: -value, right: -value) - return self - } - internal func inset(amount: Double) -> ConstraintDescriptionEditable { - let value = CGFloat(amount) - self.constant = EdgeInsets(top: value, left: value, bottom: -value, right: -value) - return self - } - internal func inset(amount: CGFloat) -> ConstraintDescriptionEditable { - self.constant = EdgeInsets(top: amount, left: amount, bottom: -amount, right: -amount) - return self - } - internal func inset(amount: Int) -> ConstraintDescriptionEditable { - let value = CGFloat(amount) - self.constant = EdgeInsets(top: value, left: value, bottom: -value, right: -value) - return self - } - internal func inset(amount: UInt) -> ConstraintDescriptionEditable { - let value = CGFloat(amount) - self.constant = EdgeInsets(top: value, left: value, bottom: -value, right: -value) - return self - } - internal func inset(amount: EdgeInsets) -> ConstraintDescriptionEditable { - self.constant = EdgeInsets(top: amount.top, left: amount.left, bottom: -amount.bottom, right: -amount.right) - return self - } - - // MARK: priority - - internal func priority(priority: Float) -> ConstraintDescriptionFinalizable { - self.priority = priority - return self - } - internal func priority(priority: Double) -> ConstraintDescriptionFinalizable { - return self.priority(Float(priority)) - } - internal func priority(priority: CGFloat) -> ConstraintDescriptionFinalizable { - return self.priority(Float(priority)) - } - func priority(priority: UInt) -> ConstraintDescriptionFinalizable { - return self.priority(Float(priority)) - } - internal func priority(priority: Int) -> ConstraintDescriptionFinalizable { - return self.priority(Float(priority)) - } - internal func priorityRequired() -> ConstraintDescriptionFinalizable { - return self.priority(1000.0) - } - internal func priorityHigh() -> ConstraintDescriptionFinalizable { - return self.priority(750.0) - } - internal func priorityMedium() -> ConstraintDescriptionFinalizable { - #if os(iOS) || os(tvOS) - return self.priority(500.0) - #else - return self.priority(501.0) - #endif - } - internal func priorityLow() -> ConstraintDescriptionFinalizable { - return self.priority(250.0) - } - - // MARK: Constraint - - internal var constraint: Constraint { - if self.concreteConstraint == nil { - if self.relation == nil { - fatalError("Attempting to create a constraint from a ConstraintDescription before it has been fully chained.") - } - self.concreteConstraint = ConcreteConstraint( - fromItem: self.fromItem, - toItem: self.toItem, - relation: self.relation!, - constant: self.constant, - multiplier: self.multiplier, - priority: self.priority, - label: self.label) - } - return self.concreteConstraint! - } - - func labeled(label: String) -> ConstraintDescriptionFinalizable { - self.label = label - return self - } - - // MARK: Private - - private let fromItem: ConstraintItem - private var toItem: ConstraintItem { - willSet { - if self.concreteConstraint != nil { - fatalError("Attempting to modify a ConstraintDescription after its constraint has been created.") - } - } - } - private var relation: ConstraintRelation? { - willSet { - if self.concreteConstraint != nil { - fatalError("Attempting to modify a ConstraintDescription after its constraint has been created.") - } - } - } - private var constant: Any = Float(0.0) { - willSet { - if self.concreteConstraint != nil { - fatalError("Attempting to modify a ConstraintDescription after its constraint has been created.") - } - } - } - private var multiplier: Float = 1.0 { - willSet { - if self.concreteConstraint != nil { - fatalError("Attempting to modify a ConstraintDescription after its constraint has been created.") - } - } - } - private var priority: Float = 1000.0 { - willSet { - if self.concreteConstraint != nil { - fatalError("Attempting to modify a ConstraintDescription after its constraint has been created.") - } - } - } - private var concreteConstraint: ConcreteConstraint? = nil - - private func addConstraint(attributes: ConstraintAttributes) -> ConstraintDescription { - if self.relation == nil { - self.fromItem.attributes += attributes +public class ConstraintDescription { + + internal let view: ConstraintView + internal var attributes: ConstraintAttributes + internal var relation: ConstraintRelation? = nil + internal var sourceLocation: (String, UInt)? = nil + internal var label: String? = nil + internal var related: ConstraintItem? = nil + internal var multiplier: ConstraintMultiplierTarget = 1.0 + internal var constant: ConstraintConstantTarget = 0.0 + internal var priority: ConstraintPriorityTarget = 1000.0 + internal lazy var constraint: Constraint? = { + guard let relation = self.relation, + let related = self.related, + let sourceLocation = self.sourceLocation else { + return nil } - return self + let from = ConstraintItem(target: self.view, attributes: self.attributes) + + return Constraint( + from: from, + to: related, + relation: relation, + sourceLocation: sourceLocation, + label: self.label, + multiplier: self.multiplier, + constant: self.constant, + priority: self.priority + ) + }() + + // MARK: Initialization + + internal init(view: ConstraintView, attributes: ConstraintAttributes) { + self.view = view + self.attributes = attributes } - private func constrainTo(other: ConstraintItem, relation: ConstraintRelation) -> ConstraintDescription { - if other.attributes != ConstraintAttributes.None { - let toLayoutAttributes = other.attributes.layoutAttributes - if toLayoutAttributes.count > 1 { - let fromLayoutAttributes = self.fromItem.attributes.layoutAttributes - if toLayoutAttributes != fromLayoutAttributes { - NSException(name: "Invalid Constraint", reason: "Cannot constrain to multiple non identical attributes", userInfo: nil).raise() - return self - } - other.attributes = ConstraintAttributes.None - } - } - self.toItem = other - self.relation = relation - return self - } - - private func constrainTo(other: View, relation: ConstraintRelation) -> ConstraintDescription { - return constrainTo(ConstraintItem(object: other, attributes: ConstraintAttributes.None), relation: relation) - } - - @available(iOS 7.0, *) - private func constrainTo(other: LayoutSupport, relation: ConstraintRelation) -> ConstraintDescription { - return constrainTo(ConstraintItem(object: other, attributes: ConstraintAttributes.None), relation: relation) - } - - @available(iOS 9.0, OSX 10.11, *) - private func constrainTo(other: NSLayoutAnchor, relation: ConstraintRelation) -> ConstraintDescription { - return constrainTo(ConstraintItem(object: other, attributes: ConstraintAttributes.None), relation: relation) - } - - private func constrainTo(other: Float, relation: ConstraintRelation) -> ConstraintDescription { - self.constant = other - return constrainTo(ConstraintItem(object: nil, attributes: ConstraintAttributes.None), relation: relation) - } - - private func constrainTo(other: Double, relation: ConstraintRelation) -> ConstraintDescription { - self.constant = other - return constrainTo(ConstraintItem(object: nil, attributes: ConstraintAttributes.None), relation: relation) - } - - private func constrainTo(other: CGSize, relation: ConstraintRelation) -> ConstraintDescription { - self.constant = other - return constrainTo(ConstraintItem(object: nil, attributes: ConstraintAttributes.None), relation: relation) - } - - private func constrainTo(other: CGPoint, relation: ConstraintRelation) -> ConstraintDescription { - self.constant = other - return constrainTo(ConstraintItem(object: nil, attributes: ConstraintAttributes.None), relation: relation) - } - - private func constrainTo(other: EdgeInsets, relation: ConstraintRelation) -> ConstraintDescription { - self.constant = other - return constrainTo(ConstraintItem(object: nil, attributes: ConstraintAttributes.None), relation: relation) - } } diff --git a/Example/Pods/SnapKit/Source/ConstraintInsetTarget.swift b/Example/Pods/SnapKit/Source/ConstraintInsetTarget.swift new file mode 100644 index 0000000..ba8a0f3 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintInsetTarget.swift @@ -0,0 +1,72 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public protocol ConstraintInsetTarget: ConstraintConstantTarget { +} + +extension Int: ConstraintInsetTarget { +} + +extension UInt: ConstraintInsetTarget { +} + +extension Float: ConstraintInsetTarget { +} + +extension Double: ConstraintInsetTarget { +} + +extension CGFloat: ConstraintInsetTarget { +} + +extension ConstraintInsets: ConstraintInsetTarget { +} + +extension ConstraintInsetTarget { + + internal var constraintInsetTargetValue: ConstraintInsets { + if let amount = self as? ConstraintInsets { + return amount + } else if let amount = self as? Float { + return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) + } else if let amount = self as? Double { + return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) + } else if let amount = self as? CGFloat { + return ConstraintInsets(top: amount, left: amount, bottom: amount, right: amount) + } else if let amount = self as? Int { + return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) + } else if let amount = self as? UInt { + return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) + } else { + return ConstraintInsets(top: 0, left: 0, bottom: 0, right: 0) + } + } + +} diff --git a/Example/Pods/SnapKit/Source/ConstraintInsets.swift b/Example/Pods/SnapKit/Source/ConstraintInsets.swift new file mode 100644 index 0000000..6ecac6b --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintInsets.swift @@ -0,0 +1,35 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +#if os(iOS) || os(tvOS) + public typealias ConstraintInsets = UIEdgeInsets +#else + public typealias ConstraintInsets = EdgeInsets +#endif diff --git a/Example/Pods/SnapKit/Source/ConstraintItem.swift b/Example/Pods/SnapKit/Source/ConstraintItem.swift index b2c9062..a9477da 100644 --- a/Example/Pods/SnapKit/Source/ConstraintItem.swift +++ b/Example/Pods/SnapKit/Source/ConstraintItem.swift @@ -1,7 +1,7 @@ // // SnapKit // -// Copyright (c) 2011-2015 SnapKit Team - https://github.com/SnapKit +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -22,47 +22,40 @@ // THE SOFTWARE. #if os(iOS) || os(tvOS) -import UIKit + import UIKit #else -import AppKit + import AppKit #endif -/** - Used to assist in building a constraint -*/ -public class ConstraintItem { + +public class ConstraintItem: Equatable { + + internal weak var target: AnyObject? + internal let attributes: ConstraintAttributes - internal init(object: AnyObject?, attributes: ConstraintAttributes) { - self.object = object + internal init(target: AnyObject?, attributes: ConstraintAttributes) { + self.target = target self.attributes = attributes } - internal weak var object: AnyObject? - internal var attributes: ConstraintAttributes - - internal var view: View? { - return self.object as? View + internal var view: ConstraintView? { + return self.target as? ConstraintView } - @available(iOS 7.0, *) - internal var layoutSupport: LayoutSupport? { - return self.object as? LayoutSupport - } } - -internal func ==(left: ConstraintItem, right: ConstraintItem) -> Bool { - if left.object == nil { - return false +public func ==(lhs: ConstraintItem, rhs: ConstraintItem) -> Bool { + // pointer equality + guard lhs !== rhs else { + return true } - if right.object == nil { - return false - } - if left.object !== right.object { - return false - } - if left.attributes != right.attributes { - return false + + // must both have valid targets and identical attributes + guard let target1 = lhs.target, + let target2 = rhs.target, + target1 === target2 && lhs.attributes == rhs.attributes else { + return false } + return true -} \ No newline at end of file +} diff --git a/Example/Pods/SnapKit/Source/ConstraintLayoutGuide.swift b/Example/Pods/SnapKit/Source/ConstraintLayoutGuide.swift new file mode 100644 index 0000000..f6eba82 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintLayoutGuide.swift @@ -0,0 +1,36 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +#if os(iOS) || os(tvOS) + @available(iOS 9.0, *) + public typealias ConstraintLayoutGuide = UILayoutGuide +#else + public class ConstraintLayoutGuide {} +#endif diff --git a/Example/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift b/Example/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift new file mode 100644 index 0000000..62bd9b4 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift @@ -0,0 +1,45 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +@available(iOS 9.0, *) +public struct ConstraintLayoutGuideDSL: ConstraintAttributesDSL { + + public var target: AnyObject? { + return self.guide + } + + internal let guide: ConstraintLayoutGuide + + internal init(guide: ConstraintLayoutGuide) { + self.guide = guide + + } + +} diff --git a/Example/Pods/SnapKit/Source/ConstraintLayoutSupport.swift b/Example/Pods/SnapKit/Source/ConstraintLayoutSupport.swift new file mode 100644 index 0000000..e92e9fb --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintLayoutSupport.swift @@ -0,0 +1,36 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +#if os(iOS) || os(tvOS) + @available(iOS 8.0, *) + public typealias ConstraintLayoutSupport = UILayoutSupport +#else + public class ConstraintLayoutSupport {} +#endif diff --git a/Example/Pods/SnapKit/Source/ViewController+SnapKit.swift b/Example/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift similarity index 56% rename from Example/Pods/SnapKit/Source/ViewController+SnapKit.swift rename to Example/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift index ed5451b..5d6ae89 100644 --- a/Example/Pods/SnapKit/Source/ViewController+SnapKit.swift +++ b/Example/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift @@ -1,7 +1,7 @@ // // SnapKit // -// Copyright (c) 2011-2015 SnapKit Team - https://github.com/SnapKit +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -22,24 +22,35 @@ // THE SOFTWARE. #if os(iOS) || os(tvOS) -import UIKit + import UIKit +#else + import AppKit +#endif + -/** - Used to expose public API on view controllers -*/ -public extension UIViewController { +@available(iOS 8.0, *) +public struct ConstraintLayoutSupportDSL: ConstraintDSL { - /// top layout guide top - public var snp_topLayoutGuideTop: ConstraintItem { return ConstraintItem(object: self.topLayoutGuide, attributes: ConstraintAttributes.Top) } + public var target: AnyObject? { + return self.support + } - /// top layout guide bottom - public var snp_topLayoutGuideBottom: ConstraintItem { return ConstraintItem(object: self.topLayoutGuide, attributes: ConstraintAttributes.Bottom) } + internal let support: ConstraintLayoutSupport - /// bottom layout guide top - public var snp_bottomLayoutGuideTop: ConstraintItem { return ConstraintItem(object: self.bottomLayoutGuide, attributes: ConstraintAttributes.Top) } + internal init(support: ConstraintLayoutSupport) { + self.support = support + + } - /// bottom layout guide bottom - public var snp_bottomLayoutGuideBottom: ConstraintItem { return ConstraintItem(object: self.bottomLayoutGuide, attributes: ConstraintAttributes.Bottom) } + public var top: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.top) + } + public var bottom: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.bottom) + } + + public var height: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.height) + } } -#endif diff --git a/Example/Pods/SnapKit/Source/ConstraintMaker.swift b/Example/Pods/SnapKit/Source/ConstraintMaker.swift index 154b9dd..8b10fcd 100644 --- a/Example/Pods/SnapKit/Source/ConstraintMaker.swift +++ b/Example/Pods/SnapKit/Source/ConstraintMaker.swift @@ -1,7 +1,7 @@ // // SnapKit // -// Copyright (c) 2011-2015 SnapKit Team - https://github.com/SnapKit +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -22,175 +22,185 @@ // THE SOFTWARE. #if os(iOS) || os(tvOS) -import UIKit + import UIKit #else -import AppKit + import AppKit #endif -/** - Used to make constraints -*/ public class ConstraintMaker { - /// left edge - public var left: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.Left) } + public var left: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.left) + } - /// top edge - public var top: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.Top) } + public var top: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.top) + } - /// right edge - public var right: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.Right) } + public var bottom: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.bottom) + } - /// bottom edge - public var bottom: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.Bottom) } + public var right: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.right) + } - /// leading edge - public var leading: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.Leading) } + public var leading: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.leading) + } - /// trailing edge - public var trailing: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.Trailing) } + public var trailing: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.trailing) + } - /// width dimension - public var width: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.Width) } + public var width: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.width) + } - /// height dimension - public var height: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.Height) } + public var height: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.height) + } - /// centerX dimension - public var centerX: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.CenterX) } + public var centerX: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.centerX) + } - /// centerY dimension - public var centerY: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.CenterY) } + public var centerY: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.centerY) + } - /// baseline position - public var baseline: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.Baseline) } + @available(*, deprecated:3.0, message:"Use lastBaseline instead") + public var baseline: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.lastBaseline) + } - /// firse baseline position - @available(iOS 8.0, *) - public var firstBaseline: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.FirstBaseline) } + public var lastBaseline: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.lastBaseline) + } - /// left margin - @available(iOS 8.0, *) - public var leftMargin: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.LeftMargin) } + @available(iOS 8.0, OSX 10.11, *) + public var firstBaseline: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.firstBaseline) + } - /// right margin @available(iOS 8.0, *) - public var rightMargin: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.RightMargin) } + public var leftMargin: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.leftMargin) + } - /// top margin @available(iOS 8.0, *) - public var topMargin: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.TopMargin) } + public var rightMargin: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.rightMargin) + } - /// bottom margin @available(iOS 8.0, *) - public var bottomMargin: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.BottomMargin) } + public var bottomMargin: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.bottomMargin) + } - /// leading margin @available(iOS 8.0, *) - public var leadingMargin: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.LeadingMargin) } + public var leadingMargin: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.leadingMargin) + } - /// trailing margin @available(iOS 8.0, *) - public var trailingMargin: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.TrailingMargin) } + public var trailingMargin: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.trailingMargin) + } - /// centerX within margins @available(iOS 8.0, *) - public var centerXWithinMargins: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.CenterXWithinMargins) } + public var centerXWithinMargins: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.centerXWithinMargins) + } - /// centerY within margins @available(iOS 8.0, *) - public var centerYWithinMargins: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.CenterYWithinMargins) } - - /// top + left + bottom + right edges - public var edges: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.Edges) } - - /// width + height dimensions - public var size: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.Size) } + public var centerYWithinMargins: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.centerYWithinMargins) + } - // centerX + centerY positions - public var center: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.Center) } + public var edges: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.edges) + } + public var size: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.size) + } + public var center: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.center) + } - // top + left + bottom + right margins @available(iOS 8.0, *) - public var margins: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.Margins) } + public var margins: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.margins) + } - // centerX + centerY within margins @available(iOS 8.0, *) - public var centerWithinMargins: ConstraintDescriptionExtendable { return self.makeConstraintDescription(ConstraintAttributes.CenterWithinMargins) } + public var centerWithinMargins: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.centerWithinMargins) + } - internal init(view: View, file: String, line: UInt) { + private let view: ConstraintView + private var descriptions = [ConstraintDescription]() + + internal init(view: ConstraintView) { self.view = view - self.file = file - self.line = line + self.view.translatesAutoresizingMaskIntoConstraints = false } - internal let file: String - internal let line: UInt - internal let view: View - internal var constraintDescriptions = [ConstraintDescription]() - - internal func makeConstraintDescription(attributes: ConstraintAttributes) -> ConstraintDescription { - let item = ConstraintItem(object: self.view, attributes: attributes) - let constraintDescription = ConstraintDescription(fromItem: item) - self.constraintDescriptions.append(constraintDescription) - return constraintDescription + internal func makeExtendableWithAttributes(_ attributes: ConstraintAttributes) -> ConstraintMakerExtendable { + let description = ConstraintDescription(view: self.view, attributes: attributes) + self.descriptions.append(description) + return ConstraintMakerExtendable(description) } - internal class func prepareConstraints(view view: View, file: String = "Unknown", line: UInt = 0, @noescape closure: (make: ConstraintMaker) -> Void) -> [Constraint] { - let maker = ConstraintMaker(view: view, file: file, line: line) - closure(make: maker) - - let constraints = maker.constraintDescriptions.map { $0.constraint } - for constraint in constraints { - constraint.makerFile = maker.file - constraint.makerLine = maker.line - } + internal static func prepareConstraints(view: ConstraintView, closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { + let maker = ConstraintMaker(view: view) + closure(maker) + let constraints = maker.descriptions + .map { $0.constraint } + .filter { $0 != nil } + .map { $0! } return constraints } - internal class func makeConstraints(view view: View, file: String = "Unknown", line: UInt = 0, @noescape closure: (make: ConstraintMaker) -> Void) { - view.translatesAutoresizingMaskIntoConstraints = false - let maker = ConstraintMaker(view: view, file: file, line: line) - closure(make: maker) - - let constraints = maker.constraintDescriptions.map { $0.constraint as! ConcreteConstraint } + internal static func makeConstraints(view: ConstraintView, closure: (_ make: ConstraintMaker) -> Void) { + let maker = ConstraintMaker(view: view) + closure(maker) + let constraints = maker.descriptions + .map { $0.constraint } + .filter { $0 != nil } + .map { $0! } for constraint in constraints { - constraint.makerFile = maker.file - constraint.makerLine = maker.line - constraint.installOnView(updateExisting: false) + constraint.activateIfNeeded(updatingExisting: false) } } - internal class func remakeConstraints(view view: View, file: String = "Unknown", line: UInt = 0, @noescape closure: (make: ConstraintMaker) -> Void) { - view.translatesAutoresizingMaskIntoConstraints = false - let maker = ConstraintMaker(view: view, file: file, line: line) - closure(make: maker) - + internal static func remakeConstraints(view: ConstraintView, closure: (_ make: ConstraintMaker) -> Void) { self.removeConstraints(view: view) - let constraints = maker.constraintDescriptions.map { $0.constraint as! ConcreteConstraint } - for constraint in constraints { - constraint.makerFile = maker.file - constraint.makerLine = maker.line - constraint.installOnView(updateExisting: false) - } + self.makeConstraints(view: view, closure: closure) } - internal class func updateConstraints(view view: View, file: String = "Unknown", line: UInt = 0, @noescape closure: (make: ConstraintMaker) -> Void) { - view.translatesAutoresizingMaskIntoConstraints = false - let maker = ConstraintMaker(view: view, file: file, line: line) - closure(make: maker) + internal static func updateConstraints(view: ConstraintView, closure: (_ make: ConstraintMaker) -> Void) { + guard view.snp.layoutConstraints.count > 0 else { + self.makeConstraints(view: view, closure: closure) + return + } - let constraints = maker.constraintDescriptions.map { $0.constraint as! ConcreteConstraint} + let maker = ConstraintMaker(view: view) + closure(maker) + let constraints = maker.descriptions + .map { $0.constraint } + .filter { $0 != nil } + .map { $0! } for constraint in constraints { - constraint.makerFile = maker.file - constraint.makerLine = maker.line - constraint.installOnView(updateExisting: true) + constraint.activateIfNeeded(updatingExisting: true) } } - internal class func removeConstraints(view view: View) { - for existingLayoutConstraint in view.snp_installedLayoutConstraints { - existingLayoutConstraint.snp_constraint?.uninstall() + internal static func removeConstraints(view: ConstraintView) { + let constraints = view.snp.layoutConstraints.map { $0.constraint! } + for constraint in constraints { + constraint.deactivateIfNeeded() } } + } diff --git a/Example/Pods/SnapKit/Source/ConstraintMakerEditable.swift b/Example/Pods/SnapKit/Source/ConstraintMakerEditable.swift new file mode 100644 index 0000000..fb88c41 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintMakerEditable.swift @@ -0,0 +1,56 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public class ConstraintMakerEditable: ConstraintMakerPriortizable { + + @discardableResult + public func multipliedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable { + self.description.multiplier = amount + return self + } + + @discardableResult + public func dividedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable { + return self.multipliedBy(1.0 / amount.constraintMultiplierTargetValue) + } + + @discardableResult + public func offset(_ amount: ConstraintOffsetTarget) -> ConstraintMakerEditable { + self.description.constant = amount.constraintOffsetTargetValue + return self + } + + @discardableResult + public func inset(_ amount: ConstraintInsetTarget) -> ConstraintMakerEditable { + self.description.constant = amount.constraintInsetTargetValue + return self + } + +} diff --git a/Example/Pods/SnapKit/Source/ConstraintMakerExtendable.swift b/Example/Pods/SnapKit/Source/ConstraintMakerExtendable.swift new file mode 100644 index 0000000..658c833 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintMakerExtendable.swift @@ -0,0 +1,163 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public class ConstraintMakerExtendable: ConstraintMakerRelatable { + + public var left: ConstraintMakerExtendable { + self.description.attributes += .left + return self + } + + public var top: ConstraintMakerExtendable { + self.description.attributes += .top + return self + } + + public var bottom: ConstraintMakerExtendable { + self.description.attributes += .bottom + return self + } + + public var right: ConstraintMakerExtendable { + self.description.attributes += .right + return self + } + + public var leading: ConstraintMakerExtendable { + self.description.attributes += .leading + return self + } + + public var trailing: ConstraintMakerExtendable { + self.description.attributes += .trailing + return self + } + + public var width: ConstraintMakerExtendable { + self.description.attributes += .width + return self + } + + public var height: ConstraintMakerExtendable { + self.description.attributes += .height + return self + } + + public var centerX: ConstraintMakerExtendable { + self.description.attributes += .centerX + return self + } + + public var centerY: ConstraintMakerExtendable { + self.description.attributes += .centerY + return self + } + + @available(*, deprecated:3.0, message:"Use lastBaseline instead") + public var baseline: ConstraintMakerExtendable { + self.description.attributes += .lastBaseline + return self + } + + public var lastBaseline: ConstraintMakerExtendable { + self.description.attributes += .lastBaseline + return self + } + + @available(iOS 8.0, OSX 10.11, *) + public var firstBaseline: ConstraintMakerExtendable { + self.description.attributes += .firstBaseline + return self + } + + @available(iOS 8.0, *) + public var leftMargin: ConstraintMakerExtendable { + self.description.attributes += .leftMargin + return self + } + + @available(iOS 8.0, *) + public var rightMargin: ConstraintMakerExtendable { + self.description.attributes += .rightMargin + return self + } + + @available(iOS 8.0, *) + public var bottomMargin: ConstraintMakerExtendable { + self.description.attributes += .bottomMargin + return self + } + + @available(iOS 8.0, *) + public var leadingMargin: ConstraintMakerExtendable { + self.description.attributes += .leadingMargin + return self + } + + @available(iOS 8.0, *) + public var trailingMargin: ConstraintMakerExtendable { + self.description.attributes += .trailingMargin + return self + } + + @available(iOS 8.0, *) + public var centerXWithinMargins: ConstraintMakerExtendable { + self.description.attributes += .centerXWithinMargins + return self + } + + @available(iOS 8.0, *) + public var centerYWithinMargins: ConstraintMakerExtendable { + self.description.attributes += .centerYWithinMargins + return self + } + + public var edges: ConstraintMakerExtendable { + self.description.attributes += .edges + return self + } + public var size: ConstraintMakerExtendable { + self.description.attributes += .size + return self + } + + @available(iOS 8.0, *) + public var margins: ConstraintMakerExtendable { + self.description.attributes += .margins + return self + } + + @available(iOS 8.0, *) + public var centerWithinMargins: ConstraintMakerExtendable { + self.description.attributes += .centerWithinMargins + return self + } + +} diff --git a/Example/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift b/Example/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift new file mode 100644 index 0000000..4e1379e --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift @@ -0,0 +1,49 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public class ConstraintMakerFinalizable { + + internal let description: ConstraintDescription + + internal init(_ description: ConstraintDescription) { + self.description = description + } + + @discardableResult + public func labeled(_ label: String) -> ConstraintMakerFinalizable { + self.description.label = label + return self + } + + public var constraint: Constraint { + return self.description.constraint! + } + +} diff --git a/Example/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift b/Example/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift new file mode 100644 index 0000000..82a6de6 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift @@ -0,0 +1,67 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public class ConstraintMakerPriortizable: ConstraintMakerFinalizable { + + @discardableResult + public func priority(_ amount: ConstraintPriorityTarget) -> ConstraintMakerFinalizable { + self.description.priority = amount + return self + } + + @available(*, deprecated:3.0, message:"Use priority(_ amount: ConstraintPriorityTarget) instead.") + @discardableResult + public func priorityRequired() -> ConstraintMakerFinalizable { + return self.priority(1000) + } + + @available(*, deprecated:3.0, message:"Use priority(_ amount: ConstraintPriorityTarget) instead.") + @discardableResult + public func priorityHigh() -> ConstraintMakerFinalizable { + return self.priority(750) + } + + @available(*, deprecated:3.0, message:"Use priority(_ amount: ConstraintPriorityTarget) instead.") + @discardableResult + public func priorityMedium() -> ConstraintMakerFinalizable { + #if os(iOS) || os(tvOS) + return self.priority(500) + #else + return self.priority(501) + #endif + } + + @available(*, deprecated:3.0, message:"Use priority(_ amount: ConstraintPriorityTarget) instead.") + @discardableResult + public func priorityLow() -> ConstraintMakerFinalizable { + return self.priority(250) + } + +} diff --git a/Example/Pods/SnapKit/Source/ConstraintMakerRelatable.swift b/Example/Pods/SnapKit/Source/ConstraintMakerRelatable.swift new file mode 100644 index 0000000..40a46fa --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintMakerRelatable.swift @@ -0,0 +1,95 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public class ConstraintMakerRelatable { + + internal let description: ConstraintDescription + + internal init(_ description: ConstraintDescription) { + self.description = description + } + + internal func relatedTo(_ other: ConstraintRelatableTarget, relation: ConstraintRelation, file: String, line: UInt) -> ConstraintMakerEditable { + let related: ConstraintItem + let constant: ConstraintConstantTarget + + if let other = other as? ConstraintItem { + guard other.attributes == ConstraintAttributes.none || + other.attributes.layoutAttributes.count <= 1 || + other.attributes.layoutAttributes == self.description.attributes.layoutAttributes || + other.attributes == .edges && self.description.attributes == .margins || + other.attributes == .margins && self.description.attributes == .edges else { + fatalError("Cannot constraint to multiple non identical attributes. (\(file), \(line))"); + } + + related = other + constant = 0.0 + } else if let other = other as? ConstraintView { + related = ConstraintItem(target: other, attributes: ConstraintAttributes.none) + constant = 0.0 + } else if let other = other as? ConstraintConstantTarget { + related = ConstraintItem(target: nil, attributes: ConstraintAttributes.none) + constant = other + } else { + fatalError("Invalid constraint. (\(file), \(line))") + } + + let editable = ConstraintMakerEditable(self.description) + editable.description.sourceLocation = (file, line) + editable.description.relation = relation + editable.description.related = related + editable.description.constant = constant + return editable + } + + @discardableResult + public func equalTo(_ other: ConstraintRelatableTarget, _ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable { + return self.relatedTo(other, relation: .equal, file: file, line: line) + } + + @discardableResult + public func equalToSuperview(_ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable { + guard let other = self.description.view.superview else { + fatalError("Expected superview but found nil when attempting make constraint `equalToSuperview`.") + } + return self.relatedTo(other, relation: .equal, file: file, line: line) + } + + @discardableResult + public func lessThanOrEqualTo(_ other: ConstraintRelatableTarget, _ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable { + return self.relatedTo(other, relation: .lessThanOrEqual, file: file, line: line) + } + + @discardableResult + public func greaterThanOrEqualTo(_ other: ConstraintRelatableTarget, _ file: String = #file, line: UInt = #line) -> ConstraintMakerEditable { + return self.relatedTo(other, relation: .greaterThanOrEqual, file: file, line: line) + } + +} diff --git a/Example/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift b/Example/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift new file mode 100644 index 0000000..6fecd33 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift @@ -0,0 +1,75 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public protocol ConstraintMultiplierTarget { + + var constraintMultiplierTargetValue: CGFloat { get } + +} + +extension Int: ConstraintMultiplierTarget { + + public var constraintMultiplierTargetValue: CGFloat { + return CGFloat(self) + } + +} + +extension UInt: ConstraintMultiplierTarget { + + public var constraintMultiplierTargetValue: CGFloat { + return CGFloat(self) + } + +} + +extension Float: ConstraintMultiplierTarget { + + public var constraintMultiplierTargetValue: CGFloat { + return CGFloat(self) + } + +} + +extension Double: ConstraintMultiplierTarget { + + public var constraintMultiplierTargetValue: CGFloat { + return CGFloat(self) + } + +} + +extension CGFloat: ConstraintMultiplierTarget { + + public var constraintMultiplierTargetValue: CGFloat { + return self + } + +} diff --git a/Example/Pods/SnapKit/Source/ConstraintOffsetTarget.swift b/Example/Pods/SnapKit/Source/ConstraintOffsetTarget.swift new file mode 100644 index 0000000..bd9e0a1 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintOffsetTarget.swift @@ -0,0 +1,69 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public protocol ConstraintOffsetTarget: ConstraintConstantTarget { +} + +extension Int: ConstraintOffsetTarget { +} + +extension UInt: ConstraintOffsetTarget { +} + +extension Float: ConstraintOffsetTarget { +} + +extension Double: ConstraintOffsetTarget { +} + +extension CGFloat: ConstraintOffsetTarget { +} + +extension ConstraintOffsetTarget { + + internal var constraintOffsetTargetValue: CGFloat { + let offset: CGFloat + if let amount = self as? Float { + offset = CGFloat(amount) + } else if let amount = self as? Double { + offset = CGFloat(amount) + } else if let amount = self as? CGFloat { + offset = CGFloat(amount) + } else if let amount = self as? Int { + offset = CGFloat(amount) + } else if let amount = self as? UInt { + offset = CGFloat(amount) + } else { + offset = 0.0 + } + return offset + } + +} diff --git a/Example/Pods/SnapKit/Source/ConstraintPriorityTarget.swift b/Example/Pods/SnapKit/Source/ConstraintPriorityTarget.swift new file mode 100644 index 0000000..eb32f79 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintPriorityTarget.swift @@ -0,0 +1,75 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public protocol ConstraintPriorityTarget { + + var constraintPriorityTargetValue: Float { get } + +} + +extension Int: ConstraintPriorityTarget { + + public var constraintPriorityTargetValue: Float { + return Float(self) + } + +} + +extension UInt: ConstraintPriorityTarget { + + public var constraintPriorityTargetValue: Float { + return Float(self) + } + +} + +extension Float: ConstraintPriorityTarget { + + public var constraintPriorityTargetValue: Float { + return self + } + +} + +extension Double: ConstraintPriorityTarget { + + public var constraintPriorityTargetValue: Float { + return Float(self) + } + +} + +extension CGFloat: ConstraintPriorityTarget { + + public var constraintPriorityTargetValue: Float { + return Float(self) + } + +} diff --git a/Example/Pods/SnapKit/Source/EdgeInsets.swift b/Example/Pods/SnapKit/Source/ConstraintRelatableTarget.swift similarity index 62% rename from Example/Pods/SnapKit/Source/EdgeInsets.swift rename to Example/Pods/SnapKit/Source/ConstraintRelatableTarget.swift index 299874a..4d1e37d 100644 --- a/Example/Pods/SnapKit/Source/EdgeInsets.swift +++ b/Example/Pods/SnapKit/Source/ConstraintRelatableTarget.swift @@ -1,7 +1,7 @@ // // SnapKit // -// Copyright (c) 2011-2015 SnapKit Team - https://github.com/SnapKit +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -22,17 +22,41 @@ // THE SOFTWARE. #if os(iOS) || os(tvOS) -import UIKit -public typealias EdgeInsets = UIEdgeInsets -public func EdgeInsetsMake(top: CGFloat, left: CGFloat, bottom: CGFloat, right: CGFloat) -> EdgeInsets { - return EdgeInsets(top: top, left: left, bottom: bottom, right: right) -} -public let EdgeInsetsZero = EdgeInsets(top: 0, left: 0, bottom: 0, right: 0) + import UIKit #else -import AppKit -public typealias EdgeInsets = NSEdgeInsets -public func EdgeInsetsMake(top: CGFloat, left: CGFloat, bottom: CGFloat, right: CGFloat) -> EdgeInsets { - return EdgeInsets(top: top, left: left, bottom: bottom, right: right) -} -public let EdgeInsetsZero = EdgeInsets(top: 0, left: 0, bottom: 0, right: 0) + import AppKit #endif + + +public protocol ConstraintRelatableTarget { +} + +extension Int: ConstraintRelatableTarget { +} + +extension UInt: ConstraintRelatableTarget { +} + +extension Float: ConstraintRelatableTarget { +} + +extension Double: ConstraintRelatableTarget { +} + +extension CGFloat: ConstraintRelatableTarget { +} + +extension CGSize: ConstraintRelatableTarget { +} + +extension CGPoint: ConstraintRelatableTarget { +} + +extension ConstraintInsets: ConstraintRelatableTarget { +} + +extension ConstraintItem: ConstraintRelatableTarget { +} + +extension ConstraintView: ConstraintRelatableTarget { +} diff --git a/Example/Pods/SnapKit/Source/ConstraintRelation.swift b/Example/Pods/SnapKit/Source/ConstraintRelation.swift index f1b1ab2..48afbfc 100644 --- a/Example/Pods/SnapKit/Source/ConstraintRelation.swift +++ b/Example/Pods/SnapKit/Source/ConstraintRelation.swift @@ -1,7 +1,7 @@ // // SnapKit // -// Copyright (c) 2011-2015 SnapKit Team - https://github.com/SnapKit +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -22,27 +22,27 @@ // THE SOFTWARE. #if os(iOS) || os(tvOS) -import UIKit + import UIKit #else -import AppKit + import AppKit #endif -/** - Used to define `NSLayoutRelation` -*/ + internal enum ConstraintRelation: Int { - case Equal = 1, LessThanOrEqualTo, GreaterThanOrEqualTo + case equal = 1 + case lessThanOrEqual + case greaterThanOrEqual internal var layoutRelation: NSLayoutRelation { get { switch(self) { - case .LessThanOrEqualTo: - return .LessThanOrEqual - case .GreaterThanOrEqualTo: - return .GreaterThanOrEqual - default: - return .Equal + case .equal: + return .equal + case .lessThanOrEqual: + return .lessThanOrEqual + case .greaterThanOrEqual: + return .greaterThanOrEqual } } } -} \ No newline at end of file +} diff --git a/Example/Pods/SnapKit/Source/ConstraintView+Extensions.swift b/Example/Pods/SnapKit/Source/ConstraintView+Extensions.swift new file mode 100644 index 0000000..77afad9 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintView+Extensions.swift @@ -0,0 +1,152 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public extension ConstraintView { + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public var snp_left: ConstraintItem { return self.snp.left } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public var snp_top: ConstraintItem { return self.snp.top } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public var snp_right: ConstraintItem { return self.snp.right } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public var snp_bottom: ConstraintItem { return self.snp.bottom } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public var snp_leading: ConstraintItem { return self.snp.leading } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public var snp_trailing: ConstraintItem { return self.snp.trailing } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public var snp_width: ConstraintItem { return self.snp.width } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public var snp_height: ConstraintItem { return self.snp.height } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public var snp_centerX: ConstraintItem { return self.snp.centerX } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public var snp_centerY: ConstraintItem { return self.snp.centerY } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public var snp_baseline: ConstraintItem { return self.snp.baseline } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + @available(iOS 8.0, OSX 10.11, *) + public var snp_lastBaseline: ConstraintItem { return self.snp.lastBaseline } + + @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.") + @available(iOS 8.0, OSX 10.11, *) + public var snp_firstBaseline: ConstraintItem { return self.snp.firstBaseline } + + @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + public var snp_leftMargin: ConstraintItem { return self.snp.leftMargin } + + @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + public var snp_topMargin: ConstraintItem { return self.snp.topMargin } + + @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + public var snp_rightMargin: ConstraintItem { return self.snp.rightMargin } + + @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + public var snp_bottomMargin: ConstraintItem { return self.snp.bottomMargin } + + @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + public var snp_leadingMargin: ConstraintItem { return self.snp.leadingMargin } + + @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + public var snp_trailingMargin: ConstraintItem { return self.snp.trailingMargin } + + @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + public var snp_centerXWithinMargins: ConstraintItem { return self.snp.centerXWithinMargins } + + @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + public var snp_centerYWithinMargins: ConstraintItem { return self.snp.centerYWithinMargins } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public var snp_edges: ConstraintItem { return self.snp.edges } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public var snp_size: ConstraintItem { return self.snp.size } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public var snp_center: ConstraintItem { return self.snp.center } + + @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + public var snp_margins: ConstraintItem { return self.snp.margins } + + @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + public var snp_centerWithinMargins: ConstraintItem { return self.snp.centerWithinMargins } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public func snp_prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { + return self.snp.prepareConstraints(closure) + } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public func snp_makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + self.snp.makeConstraints(closure) + } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public func snp_remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + self.snp.remakeConstraints(closure) + } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public func snp_updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + self.snp.updateConstraints(closure) + } + + @available(*, deprecated:3.0, message:"Use newer snp.* syntax.") + public func snp_removeConstraints() { + self.snp.removeConstraints() + } + + public var snp: ConstraintViewDSL { + return ConstraintViewDSL(view: self) + } + +} diff --git a/Example/Pods/SnapKit/Source/ConstraintView.swift b/Example/Pods/SnapKit/Source/ConstraintView.swift new file mode 100644 index 0000000..6ff8a76 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintView.swift @@ -0,0 +1,35 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +#if os(iOS) || os(tvOS) + public typealias ConstraintView = UIView +#else + public typealias ConstraintView = NSView +#endif diff --git a/Example/Pods/SnapKit/Source/ConstraintViewDSL.swift b/Example/Pods/SnapKit/Source/ConstraintViewDSL.swift new file mode 100644 index 0000000..55bb845 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintViewDSL.swift @@ -0,0 +1,135 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public struct ConstraintViewDSL: ConstraintAttributesDSL { + + @discardableResult + public func prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { + return ConstraintMaker.prepareConstraints(view: self.view, closure: closure) + } + + public func makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + ConstraintMaker.makeConstraints(view: self.view, closure: closure) + } + + public func remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + ConstraintMaker.remakeConstraints(view: self.view, closure: closure) + } + + public func updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + ConstraintMaker.updateConstraints(view: self.view, closure: closure) + } + + public func removeConstraints() { + ConstraintMaker.removeConstraints(view: self.view) + } + + + + public var contentHuggingHorizontalPriority: Float { + get { + return self.view.contentHuggingPriority(for: .horizontal) + } + set { + self.view.setContentHuggingPriority(newValue, for: .horizontal) + } + } + + public var contentHuggingVerticalPriority: Float { + get { + return self.view.contentHuggingPriority(for: .vertical) + } + set { + self.view.setContentHuggingPriority(newValue, for: .vertical) + } + } + + public var contentCompressionResistanceHorizontalPriority: Float { + get { + return self.view.contentCompressionResistancePriority(for: .horizontal) + } + set { + self.view.setContentHuggingPriority(newValue, for: .horizontal) + } + } + + public var contentCompressionResistanceVerticalPriority: Float { + get { + return self.view.contentCompressionResistancePriority(for: .vertical) + } + set { + self.view.setContentCompressionResistancePriority(newValue, for: .vertical) + } + } + + public var target: AnyObject? { + return self.view + } + + internal let view: ConstraintView + + internal init(view: ConstraintView) { + self.view = view + + } + + internal var layoutConstraints: [LayoutConstraint] { + return self.layoutConstraintsHashTable.allObjects + } + + internal func add(layoutConstraints: [LayoutConstraint]) { + let hashTable = self.layoutConstraintsHashTable + for layoutConstraint in layoutConstraints { + hashTable.add(layoutConstraint) + } + } + + internal func remove(layoutConstraints: [LayoutConstraint]) { + let hashTable = self.layoutConstraintsHashTable + for layoutConstraint in layoutConstraints { + hashTable.remove(layoutConstraint) + } + } + + private var layoutConstraintsHashTable: NSHashTable { + let layoutConstraints: NSHashTable + + if let existing = objc_getAssociatedObject(self.view, &layoutConstraintsKey) as? NSHashTable { + layoutConstraints = existing + } else { + layoutConstraints = NSHashTable.weakObjects() + objc_setAssociatedObject(self.view, &layoutConstraintsKey, layoutConstraints, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) + } + return layoutConstraints + + } + +} +private var layoutConstraintsKey: UInt8 = 0 diff --git a/Example/Pods/SnapKit/Source/Debugging.swift b/Example/Pods/SnapKit/Source/Debugging.swift index 302012a..be8bb9e 100644 --- a/Example/Pods/SnapKit/Source/Debugging.swift +++ b/Example/Pods/SnapKit/Source/Debugging.swift @@ -1,7 +1,7 @@ // // SnapKit // -// Copyright (c) 2011-2015 SnapKit Team - https://github.com/SnapKit +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -22,72 +22,47 @@ // THE SOFTWARE. #if os(iOS) || os(tvOS) -import UIKit + import UIKit #else -import AppKit + import AppKit #endif -/** - Used to allow adding a snp_label to a View for debugging purposes -*/ -public extension View { - - public var snp_label: String? { - get { - return objc_getAssociatedObject(self, &labelKey) as? String - } - set { - objc_setAssociatedObject(self, &labelKey, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_COPY_NONATOMIC) - } - } - -} - -/** - Used to allow adding a snp_label to a LayoutConstraint for debugging purposes -*/ public extension LayoutConstraint { - public var snp_label: String? { - get { - return objc_getAssociatedObject(self, &labelKey) as? String - } - set { - objc_setAssociatedObject(self, &labelKey, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_COPY_NONATOMIC) - } - } - override public var description: String { var description = "<" description += descriptionForObject(self) - description += " \(descriptionForObject(self.firstItem))" - if self.firstAttribute != .NotAnAttribute { - description += ".\(self.firstAttribute.snp_description)" + if let firstItem = conditionalOptional(from: self.firstItem) { + description += " \(descriptionForObject(firstItem))" + } + + if self.firstAttribute != .notAnAttribute { + description += ".\(descriptionForAttribute(self.firstAttribute))" } - description += " \(self.relation.snp_description)" + description += " \(descriptionForRelation(self.relation))" - if let secondItem: AnyObject = self.secondItem { + if let secondItem = self.secondItem { description += " \(descriptionForObject(secondItem))" } - if self.secondAttribute != .NotAnAttribute { - description += ".\(self.secondAttribute.snp_description)" + if self.secondAttribute != .notAnAttribute { + description += ".\(descriptionForAttribute(self.secondAttribute))" } if self.multiplier != 1.0 { description += " * \(self.multiplier)" } - if self.secondAttribute == .NotAnAttribute { + if self.secondAttribute == .notAnAttribute { description += " \(self.constant)" } else { if self.constant > 0.0 { description += " + \(self.constant)" } else if self.constant < 0.0 { - description += " - \(CGFloat.abs(self.constant))" + description += " - \(abs(self.constant))" } } @@ -100,97 +75,86 @@ public extension LayoutConstraint { return description } - internal var snp_makerFile: String? { - return self.snp_constraint?.makerFile - } - - internal var snp_makerLine: UInt? { - return self.snp_constraint?.makerLine +} + +private func descriptionForRelation(_ relation: NSLayoutRelation) -> String { + switch relation { + case .equal: return "==" + case .greaterThanOrEqual: return ">=" + case .lessThanOrEqual: return "<=" } - } -private var labelKey = "" +private func descriptionForAttribute(_ attribute: NSLayoutAttribute) -> String { + #if os(iOS) || os(tvOS) + switch attribute { + case .notAnAttribute: return "notAnAttribute" + case .top: return "top" + case .left: return "left" + case .bottom: return "bottom" + case .right: return "right" + case .leading: return "leading" + case .trailing: return "trailing" + case .width: return "width" + case .height: return "height" + case .centerX: return "centerX" + case .centerY: return "centerY" + case .lastBaseline: return "lastBaseline" + case .firstBaseline: return "firstBaseline" + case .topMargin: return "topMargin" + case .leftMargin: return "leftMargin" + case .bottomMargin: return "bottomMargin" + case .rightMargin: return "rightMargin" + case .leadingMargin: return "leadingMargin" + case .trailingMargin: return "trailingMargin" + case .centerXWithinMargins: return "centerXWithinMargins" + case .centerYWithinMargins: return "centerYWithinMargins" + } + #else + switch attribute { + case .notAnAttribute: return "notAnAttribute" + case .top: return "top" + case .left: return "left" + case .bottom: return "bottom" + case .right: return "right" + case .leading: return "leading" + case .trailing: return "trailing" + case .width: return "width" + case .height: return "height" + case .centerX: return "centerX" + case .centerY: return "centerY" + case .lastBaseline: return "lastBaseline" + case .firstBaseline: return "firstBaseline" + } + #endif +} + +private func conditionalOptional(from object: Optional) -> Optional { + return object +} + +private func conditionalOptional(from object: T) -> Optional { + return Optional.some(object) +} -private func descriptionForObject(object: AnyObject) -> String { - let pointerDescription = NSString(format: "%p", ObjectIdentifier(object).uintValue) +private func descriptionForObject(_ object: AnyObject) -> String { + let pointerDescription = String(format: "%p", UInt(bitPattern: ObjectIdentifier(object))) var desc = "" - desc += object.dynamicType.description() + desc += type(of: object).description() - if let object = object as? View { - desc += ":\(object.snp_label ?? pointerDescription)" + if let object = object as? ConstraintView { + desc += ":\(object.snp.label ?? pointerDescription)" } else if let object = object as? LayoutConstraint { - desc += ":\(object.snp_label ?? pointerDescription)" + desc += ":\(object.label ?? pointerDescription)" } else { desc += ":\(pointerDescription)" } - if let object = object as? LayoutConstraint, let file = object.snp_makerFile, let line = object.snp_makerLine { - desc += "@\(file)#\(line)" + if let object = object as? LayoutConstraint, let file = object.constraint?.sourceLocation.0, let line = object.constraint?.sourceLocation.1 { + desc += "@\((file as NSString).lastPathComponent)#\(line)" } desc += "" return desc } - -private extension NSLayoutRelation { - - private var snp_description: String { - switch self { - case .Equal: return "==" - case .GreaterThanOrEqual: return ">=" - case .LessThanOrEqual: return "<=" - } - } - -} - -private extension NSLayoutAttribute { - - private var snp_description: String { - #if os(iOS) || os(tvOS) - switch self { - case .NotAnAttribute: return "notAnAttribute" - case .Top: return "top" - case .Left: return "left" - case .Bottom: return "bottom" - case .Right: return "right" - case .Leading: return "leading" - case .Trailing: return "trailing" - case .Width: return "width" - case .Height: return "height" - case .CenterX: return "centerX" - case .CenterY: return "centerY" - case .Baseline: return "baseline" - case .FirstBaseline: return "firstBaseline" - case .TopMargin: return "topMargin" - case .LeftMargin: return "leftMargin" - case .BottomMargin: return "bottomMargin" - case .RightMargin: return "rightMargin" - case .LeadingMargin: return "leadingMargin" - case .TrailingMargin: return "trailingMargin" - case .CenterXWithinMargins: return "centerXWithinMargins" - case .CenterYWithinMargins: return "centerYWithinMargins" - } - #else - switch self { - case .NotAnAttribute: return "notAnAttribute" - case .Top: return "top" - case .Left: return "left" - case .Bottom: return "bottom" - case .Right: return "right" - case .Leading: return "leading" - case .Trailing: return "trailing" - case .Width: return "width" - case .Height: return "height" - case .CenterX: return "centerX" - case .CenterY: return "centerY" - case .Baseline: return "baseline" - default: return "default" - } - #endif - - } - -} diff --git a/Example/Pods/SnapKit/Source/LayoutConstraint.swift b/Example/Pods/SnapKit/Source/LayoutConstraint.swift index 14ec1ed..3dbe3ab 100644 --- a/Example/Pods/SnapKit/Source/LayoutConstraint.swift +++ b/Example/Pods/SnapKit/Source/LayoutConstraint.swift @@ -1,7 +1,7 @@ // // SnapKit // -// Copyright (c) 2011-2015 SnapKit Team - https://github.com/SnapKit +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -22,42 +22,36 @@ // THE SOFTWARE. #if os(iOS) || os(tvOS) -import UIKit + import UIKit #else -import AppKit + import AppKit #endif -/** - Used to add extra information to the actual `NSLayoutConstraint`'s that will UIKit/AppKit will utilize -*/ + public class LayoutConstraint: NSLayoutConstraint { - internal var snp_constraint: Constraint? = nil + public var label: String? { + get { + return self.identifier + } + set { + self.identifier = newValue + } + } + + internal var constraint: Constraint! = nil } -internal func ==(left: LayoutConstraint, right: LayoutConstraint) -> Bool { - if left.firstItem !== right.firstItem { - return false - } - if left.secondItem !== right.secondItem { - return false - } - if left.firstAttribute != right.firstAttribute { - return false - } - if left.secondAttribute != right.secondAttribute { - return false - } - if left.relation != right.relation { - return false - } - if left.priority != right.priority { - return false - } - if left.multiplier != right.multiplier { +internal func ==(lhs: LayoutConstraint, rhs: LayoutConstraint) -> Bool { + guard lhs.firstItem === rhs.firstItem && + lhs.secondItem === rhs.secondItem && + lhs.firstAttribute == rhs.firstAttribute && + lhs.secondAttribute == rhs.secondAttribute && + lhs.relation == rhs.relation && + lhs.priority == rhs.priority && + lhs.multiplier == rhs.multiplier else { return false } return true } - diff --git a/Example/Pods/SnapKit/Source/UILayoutGuide+Extensions.swift b/Example/Pods/SnapKit/Source/UILayoutGuide+Extensions.swift new file mode 100644 index 0000000..cd89d8a --- /dev/null +++ b/Example/Pods/SnapKit/Source/UILayoutGuide+Extensions.swift @@ -0,0 +1,36 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#endif + + +@available(iOS 9.0, *) +public extension ConstraintLayoutGuide { + + public var snp: ConstraintLayoutGuideDSL { + return ConstraintLayoutGuideDSL(guide: self) + } + +} diff --git a/Example/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift b/Example/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift new file mode 100644 index 0000000..cfbce2e --- /dev/null +++ b/Example/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift @@ -0,0 +1,36 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// 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. + +#if os(iOS) || os(tvOS) + import UIKit +#endif + + +@available(iOS 8.0, *) +public extension ConstraintLayoutSupport { + + public var snp: ConstraintLayoutSupportDSL { + return ConstraintLayoutSupportDSL(support: self) + } + +} diff --git a/Example/Pods/SnapKit/Source/View+SnapKit.swift b/Example/Pods/SnapKit/Source/View+SnapKit.swift deleted file mode 100644 index a6ed6e4..0000000 --- a/Example/Pods/SnapKit/Source/View+SnapKit.swift +++ /dev/null @@ -1,183 +0,0 @@ -// -// SnapKit -// -// Copyright (c) 2011-2015 SnapKit Team - https://github.com/SnapKit -// -// 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. - -#if os(iOS) || os(tvOS) -import UIKit -public typealias View = UIView -#else -import AppKit -public typealias View = NSView -#endif - -/** - Used to expose public API on views -*/ -public extension View { - - /// left edge - public var snp_left: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.Left) } - - /// top edge - public var snp_top: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.Top) } - - /// right edge - public var snp_right: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.Right) } - - /// bottom edge - public var snp_bottom: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.Bottom) } - - /// leading edge - public var snp_leading: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.Leading) } - - /// trailing edge - public var snp_trailing: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.Trailing) } - - /// width dimension - public var snp_width: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.Width) } - - /// height dimension - public var snp_height: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.Height) } - - /// centerX position - public var snp_centerX: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.CenterX) } - - /// centerY position - public var snp_centerY: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.CenterY) } - - /// baseline position - public var snp_baseline: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.Baseline) } - - /// first baseline position - @available(iOS 8.0, *) - public var snp_firstBaseline: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.FirstBaseline) } - - /// left margin - @available(iOS 8.0, *) - public var snp_leftMargin: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.LeftMargin) } - - /// right margin - @available(iOS 8.0, *) - public var snp_rightMargin: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.RightMargin) } - - /// top margin - @available(iOS 8.0, *) - public var snp_topMargin: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.TopMargin) } - - /// bottom margin - @available(iOS 8.0, *) - public var snp_bottomMargin: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.BottomMargin) } - - /// leading margin - @available(iOS 8.0, *) - public var snp_leadingMargin: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.LeadingMargin) } - - /// trailing margin - @available(iOS 8.0, *) - public var snp_trailingMargin: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.TrailingMargin) } - - /// centerX within margins - @available(iOS 8.0, *) - public var snp_centerXWithinMargins: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.CenterXWithinMargins) } - - /// centerY within margins - @available(iOS 8.0, *) - public var snp_centerYWithinMargins: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.CenterYWithinMargins) } - - // top + left + bottom + right edges - public var snp_edges: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.Edges) } - - // width + height dimensions - public var snp_size: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.Size) } - - // centerX + centerY positions - public var snp_center: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.Center) } - - // top + left + bottom + right margins - @available(iOS 8.0, *) - public var snp_margins: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.Margins) } - - // centerX + centerY within margins - @available(iOS 8.0, *) - public var snp_centerWithinMargins: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.CenterWithinMargins) } - - /** - Prepares constraints with a `ConstraintMaker` and returns the made constraints but does not install them. - - :param: closure that will be passed the `ConstraintMaker` to make the constraints with - - :returns: the constraints made - */ - public func snp_prepareConstraints(file: String = #file, line: UInt = #line, @noescape closure: (make: ConstraintMaker) -> Void) -> [Constraint] { - return ConstraintMaker.prepareConstraints(view: self, file: file, line: line, closure: closure) - } - - /** - Makes constraints with a `ConstraintMaker` and installs them along side any previous made constraints. - - :param: closure that will be passed the `ConstraintMaker` to make the constraints with - */ - public func snp_makeConstraints(file: String = #file, line: UInt = #line, @noescape closure: (make: ConstraintMaker) -> Void) -> Void { - ConstraintMaker.makeConstraints(view: self, file: file, line: line, closure: closure) - } - - /** - Updates constraints with a `ConstraintMaker` that will replace existing constraints that match and install new ones. - - For constraints to match only the constant can be updated. - - :param: closure that will be passed the `ConstraintMaker` to update the constraints with - */ - public func snp_updateConstraints(file: String = #file, line: UInt = #line, @noescape closure: (make: ConstraintMaker) -> Void) -> Void { - ConstraintMaker.updateConstraints(view: self, file: file, line: line, closure: closure) - } - - /** - Remakes constraints with a `ConstraintMaker` that will first remove all previously made constraints and make and install new ones. - - :param: closure that will be passed the `ConstraintMaker` to remake the constraints with - */ - public func snp_remakeConstraints(file: String = #file, line: UInt = #line, @noescape closure: (make: ConstraintMaker) -> Void) -> Void { - ConstraintMaker.remakeConstraints(view: self, file: file, line: line, closure: closure) - } - - /** - Removes all previously made constraints. - */ - public func snp_removeConstraints() { - ConstraintMaker.removeConstraints(view: self) - } - - internal var snp_installedLayoutConstraints: [LayoutConstraint] { - get { - if let constraints = objc_getAssociatedObject(self, &installedLayoutConstraintsKey) as? [LayoutConstraint] { - return constraints - } - return [] - } - set { - objc_setAssociatedObject(self, &installedLayoutConstraintsKey, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } -} - -private var installedLayoutConstraintsKey = "" diff --git a/Example/Pods/Target Support Files/DialogView/DialogView.xcconfig b/Example/Pods/Target Support Files/DialogView/DialogView.xcconfig index 862cf3b..a9415d7 100644 --- a/Example/Pods/Target Support Files/DialogView/DialogView.xcconfig +++ b/Example/Pods/Target Support Files/DialogView/DialogView.xcconfig @@ -1,9 +1,10 @@ -CONFIGURATION_BUILD_DIR = $PODS_SHARED_BUILD_DIR/DialogView -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_SHARED_BUILD_DIR/SnapKit" +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/DialogView +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SnapKit" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 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_SHARED_BUILD_DIR = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/DialogView/Info.plist b/Example/Pods/Target Support Files/DialogView/Info.plist index b24015f..0d7bfa2 100644 --- a/Example/Pods/Target Support Files/DialogView/Info.plist +++ b/Example/Pods/Target Support Files/DialogView/Info.plist @@ -2,25 +2,25 @@ - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.1.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.2.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + diff --git a/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example-acknowledgements.plist index 9ffdd26..4a14e75 100644 --- a/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example-acknowledgements.plist +++ b/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example-acknowledgements.plist @@ -34,6 +34,8 @@ 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 DialogView Type @@ -61,6 +63,8 @@ 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 SnapKit Type diff --git a/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example-frameworks.sh index b44e5ce..4571660 100755 --- a/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example-frameworks.sh +++ b/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example-frameworks.sh @@ -59,8 +59,8 @@ 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} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" + 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 } diff --git a/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example-resources.sh b/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example-resources.sh index 741d240..0a15615 100755 --- a/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example-resources.sh +++ b/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example-resources.sh @@ -1,7 +1,7 @@ #!/bin/sh set -e -mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt > "$RESOURCES_TO_COPY" @@ -44,30 +44,30 @@ EOM 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 ${CONFIGURATION_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 "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + 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 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" + 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 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + 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\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" - xcrun momc "$RESOURCE_PATH" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + 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\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" - xcrun momc "$RESOURCE_PATH" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + 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\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" - xcrun mapc "$RESOURCE_PATH" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + 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") @@ -80,8 +80,8 @@ EOM esac } -mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +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}" diff --git a/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example.debug.xcconfig index b55e9d5..a5fb279 100644 --- a/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example.debug.xcconfig @@ -1,8 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$CONFIGURATION_BUILD_DIR/DialogView" "$CONFIGURATION_BUILD_DIR/SnapKit" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/DialogView" "$PODS_CONFIGURATION_BUILD_DIR/SnapKit" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/DialogView/DialogView.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SnapKit/SnapKit.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/DialogView/DialogView.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SnapKit/SnapKit.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "DialogView" -framework "SnapKit" 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-DialogView_Example/Pods-DialogView_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example.release.xcconfig index b55e9d5..a5fb279 100644 --- a/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example.release.xcconfig @@ -1,8 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$CONFIGURATION_BUILD_DIR/DialogView" "$CONFIGURATION_BUILD_DIR/SnapKit" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/DialogView" "$PODS_CONFIGURATION_BUILD_DIR/SnapKit" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/DialogView/DialogView.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SnapKit/SnapKit.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/DialogView/DialogView.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SnapKit/SnapKit.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "DialogView" -framework "SnapKit" 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-DialogView_Tests/Pods-DialogView_Tests-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests-acknowledgements.plist index 9ffdd26..4a14e75 100644 --- a/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests-acknowledgements.plist +++ b/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests-acknowledgements.plist @@ -34,6 +34,8 @@ 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 DialogView Type @@ -61,6 +63,8 @@ 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 SnapKit Type diff --git a/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests-frameworks.sh b/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests-frameworks.sh index b44e5ce..4571660 100755 --- a/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests-frameworks.sh +++ b/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests-frameworks.sh @@ -59,8 +59,8 @@ 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} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" + 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 } diff --git a/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests-resources.sh b/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests-resources.sh index 741d240..0a15615 100755 --- a/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests-resources.sh +++ b/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests-resources.sh @@ -1,7 +1,7 @@ #!/bin/sh set -e -mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt > "$RESOURCES_TO_COPY" @@ -44,30 +44,30 @@ EOM 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 ${CONFIGURATION_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 "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + 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 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" + 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 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + 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\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" - xcrun momc "$RESOURCE_PATH" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + 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\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" - xcrun momc "$RESOURCE_PATH" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + 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\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" - xcrun mapc "$RESOURCE_PATH" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + 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") @@ -80,8 +80,8 @@ EOM esac } -mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +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}" diff --git a/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests.debug.xcconfig index b55e9d5..a5fb279 100644 --- a/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests.debug.xcconfig @@ -1,8 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$CONFIGURATION_BUILD_DIR/DialogView" "$CONFIGURATION_BUILD_DIR/SnapKit" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/DialogView" "$PODS_CONFIGURATION_BUILD_DIR/SnapKit" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/DialogView/DialogView.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SnapKit/SnapKit.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/DialogView/DialogView.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SnapKit/SnapKit.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "DialogView" -framework "SnapKit" 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-DialogView_Tests/Pods-DialogView_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests.release.xcconfig index b55e9d5..a5fb279 100644 --- a/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests.release.xcconfig @@ -1,8 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$CONFIGURATION_BUILD_DIR/DialogView" "$CONFIGURATION_BUILD_DIR/SnapKit" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/DialogView" "$PODS_CONFIGURATION_BUILD_DIR/SnapKit" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/DialogView/DialogView.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SnapKit/SnapKit.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/DialogView/DialogView.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SnapKit/SnapKit.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "DialogView" -framework "SnapKit" 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/SnapKit/Info.plist b/Example/Pods/Target Support Files/SnapKit/Info.plist index 8c8cd6c..4522675 100644 --- a/Example/Pods/Target Support Files/SnapKit/Info.plist +++ b/Example/Pods/Target Support Files/SnapKit/Info.plist @@ -2,25 +2,25 @@ - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.20.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 3.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + diff --git a/Example/Pods/Target Support Files/SnapKit/SnapKit.xcconfig b/Example/Pods/Target Support Files/SnapKit/SnapKit.xcconfig index c92040d..e6ea1b4 100644 --- a/Example/Pods/Target Support Files/SnapKit/SnapKit.xcconfig +++ b/Example/Pods/Target Support Files/SnapKit/SnapKit.xcconfig @@ -1,8 +1,9 @@ -CONFIGURATION_BUILD_DIR = $PODS_SHARED_BUILD_DIR/SnapKit +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SnapKit GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 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_SHARED_BUILD_DIR = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES diff --git a/Pod/Classes/DialogView.swift b/Pod/Classes/DialogView.swift index f6ba918..b2848e0 100644 --- a/Pod/Classes/DialogView.swift +++ b/Pod/Classes/DialogView.swift @@ -10,59 +10,59 @@ import SnapKit public enum DialogButtonType { - case Default - case Destruct - case Accept - case Done + case `default` + case destruct + case accept + case done } public enum DialogViewButtonAlignment { - case Default - case OneRow + case `default` + case oneRow } -public class DialogView : UIView { +open class DialogView : UIView { // MARK Configuration - public var tapOnCurtainClosesDialog: Bool = true - public var innerDialogPadding: CGFloat = 20 - public var dialogViewWidth: CGFloat = 240 + open var tapOnCurtainClosesDialog: Bool = true + open var innerDialogPadding: CGFloat = 20 + open var dialogViewWidth: CGFloat = 240 - public var buttonHeight: CGFloat = 40 - public var buttonPadding: CGFloat = 12 + open var buttonHeight: CGFloat = 40 + open var buttonPadding: CGFloat = 12 - public var topImageSize: CGSize = CGSizeMake(100, 100) + open var topImageSize: CGSize = CGSize(width: 100, height: 100) - public var canvasView: UIView = UIView() - public var curtainView: DialogCurtainView = DialogCurtainView() + open var canvasView: UIView = UIView() + open var curtainView: DialogCurtainView = DialogCurtainView() - public var animationDuration: NSTimeInterval = 0.2 + open var animationDuration: TimeInterval = 0.2 - public var object: AnyObject? // Can be used for example to store NSIndexPath, CoreData object, etc ... - public var isShown = false - public var buttonAlignment: DialogViewButtonAlignment = .Default + open var object: AnyObject? // Can be used for example to store NSIndexPath, CoreData object, etc ... + open var isShown = false + open var buttonAlignment: DialogViewButtonAlignment = .default // MARK: Private variables - private var topImageView: UIImageView? + fileprivate var topImageView: UIImageView? - private var title: String? - private var titleAttributes: [String: AnyObject]? - private var titleLabel: UILabel? + fileprivate var title: String? + fileprivate var titleAttributes: [String: AnyObject]? + fileprivate var titleLabel: UILabel? - private var message: String? - private var messageAttributes: [String: AnyObject]? - private var messageLabel: UILabel? + fileprivate var message: String? + fileprivate var messageAttributes: [String: AnyObject]? + fileprivate var messageLabel: UILabel? - private var buttons: [DialogButton] = [DialogButton]() - private var activeController: UIViewController? = nil + fileprivate var buttons: [DialogButton] = [DialogButton]() + fileprivate var activeController: UIViewController? = nil // MARK: Presenting view - public func showInController(controller: UIViewController, animated: Bool = true) { + open func showInController(_ controller: UIViewController, animated: Bool = true) { activeController = controller // Add to the controller hidden @@ -102,7 +102,7 @@ public class DialogView : UIView { self.showViews() } - private func createTopImage(inout lastElement: UIView?) { + fileprivate func createTopImage(_ lastElement: inout UIView?) { if let topImgView = topImageView { canvasView.addSubview(topImgView) topImgView.snp_makeConstraints() {make in @@ -115,7 +115,7 @@ public class DialogView : UIView { } } - private func createLabels(inout lastElement: UIView?) { + fileprivate func createLabels(_ lastElement: inout UIView?) { // Title label if titleLabel != nil { titleLabel = self.label(title!, textAttributes: titleAttributes, bold: true) @@ -146,7 +146,7 @@ public class DialogView : UIView { } } - private func createButtons(inout lastElement: UIView?) { + fileprivate func createButtons(_ lastElement: inout UIView?) { if buttons.count > 0 { var lastButton: DialogButton? for b: DialogButton in self.buttons { @@ -154,7 +154,7 @@ public class DialogView : UIView { switch buttonAlignment { - case .Default: + case .default: b.snp_makeConstraints() { make in if lastButton == nil { if self.messageLabel != nil { @@ -176,7 +176,7 @@ public class DialogView : UIView { make.right.equalTo(self.innerDialogPadding * -1) make.height.equalTo(self.buttonHeight) } - case .OneRow: + case .oneRow: b.snp_makeConstraints() { make in if self.messageLabel != nil { make.top.equalTo((self.messageLabel?.snp_bottom)!).offset(self.innerDialogPadding) @@ -207,11 +207,11 @@ public class DialogView : UIView { } } - private func showViews() { - curtainView.hidden = false - canvasView.hidden = false + fileprivate func showViews() { + curtainView.isHidden = false + canvasView.isHidden = false - UIView.animateWithDuration(self.animationDuration, delay: 0.0, options: .BeginFromCurrentState, animations: { () -> Void in + UIView.animate(withDuration: self.animationDuration, delay: 0.0, options: .beginFromCurrentState, animations: { () -> Void in self.curtainView.alpha = 1 self.canvasView.alpha = 1 }) { (completed: Bool) -> Void in @@ -219,15 +219,15 @@ public class DialogView : UIView { } } - public func hide(animated: Bool) { + open func hide(_ animated: Bool) { isShown = false if animated == true { - UIView.animateWithDuration(self.animationDuration, delay: 0.0, options: .BeginFromCurrentState, animations: { () -> Void in + UIView.animate(withDuration: self.animationDuration, delay: 0.0, options: .beginFromCurrentState, animations: { () -> Void in self.curtainView.alpha = 0; self.canvasView.alpha = 0; }, completion: { (completed: Bool) -> Void in - self.curtainView.hidden = true - self.canvasView.hidden = true + self.curtainView.isHidden = true + self.canvasView.isHidden = true self.removeFromSuperview() } ) @@ -237,23 +237,23 @@ public class DialogView : UIView { } } - public func hide() { + open func hide() { isShown = false curtainView.alpha = 0; canvasView.alpha = 0; - curtainView.hidden = true - canvasView.hidden = true + curtainView.isHidden = true + canvasView.isHidden = true self.removeFromSuperview() } // MARK: Configuring view - public func setTopImage(image: UIImage) -> UIImageView { + open func setTopImage(_ image: UIImage) -> UIImageView { topImageView = imageView(image: image) return topImageView! } - public func setTitle(titleString: String, attributes: [String: AnyObject] = [String: AnyObject]()) -> UILabel { + open func setTitle(_ titleString: String, attributes: [String: AnyObject] = [String: AnyObject]()) -> UILabel { self.title = titleString self.titleAttributes = attributes @@ -261,7 +261,7 @@ public class DialogView : UIView { return self.titleLabel! } - public func setMessage(messageString: String, attributes: [String: AnyObject] = [String: AnyObject]()) -> UILabel { + open func setMessage(_ messageString: String, attributes: [String: AnyObject] = [String: AnyObject]()) -> UILabel { self.message = messageString self.messageAttributes = attributes @@ -269,19 +269,19 @@ public class DialogView : UIView { return self.messageLabel! } - public func addButton(button: DialogButton) { + open func addButton(_ button: DialogButton) { buttons.append(button) canvasView.addSubview(button) } - public func addButton(title: String, textColor: UIColor = UIColor.whiteColor(), backgroundColor: UIColor = UIColor.grayColor(), highlightedBackgroundColor: UIColor = UIColor.lightGrayColor(), cornerRadius: CGFloat = 4) -> DialogButton { + open func addButton(_ title: String, textColor: UIColor = UIColor.white, backgroundColor: UIColor = UIColor.gray, highlightedBackgroundColor: UIColor = UIColor.lightGray, cornerRadius: CGFloat = 4) -> DialogButton { let button: DialogButton = DialogButton() - button.setTitle(title, forState: .Normal) - button.setTitleColor(textColor, forState: .Normal) + button.setTitle(title, for: .normal) + button.setTitleColor(textColor, for: .normal) button.backgroundColor = backgroundColor button.layer.cornerRadius = cornerRadius button.clipsToBounds = true - button.titleLabel?.font = UIFont.boldSystemFontOfSize(14) + button.titleLabel?.font = UIFont.boldSystemFont(ofSize: 14) button.defaultBackgroundColor = backgroundColor button.highlightedBackgroundColor = backgroundColor @@ -292,31 +292,31 @@ public class DialogView : UIView { return button } - public func addButton(title: String, type: DialogButtonType) -> DialogButton { + open func addButton(_ title: String, type: DialogButtonType) -> DialogButton { var textColor: UIColor? var backgroundColor: UIColor? var highlightedBackgroundColor: UIColor? switch (type) { - case .Accept: - textColor = UIColor.whiteColor() + case .accept: + textColor = UIColor.white backgroundColor = UIColor.init(colorLiteralRed: (16 / 255), green: (182 / 255), blue: (113 / 255), alpha: 1) - highlightedBackgroundColor = UIColor.lightGrayColor() + highlightedBackgroundColor = UIColor.lightGray break - case .Destruct: - textColor = UIColor.whiteColor() + case .destruct: + textColor = UIColor.white backgroundColor = UIColor.init(colorLiteralRed: (195 / 255), green: (36 / 255), blue: (39 / 255), alpha: 1) - highlightedBackgroundColor = UIColor.darkGrayColor() + highlightedBackgroundColor = UIColor.darkGray break - case .Done: - textColor = UIColor.whiteColor() - backgroundColor = UIColor.grayColor() - highlightedBackgroundColor = UIColor.darkGrayColor() + case .done: + textColor = UIColor.white + backgroundColor = UIColor.gray + highlightedBackgroundColor = UIColor.darkGray break default: - textColor = UIColor.whiteColor() - backgroundColor = UIColor.lightGrayColor() - highlightedBackgroundColor = UIColor.lightGrayColor() + textColor = UIColor.white + backgroundColor = UIColor.lightGray + highlightedBackgroundColor = UIColor.lightGray break } @@ -325,7 +325,7 @@ public class DialogView : UIView { // MARK: Layout - override public func layoutSubviews() { + override open func layoutSubviews() { super.layoutSubviews() // MARK: Curtain @@ -336,20 +336,20 @@ public class DialogView : UIView { // MARK: Creating elements - private func imageView(image image: UIImage?) -> UIImageView { + fileprivate func imageView(image: UIImage?) -> UIImageView { let imgView = UIImageView(image: image) - imgView.contentMode = .ScaleAspectFit + imgView.contentMode = .scaleAspectFit imgView.clipsToBounds = true return imgView } - private func label(text: String, let textAttributes: [String: AnyObject]?, bold: Bool = false) -> UILabel { + fileprivate func label(_ text: String, textAttributes: [String: AnyObject]?, bold: Bool = false) -> UILabel { let label: UILabel = UILabel() var attributes: [String: AnyObject]? = textAttributes - label.backgroundColor = UIColor.clearColor() - label.textAlignment = .Center + label.backgroundColor = UIColor.clear + label.textAlignment = .center label.numberOfLines = 0 let attributedString: NSMutableAttributedString = NSMutableAttributedString(string: text) @@ -357,13 +357,13 @@ public class DialogView : UIView { attributes = [String: AnyObject]() } if attributes![NSFontAttributeName] == nil { - attributes![NSFontAttributeName] = (bold ? UIFont.boldSystemFontOfSize(18) : UIFont.systemFontOfSize(14)) + attributes![NSFontAttributeName] = (bold ? UIFont.boldSystemFont(ofSize: 18) : UIFont.systemFont(ofSize: 14)) } if attributes![NSForegroundColorAttributeName] == nil { - attributes![NSForegroundColorAttributeName] = UIColor.darkGrayColor() + attributes![NSForegroundColorAttributeName] = UIColor.darkGray } if attributes![NSBackgroundColorAttributeName] == nil { - attributes![NSBackgroundColorAttributeName] = UIColor.clearColor() + attributes![NSBackgroundColorAttributeName] = UIColor.clear } attributedString.addAttributes(attributes!, range: NSRange.init(location: 0, length: text.characters.count)) @@ -372,28 +372,28 @@ public class DialogView : UIView { return label } - private func addCurtainView() { + fileprivate func addCurtainView() { self.addSubview(self.curtainView) let tap: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(DialogView.didTapCurtain(_:))) self.curtainView.addGestureRecognizer(tap) } - private func addCanvasView() { + fileprivate func addCanvasView() { self.canvasView.layer.cornerRadius = 4 - self.canvasView.backgroundColor = UIColor.whiteColor() + self.canvasView.backgroundColor = UIColor.white self.addSubview(self.canvasView) } - private func addSubviews() { + fileprivate func addSubviews() { self.addCurtainView() self.addCanvasView() } // MARK: Actions - func didTapCurtain(sender: UITapGestureRecognizer) { + func didTapCurtain(_ sender: UITapGestureRecognizer) { if (self.tapOnCurtainClosesDialog) { self.hide(true) } @@ -421,7 +421,7 @@ public class DialogView : UIView { } -public class DialogCurtainView : UIView { +open class DialogCurtainView : UIView { // MARK: Initialization @@ -442,11 +442,11 @@ public class DialogCurtainView : UIView { } -public class DialogButton : UIButton { +open class DialogButton : UIButton { internal var defaultBackgroundColor: UIColor! internal var highlightedBackgroundColor: UIColor! - public var dialogView: DialogView! + open var dialogView: DialogView! }