diff --git a/Podfile b/Podfile new file mode 100644 index 0000000..8630dfe --- /dev/null +++ b/Podfile @@ -0,0 +1,11 @@ +# Uncomment the next line to define a global platform for your project +# platform :ios, '9.0' + +source 'https://github.com/CocoaPods/Specs.git' +platform :ios, '10.0' +use_frameworks! + +target 'iOS_Study_A' do + pod 'SnapKit', '~> 5.6.0' + pod 'FirebaseUI' +end diff --git a/Podfile.lock b/Podfile.lock new file mode 100644 index 0000000..ca6f0ce --- /dev/null +++ b/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - SnapKit (5.6.0) + +DEPENDENCIES: + - SnapKit (~> 5.6.0) + +SPEC REPOS: + https://github.com/CocoaPods/Specs.git: + - SnapKit + +SPEC CHECKSUMS: + SnapKit: e01d52ebb8ddbc333eefe2132acf85c8227d9c25 + +PODFILE CHECKSUM: 0f2d84f711ce95096973f6e4b034602d855bbfb4 + +COCOAPODS: 1.14.2 diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock new file mode 100644 index 0000000..ca6f0ce --- /dev/null +++ b/Pods/Manifest.lock @@ -0,0 +1,16 @@ +PODS: + - SnapKit (5.6.0) + +DEPENDENCIES: + - SnapKit (~> 5.6.0) + +SPEC REPOS: + https://github.com/CocoaPods/Specs.git: + - SnapKit + +SPEC CHECKSUMS: + SnapKit: e01d52ebb8ddbc333eefe2132acf85c8227d9c25 + +PODFILE CHECKSUM: 0f2d84f711ce95096973f6e4b034602d855bbfb4 + +COCOAPODS: 1.14.2 diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ae50c14 --- /dev/null +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,752 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 00A2749F46C967ED4725A32357E3FB1B /* ConstraintLayoutSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA50A49AB14A27B030EF455D9943EB8B /* ConstraintLayoutSupport.swift */; }; + 04637C70546B34F93C3A1D79C3F78B37 /* ConstraintDirectionalInsetTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BC84DB0CD86A51B4B66E0450CBF40DE /* ConstraintDirectionalInsetTarget.swift */; }; + 0591132B5EA1BE4DDA268D8A9C3D0421 /* LayoutConstraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38A6A462E0F0B040B83C8763773533FE /* LayoutConstraint.swift */; }; + 06E43B4751069B47B3BD4AFD936A57E3 /* ConstraintPriority.swift in Sources */ = {isa = PBXBuildFile; fileRef = B57B4B15AAC3AB24B43306829FAA77A0 /* ConstraintPriority.swift */; }; + 0833E66E7F19849322305D67777B77DB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; }; + 0B994CDC79B1AD3A7BE62490D27C60C8 /* ConstraintAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F2DCDFF2011C08759407B4E2038CA11 /* ConstraintAttributes.swift */; }; + 183D8B3E057B885EA7DF9A8CDCCE9029 /* ConstraintMakerRelatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C8251A08ED8E6CF34420BBF858126F7 /* ConstraintMakerRelatable.swift */; }; + 220D6AC9B1B1EC8EFFB204F9C1EAC842 /* ConstraintMakerEditable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F57C38722D9F65992CF2200038C8651E /* ConstraintMakerEditable.swift */; }; + 256558233B40ACA6818F143BBC5B8017 /* ConstraintViewDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0072CC268C7456CC1DA6E8180975AB43 /* ConstraintViewDSL.swift */; }; + 3660B4F629053ABC3C1DF69366770289 /* ConstraintConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD101E65ADCCC341BCD3BFF777CA947C /* ConstraintConfig.swift */; }; + 38B9D58E94D9C1CECD7E381C64A2329D /* UILayoutSupport+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 152EE8343B4F64CFDE73F65CEF14A13F /* UILayoutSupport+Extensions.swift */; }; + 42B6ACFCF650183030867CB3EF345E95 /* ConstraintMakerFinalizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 412D51A2BEEF78C262C4B3F3798D1702 /* ConstraintMakerFinalizable.swift */; }; + 4BAD99B7394E225CEDBF94B8100BCC7F /* ConstraintRelation.swift in Sources */ = {isa = PBXBuildFile; fileRef = E30E74C9EDB065D2E76B3EDCCB6E2153 /* ConstraintRelation.swift */; }; + 4DA72FD7F1FB2C0449EDEF4B8A579807 /* ConstraintPriorityTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7096225ED146E16EC168C99FEDD215B5 /* ConstraintPriorityTarget.swift */; }; + 5380454C48A12A6E376122ABD8096968 /* ConstraintDescription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54A0BC61944B3E89515CACB83BB1B976 /* ConstraintDescription.swift */; }; + 55E51F45F1E157D3B4942BA7252C277E /* ConstraintRelatableTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF34962F54DAA8DEB0A1D7D4F3FC09A /* ConstraintRelatableTarget.swift */; }; + 56A72F6D13D930C4A2568F24DEA33C8D /* ConstraintLayoutSupportDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5032FD34D5BB9A1F925C649B43CC02DC /* ConstraintLayoutSupportDSL.swift */; }; + 56AC6DC6459AE47E7BC4AF06E5B148D2 /* ConstraintDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02732995CB94C03CB83E1935B434AD74 /* ConstraintDSL.swift */; }; + 5D36B99F3CAB1FC7337082D9581FECA6 /* Debugging.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4CBE69DD3B611E4180FCBDD8CDE8814 /* Debugging.swift */; }; + 604D3C93C17978C23600EC415949AB64 /* ConstraintInsets.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5D52A60BF41010F680313572B051598 /* ConstraintInsets.swift */; }; + 611CEF7FF1EF9EA1BCEF6C73EEE3ACCF /* ConstraintLayoutGuide.swift in Sources */ = {isa = PBXBuildFile; fileRef = F55D2A11C17BBCE3C9F7F0BA9555B5AE /* ConstraintLayoutGuide.swift */; }; + 69DE75BA185BBAB5FDAA28321F3C849F /* ConstraintItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26E5BB7E9F99F41E937A7E2CCEF178BE /* ConstraintItem.swift */; }; + 6AC1B881BB319C89AD023A02CDC8FC3D /* ConstraintLayoutGuide+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E04B678C00268C9CF7E410145D6F78AA /* ConstraintLayoutGuide+Extensions.swift */; }; + 6EAC8B6FA2D115DE708A58C601DD25E1 /* Constraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AFDF096C3836F945945C9FFDB5090F5 /* Constraint.swift */; }; + 7551F7A3732D5630D7CD5FF32141EDAF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; }; + 95E194A3AABB5407231E898B6686F73E /* ConstraintMakerRelatable+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 583BBF75085D255E27A5F9EF9EC203A5 /* ConstraintMakerRelatable+Extensions.swift */; }; + 98F570DA48370453D648BD526FDAAEAA /* LayoutConstraintItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEE15C12D4B2736CB1D1B07F4838FCA7 /* LayoutConstraintItem.swift */; }; + 9C9548E8B4675954566202F7B87FF0E6 /* ConstraintConstantTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = C282AEDFB53BD2F6B277738727FF116D /* ConstraintConstantTarget.swift */; }; + 9E02CFFEFE1BEC978B512286F03D31DA /* ConstraintInsetTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE5693124BFA9269D2085EC1ADFAAD76 /* ConstraintInsetTarget.swift */; }; + A03FDA8BC5741880B1EF11AFD248EF48 /* ConstraintOffsetTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 751D5202E1F291CC13F7AE0CD669B831 /* ConstraintOffsetTarget.swift */; }; + A3E3AB7C765C21AE17B1E6EE6560040C /* SnapKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 932076048BB79360F50A76C2C738DFC8 /* SnapKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5A8BF973BFE9C9304372A26C9F2E35B /* ConstraintMakerExtendable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDFBBDB0D11D15EA3C0D640EF407F700 /* ConstraintMakerExtendable.swift */; }; + B03B5579590D528CBA6D11FF638BC2AF /* Typealiases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 960E2E91424D9428F311B73888D8E927 /* Typealiases.swift */; }; + B43017FEC99D227D4CDD81DD2C27D9D9 /* ConstraintMakerPrioritizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F0A527ED8F0A719FF610D743A87DAD3 /* ConstraintMakerPrioritizable.swift */; }; + B752F7C4BECB65894B1F49421049CE5F /* ConstraintView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 458867733779570F7398C76B46AEAF5E /* ConstraintView.swift */; }; + BD47CB74CD9B2B4D2D942C9B65748DFB /* SnapKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 143498449916D71708A8AF2F96E7320A /* SnapKit-dummy.m */; }; + BE91010898EDA0867254DA1F1FDF4F7A /* Pods-iOS_Study_A-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 64B006C8E133F9CFAFE7CE0397C0B6DA /* Pods-iOS_Study_A-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E98DC8FB2578E76A812E0C94BA10E1B1 /* ConstraintDirectionalInsets.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC8DFD8FEE78807F86F0544749C80450 /* ConstraintDirectionalInsets.swift */; }; + EC6247CF0C225D23304BA654743DECF8 /* Pods-iOS_Study_A-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F5FFE88D8C5AEC6C12544FE044EED818 /* Pods-iOS_Study_A-dummy.m */; }; + EF21586EC3DFF6097A58EEC87376A0C1 /* ConstraintLayoutGuideDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = C91F91B010D4991E838DAC578595BA7A /* ConstraintLayoutGuideDSL.swift */; }; + F7C0960CEEB8F0C18F4503B405EAC08F /* ConstraintMultiplierTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00529F62152FE0E9A82AF6D8EAAAE2E1 /* ConstraintMultiplierTarget.swift */; }; + F953AA9104BFE0C2DAD639EA60104A75 /* ConstraintView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C83141A7BA266489296BCBEF99AC5412 /* ConstraintView+Extensions.swift */; }; + FAB03959C2357E325B19E08BC4775DAB /* ConstraintMaker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A4B3092297166519217A25AD70D5341 /* ConstraintMaker.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 374AC3EFE388BE3B64BD48A897BB74F7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 19622742EBA51E823D6DAE3F8CDBFAD4; + remoteInfo = SnapKit; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 00529F62152FE0E9A82AF6D8EAAAE2E1 /* ConstraintMultiplierTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMultiplierTarget.swift; path = Sources/ConstraintMultiplierTarget.swift; sourceTree = ""; }; + 0072CC268C7456CC1DA6E8180975AB43 /* ConstraintViewDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintViewDSL.swift; path = Sources/ConstraintViewDSL.swift; sourceTree = ""; }; + 02732995CB94C03CB83E1935B434AD74 /* ConstraintDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintDSL.swift; path = Sources/ConstraintDSL.swift; sourceTree = ""; }; + 0A4B3092297166519217A25AD70D5341 /* ConstraintMaker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMaker.swift; path = Sources/ConstraintMaker.swift; sourceTree = ""; }; + 0AFDF096C3836F945945C9FFDB5090F5 /* Constraint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Constraint.swift; path = Sources/Constraint.swift; sourceTree = ""; }; + 0EE5F8CB92905AE76169A71226B44035 /* SnapKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SnapKit.debug.xcconfig; sourceTree = ""; }; + 143498449916D71708A8AF2F96E7320A /* SnapKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SnapKit-dummy.m"; sourceTree = ""; }; + 152EE8343B4F64CFDE73F65CEF14A13F /* UILayoutSupport+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UILayoutSupport+Extensions.swift"; path = "Sources/UILayoutSupport+Extensions.swift"; sourceTree = ""; }; + 26E5BB7E9F99F41E937A7E2CCEF178BE /* ConstraintItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintItem.swift; path = Sources/ConstraintItem.swift; sourceTree = ""; }; + 2A6C4FB094E63F7B4E5D4EA8286C4D1A /* Pods-iOS_Study_A */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-iOS_Study_A"; path = Pods_iOS_Study_A.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 38A6A462E0F0B040B83C8763773533FE /* LayoutConstraint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutConstraint.swift; path = Sources/LayoutConstraint.swift; sourceTree = ""; }; + 3AF34962F54DAA8DEB0A1D7D4F3FC09A /* ConstraintRelatableTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintRelatableTarget.swift; path = Sources/ConstraintRelatableTarget.swift; sourceTree = ""; }; + 412D51A2BEEF78C262C4B3F3798D1702 /* ConstraintMakerFinalizable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerFinalizable.swift; path = Sources/ConstraintMakerFinalizable.swift; sourceTree = ""; }; + 458867733779570F7398C76B46AEAF5E /* ConstraintView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintView.swift; path = Sources/ConstraintView.swift; sourceTree = ""; }; + 4C8251A08ED8E6CF34420BBF858126F7 /* ConstraintMakerRelatable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerRelatable.swift; path = Sources/ConstraintMakerRelatable.swift; sourceTree = ""; }; + 4E79A721D99E8537AD2195CF53331B79 /* Pods-iOS_Study_A-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-iOS_Study_A-acknowledgements.markdown"; sourceTree = ""; }; + 5032FD34D5BB9A1F925C649B43CC02DC /* ConstraintLayoutSupportDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutSupportDSL.swift; path = Sources/ConstraintLayoutSupportDSL.swift; sourceTree = ""; }; + 54A0BC61944B3E89515CACB83BB1B976 /* ConstraintDescription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintDescription.swift; path = Sources/ConstraintDescription.swift; sourceTree = ""; }; + 583BBF75085D255E27A5F9EF9EC203A5 /* ConstraintMakerRelatable+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ConstraintMakerRelatable+Extensions.swift"; path = "Sources/ConstraintMakerRelatable+Extensions.swift"; sourceTree = ""; }; + 5F2DCDFF2011C08759407B4E2038CA11 /* ConstraintAttributes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintAttributes.swift; path = Sources/ConstraintAttributes.swift; sourceTree = ""; }; + 5FC9756C80722212F4B2D830A67A4D6B /* Pods-iOS_Study_A-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-iOS_Study_A-frameworks.sh"; sourceTree = ""; }; + 64B006C8E133F9CFAFE7CE0397C0B6DA /* Pods-iOS_Study_A-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-iOS_Study_A-umbrella.h"; sourceTree = ""; }; + 6E36258856FB523E39183B9E76746DC9 /* Pods-iOS_Study_A.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-iOS_Study_A.modulemap"; sourceTree = ""; }; + 7096225ED146E16EC168C99FEDD215B5 /* ConstraintPriorityTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintPriorityTarget.swift; path = Sources/ConstraintPriorityTarget.swift; sourceTree = ""; }; + 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 751D5202E1F291CC13F7AE0CD669B831 /* ConstraintOffsetTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintOffsetTarget.swift; path = Sources/ConstraintOffsetTarget.swift; sourceTree = ""; }; + 782C19B041349DED0C47AC71C798375C /* SnapKit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SnapKit.release.xcconfig; sourceTree = ""; }; + 7BC84DB0CD86A51B4B66E0450CBF40DE /* ConstraintDirectionalInsetTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintDirectionalInsetTarget.swift; path = Sources/ConstraintDirectionalInsetTarget.swift; sourceTree = ""; }; + 7F4D557E74B1A3F57267B72C5E10C919 /* Pods-iOS_Study_A.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-iOS_Study_A.release.xcconfig"; sourceTree = ""; }; + 932076048BB79360F50A76C2C738DFC8 /* SnapKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SnapKit-umbrella.h"; sourceTree = ""; }; + 94E42FA589867A878EC039323DA40B7F /* SnapKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = SnapKit.modulemap; sourceTree = ""; }; + 960E2E91424D9428F311B73888D8E927 /* Typealiases.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Typealiases.swift; path = Sources/Typealiases.swift; sourceTree = ""; }; + 979486118B3E90C08386079D57962701 /* SnapKit */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SnapKit; path = SnapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 9F0A527ED8F0A719FF610D743A87DAD3 /* ConstraintMakerPrioritizable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerPrioritizable.swift; path = Sources/ConstraintMakerPrioritizable.swift; sourceTree = ""; }; + B0256D59F7E649FE3F9A3260378A6288 /* Pods-iOS_Study_A-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-iOS_Study_A-Info.plist"; sourceTree = ""; }; + B57B4B15AAC3AB24B43306829FAA77A0 /* ConstraintPriority.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintPriority.swift; path = Sources/ConstraintPriority.swift; sourceTree = ""; }; + B9104912E2AC6297BB8F052FB33D9160 /* Pods-iOS_Study_A.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-iOS_Study_A.debug.xcconfig"; sourceTree = ""; }; + BA50A49AB14A27B030EF455D9943EB8B /* ConstraintLayoutSupport.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutSupport.swift; path = Sources/ConstraintLayoutSupport.swift; sourceTree = ""; }; + BC8DFD8FEE78807F86F0544749C80450 /* ConstraintDirectionalInsets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintDirectionalInsets.swift; path = Sources/ConstraintDirectionalInsets.swift; sourceTree = ""; }; + BDF6E18B5372A4BBE8507FE4B9F165C0 /* SnapKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SnapKit-prefix.pch"; sourceTree = ""; }; + C282AEDFB53BD2F6B277738727FF116D /* ConstraintConstantTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintConstantTarget.swift; path = Sources/ConstraintConstantTarget.swift; sourceTree = ""; }; + C5D52A60BF41010F680313572B051598 /* ConstraintInsets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintInsets.swift; path = Sources/ConstraintInsets.swift; sourceTree = ""; }; + C7F1D7D76D5A662BE72D55D9B3F913A7 /* Pods-iOS_Study_A-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-iOS_Study_A-acknowledgements.plist"; sourceTree = ""; }; + C83141A7BA266489296BCBEF99AC5412 /* ConstraintView+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ConstraintView+Extensions.swift"; path = "Sources/ConstraintView+Extensions.swift"; sourceTree = ""; }; + C91F91B010D4991E838DAC578595BA7A /* ConstraintLayoutGuideDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutGuideDSL.swift; path = Sources/ConstraintLayoutGuideDSL.swift; sourceTree = ""; }; + D2FD9EFCFC3AA452137876B761FFB621 /* SnapKit-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "SnapKit-Info.plist"; sourceTree = ""; }; + DD101E65ADCCC341BCD3BFF777CA947C /* ConstraintConfig.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintConfig.swift; path = Sources/ConstraintConfig.swift; sourceTree = ""; }; + DDFBBDB0D11D15EA3C0D640EF407F700 /* ConstraintMakerExtendable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerExtendable.swift; path = Sources/ConstraintMakerExtendable.swift; sourceTree = ""; }; + E04B678C00268C9CF7E410145D6F78AA /* ConstraintLayoutGuide+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ConstraintLayoutGuide+Extensions.swift"; path = "Sources/ConstraintLayoutGuide+Extensions.swift"; sourceTree = ""; }; + E30E74C9EDB065D2E76B3EDCCB6E2153 /* ConstraintRelation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintRelation.swift; path = Sources/ConstraintRelation.swift; sourceTree = ""; }; + EEE15C12D4B2736CB1D1B07F4838FCA7 /* LayoutConstraintItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutConstraintItem.swift; path = Sources/LayoutConstraintItem.swift; sourceTree = ""; }; + F4CBE69DD3B611E4180FCBDD8CDE8814 /* Debugging.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debugging.swift; path = Sources/Debugging.swift; sourceTree = ""; }; + F55D2A11C17BBCE3C9F7F0BA9555B5AE /* ConstraintLayoutGuide.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutGuide.swift; path = Sources/ConstraintLayoutGuide.swift; sourceTree = ""; }; + F57C38722D9F65992CF2200038C8651E /* ConstraintMakerEditable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerEditable.swift; path = Sources/ConstraintMakerEditable.swift; sourceTree = ""; }; + F5FFE88D8C5AEC6C12544FE044EED818 /* Pods-iOS_Study_A-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-iOS_Study_A-dummy.m"; sourceTree = ""; }; + FE5693124BFA9269D2085EC1ADFAAD76 /* ConstraintInsetTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintInsetTarget.swift; path = Sources/ConstraintInsetTarget.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D418C9C74A7E03A7D32E4B7F49CFD348 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7551F7A3732D5630D7CD5FF32141EDAF /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E8E4E7CE8309D3EF7B7476AC57986BE9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0833E66E7F19849322305D67777B77DB /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 219A211984C3A015A76AE8561902C398 /* Products */ = { + isa = PBXGroup; + children = ( + 2A6C4FB094E63F7B4E5D4EA8286C4D1A /* Pods-iOS_Study_A */, + 979486118B3E90C08386079D57962701 /* SnapKit */, + ); + name = Products; + sourceTree = ""; + }; + 403EB05A3920652EED411213C52E3AC2 /* Support Files */ = { + isa = PBXGroup; + children = ( + 94E42FA589867A878EC039323DA40B7F /* SnapKit.modulemap */, + 143498449916D71708A8AF2F96E7320A /* SnapKit-dummy.m */, + D2FD9EFCFC3AA452137876B761FFB621 /* SnapKit-Info.plist */, + BDF6E18B5372A4BBE8507FE4B9F165C0 /* SnapKit-prefix.pch */, + 932076048BB79360F50A76C2C738DFC8 /* SnapKit-umbrella.h */, + 0EE5F8CB92905AE76169A71226B44035 /* SnapKit.debug.xcconfig */, + 782C19B041349DED0C47AC71C798375C /* SnapKit.release.xcconfig */, + ); + name = "Support Files"; + path = "../Target Support Files/SnapKit"; + sourceTree = ""; + }; + 578452D2E740E91742655AC8F1636D1F /* iOS */ = { + isa = PBXGroup; + children = ( + 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */, + ); + name = iOS; + sourceTree = ""; + }; + C4195BEF0609FF13F23AAE693542386A /* Pods-iOS_Study_A */ = { + isa = PBXGroup; + children = ( + 6E36258856FB523E39183B9E76746DC9 /* Pods-iOS_Study_A.modulemap */, + 4E79A721D99E8537AD2195CF53331B79 /* Pods-iOS_Study_A-acknowledgements.markdown */, + C7F1D7D76D5A662BE72D55D9B3F913A7 /* Pods-iOS_Study_A-acknowledgements.plist */, + F5FFE88D8C5AEC6C12544FE044EED818 /* Pods-iOS_Study_A-dummy.m */, + 5FC9756C80722212F4B2D830A67A4D6B /* Pods-iOS_Study_A-frameworks.sh */, + B0256D59F7E649FE3F9A3260378A6288 /* Pods-iOS_Study_A-Info.plist */, + 64B006C8E133F9CFAFE7CE0397C0B6DA /* Pods-iOS_Study_A-umbrella.h */, + B9104912E2AC6297BB8F052FB33D9160 /* Pods-iOS_Study_A.debug.xcconfig */, + 7F4D557E74B1A3F57267B72C5E10C919 /* Pods-iOS_Study_A.release.xcconfig */, + ); + name = "Pods-iOS_Study_A"; + path = "Target Support Files/Pods-iOS_Study_A"; + sourceTree = ""; + }; + CF1408CF629C7361332E53B88F7BD30C = { + isa = PBXGroup; + children = ( + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, + D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */, + FBE859397B27E4FC4D81B6F5DD24B6F6 /* Pods */, + 219A211984C3A015A76AE8561902C398 /* Products */, + FACF1AD1FC9A30DA3A9B33039B974C61 /* Targets Support Files */, + ); + sourceTree = ""; + }; + D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 578452D2E740E91742655AC8F1636D1F /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + D29D3F332511F02C2A2BCFE5288B22D5 /* SnapKit */ = { + isa = PBXGroup; + children = ( + 0AFDF096C3836F945945C9FFDB5090F5 /* Constraint.swift */, + 5F2DCDFF2011C08759407B4E2038CA11 /* ConstraintAttributes.swift */, + DD101E65ADCCC341BCD3BFF777CA947C /* ConstraintConfig.swift */, + C282AEDFB53BD2F6B277738727FF116D /* ConstraintConstantTarget.swift */, + 54A0BC61944B3E89515CACB83BB1B976 /* ConstraintDescription.swift */, + BC8DFD8FEE78807F86F0544749C80450 /* ConstraintDirectionalInsets.swift */, + 7BC84DB0CD86A51B4B66E0450CBF40DE /* ConstraintDirectionalInsetTarget.swift */, + 02732995CB94C03CB83E1935B434AD74 /* ConstraintDSL.swift */, + C5D52A60BF41010F680313572B051598 /* ConstraintInsets.swift */, + FE5693124BFA9269D2085EC1ADFAAD76 /* ConstraintInsetTarget.swift */, + 26E5BB7E9F99F41E937A7E2CCEF178BE /* ConstraintItem.swift */, + F55D2A11C17BBCE3C9F7F0BA9555B5AE /* ConstraintLayoutGuide.swift */, + E04B678C00268C9CF7E410145D6F78AA /* ConstraintLayoutGuide+Extensions.swift */, + C91F91B010D4991E838DAC578595BA7A /* ConstraintLayoutGuideDSL.swift */, + BA50A49AB14A27B030EF455D9943EB8B /* ConstraintLayoutSupport.swift */, + 5032FD34D5BB9A1F925C649B43CC02DC /* ConstraintLayoutSupportDSL.swift */, + 0A4B3092297166519217A25AD70D5341 /* ConstraintMaker.swift */, + F57C38722D9F65992CF2200038C8651E /* ConstraintMakerEditable.swift */, + DDFBBDB0D11D15EA3C0D640EF407F700 /* ConstraintMakerExtendable.swift */, + 412D51A2BEEF78C262C4B3F3798D1702 /* ConstraintMakerFinalizable.swift */, + 9F0A527ED8F0A719FF610D743A87DAD3 /* ConstraintMakerPrioritizable.swift */, + 4C8251A08ED8E6CF34420BBF858126F7 /* ConstraintMakerRelatable.swift */, + 583BBF75085D255E27A5F9EF9EC203A5 /* ConstraintMakerRelatable+Extensions.swift */, + 00529F62152FE0E9A82AF6D8EAAAE2E1 /* ConstraintMultiplierTarget.swift */, + 751D5202E1F291CC13F7AE0CD669B831 /* ConstraintOffsetTarget.swift */, + B57B4B15AAC3AB24B43306829FAA77A0 /* ConstraintPriority.swift */, + 7096225ED146E16EC168C99FEDD215B5 /* ConstraintPriorityTarget.swift */, + 3AF34962F54DAA8DEB0A1D7D4F3FC09A /* ConstraintRelatableTarget.swift */, + E30E74C9EDB065D2E76B3EDCCB6E2153 /* ConstraintRelation.swift */, + 458867733779570F7398C76B46AEAF5E /* ConstraintView.swift */, + C83141A7BA266489296BCBEF99AC5412 /* ConstraintView+Extensions.swift */, + 0072CC268C7456CC1DA6E8180975AB43 /* ConstraintViewDSL.swift */, + F4CBE69DD3B611E4180FCBDD8CDE8814 /* Debugging.swift */, + 38A6A462E0F0B040B83C8763773533FE /* LayoutConstraint.swift */, + EEE15C12D4B2736CB1D1B07F4838FCA7 /* LayoutConstraintItem.swift */, + 960E2E91424D9428F311B73888D8E927 /* Typealiases.swift */, + 152EE8343B4F64CFDE73F65CEF14A13F /* UILayoutSupport+Extensions.swift */, + 403EB05A3920652EED411213C52E3AC2 /* Support Files */, + ); + name = SnapKit; + path = SnapKit; + sourceTree = ""; + }; + FACF1AD1FC9A30DA3A9B33039B974C61 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + C4195BEF0609FF13F23AAE693542386A /* Pods-iOS_Study_A */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + FBE859397B27E4FC4D81B6F5DD24B6F6 /* Pods */ = { + isa = PBXGroup; + children = ( + D29D3F332511F02C2A2BCFE5288B22D5 /* SnapKit */, + ); + name = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 2443259CA689B3E58BD1607B12729AB9 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + BE91010898EDA0867254DA1F1FDF4F7A /* Pods-iOS_Study_A-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5FA4790A32ECD84F2CEA55509107BD0A /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A3E3AB7C765C21AE17B1E6EE6560040C /* SnapKit-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 19622742EBA51E823D6DAE3F8CDBFAD4 /* SnapKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = 58EAA7FF29EA237538F747F2AF468203 /* Build configuration list for PBXNativeTarget "SnapKit" */; + buildPhases = ( + 5FA4790A32ECD84F2CEA55509107BD0A /* Headers */, + 7B7E69B2799BABEB7764F85296B591B7 /* Sources */, + E8E4E7CE8309D3EF7B7476AC57986BE9 /* Frameworks */, + 820C67429A90336F5AF1C850DF03B1B9 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SnapKit; + productName = SnapKit; + productReference = 979486118B3E90C08386079D57962701 /* SnapKit */; + productType = "com.apple.product-type.framework"; + }; + 4BEDB42417F75D176AFC87E5497A4D5F /* Pods-iOS_Study_A */ = { + isa = PBXNativeTarget; + buildConfigurationList = E72D7E19162112E6C5CDA195DFBE58B2 /* Build configuration list for PBXNativeTarget "Pods-iOS_Study_A" */; + buildPhases = ( + 2443259CA689B3E58BD1607B12729AB9 /* Headers */, + E2EC38348255FEF5EF04C05DC4312D1E /* Sources */, + D418C9C74A7E03A7D32E4B7F49CFD348 /* Frameworks */, + D1EA30C1A53743FD041A9FC3F554DDEF /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + C1D55A845FE98035C4B6A7278E9B74C4 /* PBXTargetDependency */, + ); + name = "Pods-iOS_Study_A"; + productName = Pods_iOS_Study_A; + productReference = 2A6C4FB094E63F7B4E5D4EA8286C4D1A /* Pods-iOS_Study_A */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + BFDFE7DC352907FC980B868725387E98 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1500; + LastUpgradeCheck = 1500; + }; + buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + Base, + en, + ); + mainGroup = CF1408CF629C7361332E53B88F7BD30C; + productRefGroup = 219A211984C3A015A76AE8561902C398 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 4BEDB42417F75D176AFC87E5497A4D5F /* Pods-iOS_Study_A */, + 19622742EBA51E823D6DAE3F8CDBFAD4 /* SnapKit */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 820C67429A90336F5AF1C850DF03B1B9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D1EA30C1A53743FD041A9FC3F554DDEF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 7B7E69B2799BABEB7764F85296B591B7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6EAC8B6FA2D115DE708A58C601DD25E1 /* Constraint.swift in Sources */, + 0B994CDC79B1AD3A7BE62490D27C60C8 /* ConstraintAttributes.swift in Sources */, + 3660B4F629053ABC3C1DF69366770289 /* ConstraintConfig.swift in Sources */, + 9C9548E8B4675954566202F7B87FF0E6 /* ConstraintConstantTarget.swift in Sources */, + 5380454C48A12A6E376122ABD8096968 /* ConstraintDescription.swift in Sources */, + E98DC8FB2578E76A812E0C94BA10E1B1 /* ConstraintDirectionalInsets.swift in Sources */, + 04637C70546B34F93C3A1D79C3F78B37 /* ConstraintDirectionalInsetTarget.swift in Sources */, + 56AC6DC6459AE47E7BC4AF06E5B148D2 /* ConstraintDSL.swift in Sources */, + 604D3C93C17978C23600EC415949AB64 /* ConstraintInsets.swift in Sources */, + 9E02CFFEFE1BEC978B512286F03D31DA /* ConstraintInsetTarget.swift in Sources */, + 69DE75BA185BBAB5FDAA28321F3C849F /* ConstraintItem.swift in Sources */, + 611CEF7FF1EF9EA1BCEF6C73EEE3ACCF /* ConstraintLayoutGuide.swift in Sources */, + 6AC1B881BB319C89AD023A02CDC8FC3D /* ConstraintLayoutGuide+Extensions.swift in Sources */, + EF21586EC3DFF6097A58EEC87376A0C1 /* ConstraintLayoutGuideDSL.swift in Sources */, + 00A2749F46C967ED4725A32357E3FB1B /* ConstraintLayoutSupport.swift in Sources */, + 56A72F6D13D930C4A2568F24DEA33C8D /* ConstraintLayoutSupportDSL.swift in Sources */, + FAB03959C2357E325B19E08BC4775DAB /* ConstraintMaker.swift in Sources */, + 220D6AC9B1B1EC8EFFB204F9C1EAC842 /* ConstraintMakerEditable.swift in Sources */, + A5A8BF973BFE9C9304372A26C9F2E35B /* ConstraintMakerExtendable.swift in Sources */, + 42B6ACFCF650183030867CB3EF345E95 /* ConstraintMakerFinalizable.swift in Sources */, + B43017FEC99D227D4CDD81DD2C27D9D9 /* ConstraintMakerPrioritizable.swift in Sources */, + 183D8B3E057B885EA7DF9A8CDCCE9029 /* ConstraintMakerRelatable.swift in Sources */, + 95E194A3AABB5407231E898B6686F73E /* ConstraintMakerRelatable+Extensions.swift in Sources */, + F7C0960CEEB8F0C18F4503B405EAC08F /* ConstraintMultiplierTarget.swift in Sources */, + A03FDA8BC5741880B1EF11AFD248EF48 /* ConstraintOffsetTarget.swift in Sources */, + 06E43B4751069B47B3BD4AFD936A57E3 /* ConstraintPriority.swift in Sources */, + 4DA72FD7F1FB2C0449EDEF4B8A579807 /* ConstraintPriorityTarget.swift in Sources */, + 55E51F45F1E157D3B4942BA7252C277E /* ConstraintRelatableTarget.swift in Sources */, + 4BAD99B7394E225CEDBF94B8100BCC7F /* ConstraintRelation.swift in Sources */, + B752F7C4BECB65894B1F49421049CE5F /* ConstraintView.swift in Sources */, + F953AA9104BFE0C2DAD639EA60104A75 /* ConstraintView+Extensions.swift in Sources */, + 256558233B40ACA6818F143BBC5B8017 /* ConstraintViewDSL.swift in Sources */, + 5D36B99F3CAB1FC7337082D9581FECA6 /* Debugging.swift in Sources */, + 0591132B5EA1BE4DDA268D8A9C3D0421 /* LayoutConstraint.swift in Sources */, + 98F570DA48370453D648BD526FDAAEAA /* LayoutConstraintItem.swift in Sources */, + BD47CB74CD9B2B4D2D942C9B65748DFB /* SnapKit-dummy.m in Sources */, + B03B5579590D528CBA6D11FF638BC2AF /* Typealiases.swift in Sources */, + 38B9D58E94D9C1CECD7E381C64A2329D /* UILayoutSupport+Extensions.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2EC38348255FEF5EF04C05DC4312D1E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EC6247CF0C225D23304BA654743DECF8 /* Pods-iOS_Study_A-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + C1D55A845FE98035C4B6A7278E9B74C4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SnapKit; + target = 19622742EBA51E823D6DAE3F8CDBFAD4 /* SnapKit */; + targetProxy = 374AC3EFE388BE3B64BD48A897BB74F7 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 7755621BC8FC5C9F567FD9425E396DBC /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7F4D557E74B1A3F57267B72C5E10C919 /* Pods-iOS_Study_A.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 7EE7A78859F657F6BEFC651185B43192 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 5.0; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Release; + }; + 8C925430B65BE03F92ABCD1B2005EE0C /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 782C19B041349DED0C47AC71C798375C /* SnapKit.release.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/SnapKit/SnapKit-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SnapKit/SnapKit-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MODULEMAP_FILE = "Target Support Files/SnapKit/SnapKit.modulemap"; + PRODUCT_MODULE_NAME = SnapKit; + PRODUCT_NAME = SnapKit; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + A6F0173BAEB974532D93E05E5A94E50A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 0EE5F8CB92905AE76169A71226B44035 /* SnapKit.debug.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/SnapKit/SnapKit-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SnapKit/SnapKit-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MODULEMAP_FILE = "Target Support Files/SnapKit/SnapKit.modulemap"; + PRODUCT_MODULE_NAME = SnapKit; + PRODUCT_NAME = SnapKit; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + D299434AB35E7FD6F7921C8EF24742FF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + DA28CA333F27807AE5CBEDB6C71DE7ED /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B9104912E2AC6297BB8F052FB33D9160 /* Pods-iOS_Study_A.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D299434AB35E7FD6F7921C8EF24742FF /* Debug */, + 7EE7A78859F657F6BEFC651185B43192 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 58EAA7FF29EA237538F747F2AF468203 /* Build configuration list for PBXNativeTarget "SnapKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A6F0173BAEB974532D93E05E5A94E50A /* Debug */, + 8C925430B65BE03F92ABCD1B2005EE0C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E72D7E19162112E6C5CDA195DFBE58B2 /* Build configuration list for PBXNativeTarget "Pods-iOS_Study_A" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DA28CA333F27807AE5CBEDB6C71DE7ED /* Debug */, + 7755621BC8FC5C9F567FD9425E396DBC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; +} diff --git a/Pods/SnapKit/LICENSE b/Pods/SnapKit/LICENSE new file mode 100644 index 0000000..a18ccfb --- /dev/null +++ b/Pods/SnapKit/LICENSE @@ -0,0 +1,19 @@ +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. diff --git a/Pods/SnapKit/README.md b/Pods/SnapKit/README.md new file mode 100644 index 0000000..b36df7a --- /dev/null +++ b/Pods/SnapKit/README.md @@ -0,0 +1,155 @@ + + +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) +[![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) + +#### ⚠️ **To use with Swift 4.x please ensure you are using >= 4.0.0** ⚠️ +#### ⚠️ **To use with Swift 5.x please ensure you are using >= 5.0.0** ⚠️ + +## Contents + +- [Requirements](#requirements) +- [Migration Guides](#migration-guides) +- [Communication](#communication) +- [Installation](#installation) +- [Usage](#usage) +- [Credits](#credits) +- [License](#license) + +## Requirements + +- iOS 10.0+ / Mac OS X 10.12+ / tvOS 10.0+ +- Xcode 10.0+ +- Swift 4.0+ + +## Migration Guides + +- [SnapKit 3.0 Migration Guide](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 4.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', '~> 5.6.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" ~> 5.0.0 +``` + +Run `carthage update` to build the framework and drag the built `SnapKit.framework` into your Xcode project. + +### Swift Package Manager + +[Swift Package Manager](https://swift.org/package-manager/) is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies. + +> Xcode 11+ is required to build SnapKit using Swift Package Manager. + +To integrate SnapKit into your Xcode project using Swift Package Manager, add it to the dependencies value of your `Package.swift`: + +```swift +dependencies: [ + .package(url: "https://github.com/SnapKit/SnapKit.git", .upToNextMajor(from: "5.0.1")) +] +``` + +### 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 + +class MyViewController: UIViewController { + + lazy var box = UIView() + + override func viewDidLoad() { + super.viewDidLoad() + + self.view.addSubview(box) + box.backgroundColor = .green + box.snp.makeConstraints { (make) -> Void in + make.width.height.equalTo(50) + make.center.equalTo(self.view) + } + } + +} +``` + +### Playground +You can try SnapKit in Playground. + +**Note:** + +> To try SnapKit in playground, open `SnapKit.xcworkspace` and build SnapKit.framework for any simulator first. + +### Resources + +- [Documentation](https://snapkit.github.io/SnapKit/docs/) +- [F.A.Q.](https://snapkit.github.io/SnapKit/faq/) + +## Credits + +- Robert Payne ([@robertjpayne](https://twitter.com/robertjpayne)) +- Many other contributors + +## License + +SnapKit is released under the MIT license. See LICENSE for details. diff --git a/Pods/SnapKit/Sources/Constraint.swift b/Pods/SnapKit/Sources/Constraint.swift new file mode 100644 index 0000000..37409b3 --- /dev/null +++ b/Pods/SnapKit/Sources/Constraint.swift @@ -0,0 +1,341 @@ +// +// 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 final class Constraint { + + internal let sourceLocation: (String, UInt) + internal let label: String? + + private let from: ConstraintItem + private let to: ConstraintItem + private let relation: ConstraintRelation + private let multiplier: ConstraintMultiplierTarget + private var constant: ConstraintConstantTarget { + didSet { + self.updateConstantAndPriorityIfNeeded() + } + } + private var priority: ConstraintPriorityTarget { + didSet { + self.updateConstantAndPriorityIfNeeded() + } + } + public var layoutConstraints: [LayoutConstraint] + + public var isActive: Bool { + set { + if newValue { + activate() + } + else { + deactivate() + } + } + + get { + for layoutConstraint in self.layoutConstraints { + if layoutConstraint.isActive { + return true + } + } + return false + } + } + + // MARK: Initialization + + 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.sourceLocation = sourceLocation + self.label = label + self.multiplier = multiplier + self.constant = constant + self.priority = priority + self.layoutConstraints = [] + + // get attributes + let layoutFromAttributes = self.from.attributes.layoutAttributes + let layoutToAttributes = self.to.attributes.layoutAttributes + + // get layout from + let layoutFrom = self.from.layoutConstraintItem! + + // get relation + let layoutRelation = self.relation.layoutRelation + + for layoutFromAttribute in layoutFromAttributes { + // get layout to attribute + let layoutToAttribute: LayoutAttribute + #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 == .directionalEdges && self.to.attributes == .directionalMargins { + switch layoutFromAttribute { + case .leading: + layoutToAttribute = .leadingMargin + case .trailing: + layoutToAttribute = .trailingMargin + case .top: + layoutToAttribute = .topMargin + case .bottom: + layoutToAttribute = .bottomMargin + default: + fatalError() + } + } else if self.from.attributes == .directionalMargins && self.to.attributes == .directionalEdges { + switch layoutFromAttribute { + case .leadingMargin: + layoutToAttribute = .leading + case .trailingMargin: + layoutToAttribute = .trailing + 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 { + if self.to.target == nil && (layoutFromAttribute == .centerX || layoutFromAttribute == .centerY) { + layoutToAttribute = layoutFromAttribute == .centerX ? .left : .top + } else { + layoutToAttribute = layoutFromAttribute + } + } + #else + if self.from.attributes == self.to.attributes { + layoutToAttribute = layoutFromAttribute + } else if layoutToAttributes.count > 0 { + layoutToAttribute = layoutToAttributes[0] + } else { + layoutToAttribute = layoutFromAttribute + } + #endif + + // get layout constant + let layoutConstant: CGFloat = self.constant.constraintConstantTargetValueFor(layoutAttribute: layoutToAttribute) + + // get layout to + 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, + attribute: layoutFromAttribute, + relatedBy: layoutRelation, + toItem: layoutTo, + attribute: layoutToAttribute, + multiplier: self.multiplier.constraintMultiplierTargetValue, + constant: layoutConstant + ) + + // set label + layoutConstraint.label = self.label + + // set priority + layoutConstraint.priority = LayoutPriority(rawValue: self.priority.constraintPriorityTargetValue) + + // set constraint + layoutConstraint.constraint = self + + // append + self.layoutConstraints.append(layoutConstraint) + } + } + + // MARK: Public + + @available(*, deprecated, renamed:"activate()") + public func install() { + self.activate() + } + + @available(*, deprecated, renamed:"deactivate()") + public func uninstall() { + self.deactivate() + } + + public func activate() { + self.activateIfNeeded() + } + + public func deactivate() { + self.deactivateIfNeeded() + } + + @discardableResult + public func update(offset: ConstraintOffsetTarget) -> Constraint { + self.constant = offset.constraintOffsetTargetValue + return self + } + + @discardableResult + public func update(inset: ConstraintInsetTarget) -> Constraint { + self.constant = inset.constraintInsetTargetValue + return self + } + + #if os(iOS) || os(tvOS) + @discardableResult + @available(iOS 11.0, tvOS 11.0, *) + public func update(inset: ConstraintDirectionalInsetTarget) -> Constraint { + self.constant = inset.constraintDirectionalInsetTargetValue + return self + } + #endif + + @discardableResult + public func update(priority: ConstraintPriorityTarget) -> Constraint { + self.priority = priority.constraintPriorityTargetValue + return self + } + + @discardableResult + public func update(priority: ConstraintPriority) -> Constraint { + self.priority = priority.value + return self + } + + @available(*, deprecated, renamed:"update(offset:)") + public func updateOffset(amount: ConstraintOffsetTarget) -> Void { self.update(offset: amount) } + + @available(*, deprecated, renamed:"update(inset:)") + public func updateInsets(amount: ConstraintInsetTarget) -> Void { self.update(inset: amount) } + + @available(*, deprecated, renamed:"update(priority:)") + public func updatePriority(amount: ConstraintPriorityTarget) -> Void { self.update(priority: amount) } + + @available(*, deprecated, message:"Use update(priority: ConstraintPriorityTarget) instead.") + public func updatePriorityRequired() -> Void {} + + @available(*, deprecated, message:"Use update(priority: ConstraintPriorityTarget) instead.") + public func updatePriorityHigh() -> Void { fatalError("Must be implemented by Concrete subclass.") } + + @available(*, deprecated, message:"Use update(priority: ConstraintPriorityTarget) instead.") + public func updatePriorityMedium() -> Void { fatalError("Must be implemented by Concrete subclass.") } + + @available(*, deprecated, 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) + + let requiredPriority = ConstraintPriority.required.value + if (layoutConstraint.priority.rawValue < requiredPriority), (self.priority.constraintPriorityTargetValue != requiredPriority) { + layoutConstraint.priority = LayoutPriority(rawValue: self.priority.constraintPriorityTargetValue) + } + } + } + + internal func activateIfNeeded(updatingExisting: Bool = false) { + guard let item = self.from.layoutConstraintItem else { + print("WARNING: SnapKit failed to get from item from constraint. Activate will be a no-op.") + return + } + let layoutConstraints = self.layoutConstraints + + if updatingExisting { + var existingLayoutConstraints: [LayoutConstraint] = [] + for constraint in item.constraints { + existingLayoutConstraints += constraint.layoutConstraints + } + + 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) + } + } else { + NSLayoutConstraint.activate(layoutConstraints) + item.add(constraints: [self]) + } + } + + internal func deactivateIfNeeded() { + guard let item = self.from.layoutConstraintItem else { + print("WARNING: SnapKit failed to get from item from constraint. Deactivate will be a no-op.") + return + } + let layoutConstraints = self.layoutConstraints + NSLayoutConstraint.deactivate(layoutConstraints) + item.remove(constraints: [self]) + } +} diff --git a/Pods/SnapKit/Sources/ConstraintAttributes.swift b/Pods/SnapKit/Sources/ConstraintAttributes.swift new file mode 100644 index 0000000..408308b --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintAttributes.swift @@ -0,0 +1,203 @@ +// +// 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 + + +internal struct ConstraintAttributes : OptionSet, ExpressibleByIntegerLiteral { + + typealias IntegerLiteralType = UInt + + internal init(rawValue: UInt) { + self.rawValue = rawValue + } + internal init(_ rawValue: UInt) { + self.init(rawValue: rawValue) + } + internal init(nilLiteral: ()) { + self.rawValue = 0 + } + internal init(integerLiteral rawValue: IntegerLiteralType) { + self.init(rawValue: rawValue) + } + + internal private(set) var rawValue: UInt + internal static var allZeros: ConstraintAttributes { return 0 } + internal static func convertFromNilLiteral() -> ConstraintAttributes { return 0 } + 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) } + + // normal + + internal static let none: ConstraintAttributes = 0 + internal static let left: ConstraintAttributes = ConstraintAttributes(UInt(1) << 0) + internal static let top: ConstraintAttributes = ConstraintAttributes(UInt(1) << 1) + internal static let right: ConstraintAttributes = ConstraintAttributes(UInt(1) << 2) + internal static let bottom: ConstraintAttributes = ConstraintAttributes(UInt(1) << 3) + internal static let leading: ConstraintAttributes = ConstraintAttributes(UInt(1) << 4) + internal static let trailing: ConstraintAttributes = ConstraintAttributes(UInt(1) << 5) + internal static let width: ConstraintAttributes = ConstraintAttributes(UInt(1) << 6) + internal static let height: ConstraintAttributes = ConstraintAttributes(UInt(1) << 7) + internal static let centerX: ConstraintAttributes = ConstraintAttributes(UInt(1) << 8) + internal static let centerY: ConstraintAttributes = ConstraintAttributes(UInt(1) << 9) + internal static let lastBaseline: ConstraintAttributes = ConstraintAttributes(UInt(1) << 10) + + @available(iOS 8.0, OSX 10.11, *) + internal static let firstBaseline: ConstraintAttributes = ConstraintAttributes(UInt(1) << 11) + + @available(iOS 8.0, *) + internal static let leftMargin: ConstraintAttributes = ConstraintAttributes(UInt(1) << 12) + + @available(iOS 8.0, *) + internal static let rightMargin: ConstraintAttributes = ConstraintAttributes(UInt(1) << 13) + + @available(iOS 8.0, *) + internal static let topMargin: ConstraintAttributes = ConstraintAttributes(UInt(1) << 14) + + @available(iOS 8.0, *) + internal static let bottomMargin: ConstraintAttributes = ConstraintAttributes(UInt(1) << 15) + + @available(iOS 8.0, *) + internal static let leadingMargin: ConstraintAttributes = ConstraintAttributes(UInt(1) << 16) + + @available(iOS 8.0, *) + internal static let trailingMargin: ConstraintAttributes = ConstraintAttributes(UInt(1) << 17) + + @available(iOS 8.0, *) + internal static let centerXWithinMargins: ConstraintAttributes = ConstraintAttributes(UInt(1) << 18) + + @available(iOS 8.0, *) + internal static let centerYWithinMargins: ConstraintAttributes = ConstraintAttributes(UInt(1) << 19) + + // aggregates + + internal static let edges: ConstraintAttributes = [.horizontalEdges, .verticalEdges] + internal static let horizontalEdges: ConstraintAttributes = [.left, .right] + internal static let verticalEdges: ConstraintAttributes = [.top, .bottom] + internal static let directionalEdges: ConstraintAttributes = [.directionalHorizontalEdges, .directionalVerticalEdges] + internal static let directionalHorizontalEdges: ConstraintAttributes = [.leading, .trailing] + internal static let directionalVerticalEdges: ConstraintAttributes = [.top, .bottom] + internal static let size: ConstraintAttributes = [.width, .height] + internal static let center: ConstraintAttributes = [.centerX, .centerY] + + @available(iOS 8.0, *) + internal static let margins: ConstraintAttributes = [.leftMargin, .topMargin, .rightMargin, .bottomMargin] + + @available(iOS 8.0, *) + internal static let directionalMargins: ConstraintAttributes = [.leadingMargin, .topMargin, .trailingMargin, .bottomMargin] + + @available(iOS 8.0, *) + internal static let centerWithinMargins: ConstraintAttributes = [.centerXWithinMargins, .centerYWithinMargins] + + internal var layoutAttributes:[LayoutAttribute] { + var attrs = [LayoutAttribute]() + if (self.contains(ConstraintAttributes.left)) { + attrs.append(.left) + } + if (self.contains(ConstraintAttributes.top)) { + attrs.append(.top) + } + if (self.contains(ConstraintAttributes.right)) { + attrs.append(.right) + } + if (self.contains(ConstraintAttributes.bottom)) { + attrs.append(.bottom) + } + if (self.contains(ConstraintAttributes.leading)) { + attrs.append(.leading) + } + if (self.contains(ConstraintAttributes.trailing)) { + attrs.append(.trailing) + } + if (self.contains(ConstraintAttributes.width)) { + attrs.append(.width) + } + if (self.contains(ConstraintAttributes.height)) { + attrs.append(.height) + } + if (self.contains(ConstraintAttributes.centerX)) { + attrs.append(.centerX) + } + if (self.contains(ConstraintAttributes.centerY)) { + attrs.append(.centerY) + } + if (self.contains(ConstraintAttributes.lastBaseline)) { + attrs.append(.lastBaseline) + } + + #if os(iOS) || os(tvOS) + 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 + (left: ConstraintAttributes, right: ConstraintAttributes) -> ConstraintAttributes { + return left.union(right) +} + +internal func +=(left: inout ConstraintAttributes, right: ConstraintAttributes) { + left.formUnion(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/Pods/SnapKit/Sources/ConstraintConfig.swift b/Pods/SnapKit/Sources/ConstraintConfig.swift new file mode 100644 index 0000000..2746b7d --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintConfig.swift @@ -0,0 +1,37 @@ +// +// 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 + public typealias ConstraintInterfaceLayoutDirection = UIUserInterfaceLayoutDirection +#else + import AppKit + public typealias ConstraintInterfaceLayoutDirection = NSUserInterfaceLayoutDirection +#endif + + +public struct ConstraintConfig { + + public static var interfaceLayoutDirection: ConstraintInterfaceLayoutDirection = .leftToRight + +} diff --git a/Pods/SnapKit/Sources/ConstraintConstantTarget.swift b/Pods/SnapKit/Sources/ConstraintConstantTarget.swift new file mode 100644 index 0000000..7f54907 --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintConstantTarget.swift @@ -0,0 +1,213 @@ +// +// 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 { +} + +#if os(iOS) || os(tvOS) +@available(iOS 11.0, tvOS 11.0, *) +extension ConstraintDirectionalInsets: ConstraintConstantTarget { +} +#endif + +extension ConstraintConstantTarget { + + internal func constraintConstantTargetValueFor(layoutAttribute: LayoutAttribute) -> 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 + #if swift(>=5.0) + @unknown default: + return 0.0 + #endif + } + #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 + #if swift(>=5.0) + @unknown default: + return 0.0 + #endif + } + #endif + } + + if let value = self as? ConstraintInsets { + #if os(iOS) || os(tvOS) + switch layoutAttribute { + case .left, .leftMargin: + return value.left + case .top, .topMargin, .firstBaseline: + return value.top + case .right, .rightMargin: + return -value.right + case .bottom, .bottomMargin, .lastBaseline: + 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 .centerX, .centerXWithinMargins: + return (value.left - value.right) / 2 + case .centerY, .centerYWithinMargins: + return (value.top - value.bottom) / 2 + case .width: + return -(value.left + value.right) + case .height: + return -(value.top + value.bottom) + case .notAnAttribute: + return 0.0 + #if swift(>=5.0) + @unknown default: + return 0.0 + #endif + } + #else + switch layoutAttribute { + case .left: + return value.left + case .top, .firstBaseline: + return value.top + case .right: + return -value.right + case .bottom, .lastBaseline: + return -value.bottom + case .leading: + return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.left : value.right + case .trailing: + return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? -value.right : -value.left + case .centerX: + return (value.left - value.right) / 2 + case .centerY: + return (value.top - value.bottom) / 2 + case .width: + return -(value.left + value.right) + case .height: + return -(value.top + value.bottom) + case .notAnAttribute: + return 0.0 + #if swift(>=5.0) + @unknown default: + return 0.0 + #endif + } + #endif + } + + #if os(iOS) || os(tvOS) + if #available(iOS 11.0, tvOS 11.0, *), let value = self as? ConstraintDirectionalInsets { + switch layoutAttribute { + case .left, .leftMargin: + return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.leading : value.trailing + case .top, .topMargin, .firstBaseline: + return value.top + case .right, .rightMargin: + return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? -value.trailing : -value.leading + case .bottom, .bottomMargin, .lastBaseline: + return -value.bottom + case .leading, .leadingMargin: + return value.leading + case .trailing, .trailingMargin: + return -value.trailing + case .centerX, .centerXWithinMargins: + return (value.leading - value.trailing) / 2 + case .centerY, .centerYWithinMargins: + return (value.top - value.bottom) / 2 + case .width: + return -(value.leading + value.trailing) + case .height: + return -(value.top + value.bottom) + case .notAnAttribute: + return 0.0 + #if swift(>=5.0) + @unknown default: + return 0.0 + #else + default: + return 0.0 + #endif + } + } + #endif + + return 0.0 + } + +} diff --git a/Pods/SnapKit/Sources/ConstraintDSL.swift b/Pods/SnapKit/Sources/ConstraintDSL.swift new file mode 100644 index 0000000..20f153d --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintDSL.swift @@ -0,0 +1,209 @@ +// +// 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 target: AnyObject? { get } + + func setLabel(_ value: String?) + func label() -> String? + +} +extension ConstraintDSL { + + public func setLabel(_ value: String?) { + objc_setAssociatedObject(self.target as Any, &labelKey, value, .OBJC_ASSOCIATION_COPY_NONATOMIC) + } + public func label() -> String? { + return objc_getAssociatedObject(self.target as Any, &labelKey) as? String + } + +} +private var labelKey: UInt8 = 0 + + +public protocol ConstraintBasicAttributesDSL : ConstraintDSL { +} +extension ConstraintBasicAttributesDSL { + + // 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 directionalEdges: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.directionalEdges) + } + + public var horizontalEdges: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.horizontalEdges) + } + + public var verticalEdges: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.verticalEdges) + } + + public var directionalHorizontalEdges: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.directionalHorizontalEdges) + } + + public var directionalVerticalEdges: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.directionalVerticalEdges) + } + + public var size: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.size) + } + + public var center: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.center) + } + +} + +public protocol ConstraintAttributesDSL : ConstraintBasicAttributesDSL { +} +extension ConstraintAttributesDSL { + + // MARK: Baselines + @available(*, deprecated, renamed:"lastBaseline") + 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 directionalMargins: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.directionalMargins) + } + + @available(iOS 8.0, *) + public var centerWithinMargins: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerWithinMargins) + } + +} diff --git a/Pods/SnapKit/Sources/ConstraintDescription.swift b/Pods/SnapKit/Sources/ConstraintDescription.swift new file mode 100644 index 0000000..3521f9f --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintDescription.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 class ConstraintDescription { + + internal let item: LayoutConstraintItem + 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 + } + let from = ConstraintItem(target: self.item, 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(item: LayoutConstraintItem, attributes: ConstraintAttributes) { + self.item = item + self.attributes = attributes + } + +} diff --git a/Pods/SnapKit/Sources/ConstraintDirectionalInsetTarget.swift b/Pods/SnapKit/Sources/ConstraintDirectionalInsetTarget.swift new file mode 100644 index 0000000..955aec3 --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintDirectionalInsetTarget.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 + +#if os(iOS) || os(tvOS) +public protocol ConstraintDirectionalInsetTarget: ConstraintConstantTarget { +} + +@available(iOS 11.0, tvOS 11.0, *) +extension ConstraintDirectionalInsets: ConstraintDirectionalInsetTarget { +} + +extension ConstraintDirectionalInsetTarget { + + @available(iOS 11.0, tvOS 11.0, *) + internal var constraintDirectionalInsetTargetValue: ConstraintDirectionalInsets { + if let amount = self as? ConstraintDirectionalInsets { + return amount + } else { + return ConstraintDirectionalInsets(top: 0, leading: 0, bottom: 0, trailing: 0) + } + } +} +#endif diff --git a/Pods/SnapKit/Sources/ConstraintDirectionalInsets.swift b/Pods/SnapKit/Sources/ConstraintDirectionalInsets.swift new file mode 100644 index 0000000..ada8ed5 --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintDirectionalInsets.swift @@ -0,0 +1,34 @@ +// +// 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 11.0, tvOS 11.0, *) + public typealias ConstraintDirectionalInsets = NSDirectionalEdgeInsets +#endif diff --git a/Pods/SnapKit/Sources/ConstraintInsetTarget.swift b/Pods/SnapKit/Sources/ConstraintInsetTarget.swift new file mode 100644 index 0000000..ba8a0f3 --- /dev/null +++ b/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/ConstraintInsets.swift b/Pods/SnapKit/Sources/ConstraintInsets.swift new file mode 100644 index 0000000..738ca05 --- /dev/null +++ b/Pods/SnapKit/Sources/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 = NSEdgeInsets +#endif diff --git a/Pods/SnapKit/Sources/ConstraintItem.swift b/Pods/SnapKit/Sources/ConstraintItem.swift new file mode 100644 index 0000000..a342c1d --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintItem.swift @@ -0,0 +1,61 @@ +// +// 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 final class ConstraintItem { + + internal weak var target: AnyObject? + internal let attributes: ConstraintAttributes + + internal init(target: AnyObject?, attributes: ConstraintAttributes) { + self.target = target + self.attributes = attributes + } + + internal var layoutConstraintItem: LayoutConstraintItem? { + return self.target as? LayoutConstraintItem + } + +} + +public func ==(lhs: ConstraintItem, rhs: ConstraintItem) -> Bool { + // pointer equality + guard lhs !== rhs else { + return true + } + + // 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 +} diff --git a/Pods/SnapKit/Sources/ConstraintLayoutGuide+Extensions.swift b/Pods/SnapKit/Sources/ConstraintLayoutGuide+Extensions.swift new file mode 100644 index 0000000..d429e0c --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintLayoutGuide+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, OSX 10.11, *) +public extension ConstraintLayoutGuide { + + var snp: ConstraintLayoutGuideDSL { + return ConstraintLayoutGuideDSL(guide: self) + } + +} diff --git a/Pods/SnapKit/Sources/ConstraintLayoutGuide.swift b/Pods/SnapKit/Sources/ConstraintLayoutGuide.swift new file mode 100644 index 0000000..e3e50c8 --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintLayoutGuide.swift @@ -0,0 +1,37 @@ +// +// 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 + @available(OSX 10.11, *) + public typealias ConstraintLayoutGuide = NSLayoutGuide +#endif diff --git a/Pods/SnapKit/Sources/ConstraintLayoutGuideDSL.swift b/Pods/SnapKit/Sources/ConstraintLayoutGuideDSL.swift new file mode 100644 index 0000000..0007819 --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintLayoutGuideDSL.swift @@ -0,0 +1,66 @@ +// +// 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, OSX 10.11, *) +public struct ConstraintLayoutGuideDSL: ConstraintAttributesDSL { + + @discardableResult + public func prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { + return ConstraintMaker.prepareConstraints(item: self.guide, closure: closure) + } + + public func makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + ConstraintMaker.makeConstraints(item: self.guide, closure: closure) + } + + public func remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + ConstraintMaker.remakeConstraints(item: self.guide, closure: closure) + } + + public func updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + ConstraintMaker.updateConstraints(item: self.guide, closure: closure) + } + + public func removeConstraints() { + ConstraintMaker.removeConstraints(item: self.guide) + } + + public var target: AnyObject? { + return self.guide + } + + internal let guide: ConstraintLayoutGuide + + internal init(guide: ConstraintLayoutGuide) { + self.guide = guide + + } + +} diff --git a/Pods/SnapKit/Sources/ConstraintLayoutSupport.swift b/Pods/SnapKit/Sources/ConstraintLayoutSupport.swift new file mode 100644 index 0000000..e92e9fb --- /dev/null +++ b/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/ConstraintLayoutSupportDSL.swift b/Pods/SnapKit/Sources/ConstraintLayoutSupportDSL.swift new file mode 100644 index 0000000..5d6ae89 --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintLayoutSupportDSL.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 + + +@available(iOS 8.0, *) +public struct ConstraintLayoutSupportDSL: ConstraintDSL { + + public var target: AnyObject? { + return self.support + } + + internal let support: ConstraintLayoutSupport + + internal init(support: ConstraintLayoutSupport) { + self.support = support + + } + + 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) + } +} diff --git a/Pods/SnapKit/Sources/ConstraintMaker.swift b/Pods/SnapKit/Sources/ConstraintMaker.swift new file mode 100644 index 0000000..50d7402 --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintMaker.swift @@ -0,0 +1,224 @@ +// +// 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 ConstraintMaker { + + public var left: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.left) + } + + public var top: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.top) + } + + public var bottom: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.bottom) + } + + public var right: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.right) + } + + public var leading: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.leading) + } + + public var trailing: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.trailing) + } + + public var width: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.width) + } + + public var height: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.height) + } + + public var centerX: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.centerX) + } + + public var centerY: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.centerY) + } + + @available(*, deprecated, renamed:"lastBaseline") + public var baseline: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.lastBaseline) + } + + public var lastBaseline: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.lastBaseline) + } + + @available(iOS 8.0, OSX 10.11, *) + public var firstBaseline: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.firstBaseline) + } + + @available(iOS 8.0, *) + public var leftMargin: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.leftMargin) + } + + @available(iOS 8.0, *) + public var rightMargin: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.rightMargin) + } + + @available(iOS 8.0, *) + public var topMargin: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.topMargin) + } + + @available(iOS 8.0, *) + public var bottomMargin: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.bottomMargin) + } + + @available(iOS 8.0, *) + public var leadingMargin: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.leadingMargin) + } + + @available(iOS 8.0, *) + public var trailingMargin: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.trailingMargin) + } + + @available(iOS 8.0, *) + public var centerXWithinMargins: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.centerXWithinMargins) + } + + @available(iOS 8.0, *) + public var centerYWithinMargins: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.centerYWithinMargins) + } + + public var edges: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.edges) + } + public var horizontalEdges: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.horizontalEdges) + } + public var verticalEdges: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.verticalEdges) + } + public var directionalEdges: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.directionalEdges) + } + public var directionalHorizontalEdges: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.directionalHorizontalEdges) + } + public var directionalVerticalEdges: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.directionalVerticalEdges) + } + public var size: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.size) + } + public var center: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.center) + } + + @available(iOS 8.0, *) + public var margins: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.margins) + } + + @available(iOS 8.0, *) + public var directionalMargins: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.directionalMargins) + } + + @available(iOS 8.0, *) + public var centerWithinMargins: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.centerWithinMargins) + } + + public let item: LayoutConstraintItem + private var descriptions = [ConstraintDescription]() + + internal init(item: LayoutConstraintItem) { + self.item = item + self.item.prepare() + } + + internal func makeExtendableWithAttributes(_ attributes: ConstraintAttributes) -> ConstraintMakerExtendable { + let description = ConstraintDescription(item: self.item, attributes: attributes) + self.descriptions.append(description) + return ConstraintMakerExtendable(description) + } + + internal static func prepareConstraints(item: LayoutConstraintItem, closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { + let maker = ConstraintMaker(item: item) + closure(maker) + var constraints: [Constraint] = [] + for description in maker.descriptions { + guard let constraint = description.constraint else { + continue + } + constraints.append(constraint) + } + return constraints + } + + internal static func makeConstraints(item: LayoutConstraintItem, closure: (_ make: ConstraintMaker) -> Void) { + let constraints = prepareConstraints(item: item, closure: closure) + for constraint in constraints { + constraint.activateIfNeeded(updatingExisting: false) + } + } + + internal static func remakeConstraints(item: LayoutConstraintItem, closure: (_ make: ConstraintMaker) -> Void) { + self.removeConstraints(item: item) + self.makeConstraints(item: item, closure: closure) + } + + internal static func updateConstraints(item: LayoutConstraintItem, closure: (_ make: ConstraintMaker) -> Void) { + guard item.constraints.count > 0 else { + self.makeConstraints(item: item, closure: closure) + return + } + + let constraints = prepareConstraints(item: item, closure: closure) + for constraint in constraints { + constraint.activateIfNeeded(updatingExisting: true) + } + } + + internal static func removeConstraints(item: LayoutConstraintItem) { + let constraints = item.constraints + for constraint in constraints { + constraint.deactivateIfNeeded() + } + } + +} diff --git a/Pods/SnapKit/Sources/ConstraintMakerEditable.swift b/Pods/SnapKit/Sources/ConstraintMakerEditable.swift new file mode 100644 index 0000000..4869bc2 --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintMakerEditable.swift @@ -0,0 +1,64 @@ +// +// 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: ConstraintMakerPrioritizable { + + @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 + } + + #if os(iOS) || os(tvOS) + @discardableResult + @available(iOS 11.0, tvOS 11.0, *) + public func inset(_ amount: ConstraintDirectionalInsetTarget) -> ConstraintMakerEditable { + self.description.constant = amount.constraintDirectionalInsetTargetValue + return self + } + #endif +} diff --git a/Pods/SnapKit/Sources/ConstraintMakerExtendable.swift b/Pods/SnapKit/Sources/ConstraintMakerExtendable.swift new file mode 100644 index 0000000..d834649 --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintMakerExtendable.swift @@ -0,0 +1,195 @@ +// +// 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, renamed:"lastBaseline") + 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 topMargin: ConstraintMakerExtendable { + self.description.attributes += .topMargin + 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 horizontalEdges: ConstraintMakerExtendable { + self.description.attributes += .horizontalEdges + return self + } + public var verticalEdges: ConstraintMakerExtendable { + self.description.attributes += .verticalEdges + return self + } + public var directionalEdges: ConstraintMakerExtendable { + self.description.attributes += .directionalEdges + return self + } + public var directionalHorizontalEdges: ConstraintMakerExtendable { + self.description.attributes += .directionalHorizontalEdges + return self + } + public var directionalVerticalEdges: ConstraintMakerExtendable { + self.description.attributes += .directionalVerticalEdges + 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 directionalMargins: ConstraintMakerExtendable { + self.description.attributes += .directionalMargins + return self + } + + @available(iOS 8.0, *) + public var centerWithinMargins: ConstraintMakerExtendable { + self.description.attributes += .centerWithinMargins + return self + } + +} diff --git a/Pods/SnapKit/Sources/ConstraintMakerFinalizable.swift b/Pods/SnapKit/Sources/ConstraintMakerFinalizable.swift new file mode 100644 index 0000000..4e1379e --- /dev/null +++ b/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/ConstraintMakerPrioritizable.swift b/Pods/SnapKit/Sources/ConstraintMakerPrioritizable.swift new file mode 100644 index 0000000..5af5303 --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintMakerPrioritizable.swift @@ -0,0 +1,70 @@ +// +// 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(*, deprecated, message:"Use ConstraintMakerPrioritizable instead.") +public typealias ConstraintMakerPriortizable = ConstraintMakerPrioritizable + +public class ConstraintMakerPrioritizable: ConstraintMakerFinalizable { + + @discardableResult + public func priority(_ amount: ConstraintPriority) -> ConstraintMakerFinalizable { + self.description.priority = amount.value + return self + } + + @discardableResult + public func priority(_ amount: ConstraintPriorityTarget) -> ConstraintMakerFinalizable { + self.description.priority = amount + return self + } + + @available(*, deprecated, message:"Use priority(.required) instead.") + @discardableResult + public func priorityRequired() -> ConstraintMakerFinalizable { + return self.priority(.required) + } + + @available(*, deprecated, message:"Use priority(.high) instead.") + @discardableResult + public func priorityHigh() -> ConstraintMakerFinalizable { + return self.priority(.high) + } + + @available(*, deprecated, message:"Use priority(.medium) instead.") + @discardableResult + public func priorityMedium() -> ConstraintMakerFinalizable { + return self.priority(.medium) + } + + @available(*, deprecated, message:"Use priority(.low) instead.") + @discardableResult + public func priorityLow() -> ConstraintMakerFinalizable { + return self.priority(.low) + } +} diff --git a/Pods/SnapKit/Sources/ConstraintMakerRelatable+Extensions.swift b/Pods/SnapKit/Sources/ConstraintMakerRelatable+Extensions.swift new file mode 100644 index 0000000..63100d7 --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintMakerRelatable+Extensions.swift @@ -0,0 +1,57 @@ +// +// 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 + + +extension ConstraintMakerRelatable { + + @discardableResult + public func equalToSuperview(_ closure: (ConstraintView) -> T, _ file: String = #file, line: UInt = #line) -> ConstraintMakerEditable { + guard let other = self.description.item.superview else { + fatalError("Expected superview but found nil when attempting make constraint `equalToSuperview`.") + } + return self.relatedTo(closure(other), relation: .equal, file: file, line: line) + } + + @discardableResult + public func lessThanOrEqualToSuperview(_ closure: (ConstraintView) -> T, _ file: String = #file, line: UInt = #line) -> ConstraintMakerEditable { + guard let other = self.description.item.superview else { + fatalError("Expected superview but found nil when attempting make constraint `lessThanOrEqualToSuperview`.") + } + return self.relatedTo(closure(other), relation: .lessThanOrEqual, file: file, line: line) + } + + @discardableResult + public func greaterThanOrEqualTo(_ closure: (ConstraintView) -> T, _ file: String = #file, line: UInt = #line) -> ConstraintMakerEditable { + guard let other = self.description.item.superview else { + fatalError("Expected superview but found nil when attempting make constraint `greaterThanOrEqualToSuperview`.") + } + return self.relatedTo(closure(other), relation: .greaterThanOrEqual, file: file, line: line) + } + +} diff --git a/Pods/SnapKit/Sources/ConstraintMakerRelatable.swift b/Pods/SnapKit/Sources/ConstraintMakerRelatable.swift new file mode 100644 index 0000000..7889532 --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintMakerRelatable.swift @@ -0,0 +1,115 @@ +// +// 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 || + other.attributes == .directionalEdges && self.description.attributes == .directionalMargins || + other.attributes == .directionalMargins && self.description.attributes == .directionalEdges 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 if #available(iOS 9.0, OSX 10.11, *), let other = other as? ConstraintLayoutGuide { + related = ConstraintItem(target: other, attributes: ConstraintAttributes.none) + constant = 0.0 + } 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.item.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 lessThanOrEqualToSuperview(_ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable { + guard let other = self.description.item.superview else { + fatalError("Expected superview but found nil when attempting make constraint `lessThanOrEqualToSuperview`.") + } + 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) + } + + @discardableResult + public func greaterThanOrEqualToSuperview(_ file: String = #file, line: UInt = #line) -> ConstraintMakerEditable { + guard let other = self.description.item.superview else { + fatalError("Expected superview but found nil when attempting make constraint `greaterThanOrEqualToSuperview`.") + } + return self.relatedTo(other, relation: .greaterThanOrEqual, file: file, line: line) + } +} diff --git a/Pods/SnapKit/Sources/ConstraintMultiplierTarget.swift b/Pods/SnapKit/Sources/ConstraintMultiplierTarget.swift new file mode 100644 index 0000000..6fecd33 --- /dev/null +++ b/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/ConstraintOffsetTarget.swift b/Pods/SnapKit/Sources/ConstraintOffsetTarget.swift new file mode 100644 index 0000000..bd9e0a1 --- /dev/null +++ b/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/ConstraintPriority.swift b/Pods/SnapKit/Sources/ConstraintPriority.swift new file mode 100644 index 0000000..f9dab16 --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintPriority.swift @@ -0,0 +1,77 @@ +// +// 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 ConstraintPriority : ExpressibleByFloatLiteral, Equatable, Strideable { + public typealias FloatLiteralType = Float + + public let value: Float + + public init(floatLiteral value: Float) { + self.value = value + } + + public init(_ value: Float) { + self.value = value + } + + public static var required: ConstraintPriority { + return 1000.0 + } + + public static var high: ConstraintPriority { + return 750.0 + } + + public static var medium: ConstraintPriority { + #if os(OSX) + return 501.0 + #else + return 500.0 + #endif + + } + + public static var low: ConstraintPriority { + return 250.0 + } + + public static func ==(lhs: ConstraintPriority, rhs: ConstraintPriority) -> Bool { + return lhs.value == rhs.value + } + + // MARK: Strideable + + public func advanced(by n: FloatLiteralType) -> ConstraintPriority { + return ConstraintPriority(floatLiteral: value + n) + } + + public func distance(to other: ConstraintPriority) -> FloatLiteralType { + return other.value - value + } +} diff --git a/Pods/SnapKit/Sources/ConstraintPriorityTarget.swift b/Pods/SnapKit/Sources/ConstraintPriorityTarget.swift new file mode 100644 index 0000000..064f750 --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintPriorityTarget.swift @@ -0,0 +1,85 @@ +// +// 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) + } + +} + +#if os(iOS) || os(tvOS) +extension UILayoutPriority: ConstraintPriorityTarget { + + public var constraintPriorityTargetValue: Float { + return self.rawValue + } + +} +#endif diff --git a/Pods/SnapKit/Sources/ConstraintRelatableTarget.swift b/Pods/SnapKit/Sources/ConstraintRelatableTarget.swift new file mode 100644 index 0000000..d517a61 --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintRelatableTarget.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 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 { +} + +#if os(iOS) || os(tvOS) +@available(iOS 11.0, tvOS 11.0, *) +extension ConstraintDirectionalInsets: ConstraintRelatableTarget { +} +#endif + +extension ConstraintItem: ConstraintRelatableTarget { +} + +extension ConstraintView: ConstraintRelatableTarget { +} + +@available(iOS 9.0, OSX 10.11, *) +extension ConstraintLayoutGuide: ConstraintRelatableTarget { +} diff --git a/Pods/SnapKit/Sources/ConstraintRelation.swift b/Pods/SnapKit/Sources/ConstraintRelation.swift new file mode 100644 index 0000000..446aaf7 --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintRelation.swift @@ -0,0 +1,48 @@ +// +// 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 + + +internal enum ConstraintRelation : Int { + case equal = 1 + case lessThanOrEqual + case greaterThanOrEqual + + internal var layoutRelation: LayoutRelation { + get { + switch(self) { + case .equal: + return .equal + case .lessThanOrEqual: + return .lessThanOrEqual + case .greaterThanOrEqual: + return .greaterThanOrEqual + } + } + } +} diff --git a/Pods/SnapKit/Sources/ConstraintView+Extensions.swift b/Pods/SnapKit/Sources/ConstraintView+Extensions.swift new file mode 100644 index 0000000..e0f71c1 --- /dev/null +++ b/Pods/SnapKit/Sources/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, renamed:"snp.left") + var snp_left: ConstraintItem { return self.snp.left } + + @available(*, deprecated, renamed:"snp.top") + var snp_top: ConstraintItem { return self.snp.top } + + @available(*, deprecated, renamed:"snp.right") + var snp_right: ConstraintItem { return self.snp.right } + + @available(*, deprecated, renamed:"snp.bottom") + var snp_bottom: ConstraintItem { return self.snp.bottom } + + @available(*, deprecated, renamed:"snp.leading") + var snp_leading: ConstraintItem { return self.snp.leading } + + @available(*, deprecated, renamed:"snp.trailing") + var snp_trailing: ConstraintItem { return self.snp.trailing } + + @available(*, deprecated, renamed:"snp.width") + var snp_width: ConstraintItem { return self.snp.width } + + @available(*, deprecated, renamed:"snp.height") + var snp_height: ConstraintItem { return self.snp.height } + + @available(*, deprecated, renamed:"snp.centerX") + var snp_centerX: ConstraintItem { return self.snp.centerX } + + @available(*, deprecated, renamed:"snp.centerY") + var snp_centerY: ConstraintItem { return self.snp.centerY } + + @available(*, deprecated, renamed:"snp.baseline") + var snp_baseline: ConstraintItem { return self.snp.baseline } + + @available(*, deprecated, renamed:"snp.lastBaseline") + @available(iOS 8.0, OSX 10.11, *) + var snp_lastBaseline: ConstraintItem { return self.snp.lastBaseline } + + @available(iOS, deprecated, renamed:"snp.firstBaseline") + @available(iOS 8.0, OSX 10.11, *) + var snp_firstBaseline: ConstraintItem { return self.snp.firstBaseline } + + @available(iOS, deprecated, renamed:"snp.leftMargin") + @available(iOS 8.0, *) + var snp_leftMargin: ConstraintItem { return self.snp.leftMargin } + + @available(iOS, deprecated, renamed:"snp.topMargin") + @available(iOS 8.0, *) + var snp_topMargin: ConstraintItem { return self.snp.topMargin } + + @available(iOS, deprecated, renamed:"snp.rightMargin") + @available(iOS 8.0, *) + var snp_rightMargin: ConstraintItem { return self.snp.rightMargin } + + @available(iOS, deprecated, renamed:"snp.bottomMargin") + @available(iOS 8.0, *) + var snp_bottomMargin: ConstraintItem { return self.snp.bottomMargin } + + @available(iOS, deprecated, renamed:"snp.leadingMargin") + @available(iOS 8.0, *) + var snp_leadingMargin: ConstraintItem { return self.snp.leadingMargin } + + @available(iOS, deprecated, renamed:"snp.trailingMargin") + @available(iOS 8.0, *) + var snp_trailingMargin: ConstraintItem { return self.snp.trailingMargin } + + @available(iOS, deprecated, renamed:"snp.centerXWithinMargins") + @available(iOS 8.0, *) + var snp_centerXWithinMargins: ConstraintItem { return self.snp.centerXWithinMargins } + + @available(iOS, deprecated, renamed:"snp.centerYWithinMargins") + @available(iOS 8.0, *) + var snp_centerYWithinMargins: ConstraintItem { return self.snp.centerYWithinMargins } + + @available(*, deprecated, renamed:"snp.edges") + var snp_edges: ConstraintItem { return self.snp.edges } + + @available(*, deprecated, renamed:"snp.size") + var snp_size: ConstraintItem { return self.snp.size } + + @available(*, deprecated, renamed:"snp.center") + var snp_center: ConstraintItem { return self.snp.center } + + @available(iOS, deprecated, renamed:"snp.margins") + @available(iOS 8.0, *) + var snp_margins: ConstraintItem { return self.snp.margins } + + @available(iOS, deprecated, renamed:"snp.centerWithinMargins") + @available(iOS 8.0, *) + var snp_centerWithinMargins: ConstraintItem { return self.snp.centerWithinMargins } + + @available(*, deprecated, renamed:"snp.prepareConstraints(_:)") + func snp_prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { + return self.snp.prepareConstraints(closure) + } + + @available(*, deprecated, renamed:"snp.makeConstraints(_:)") + func snp_makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + self.snp.makeConstraints(closure) + } + + @available(*, deprecated, renamed:"snp.remakeConstraints(_:)") + func snp_remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + self.snp.remakeConstraints(closure) + } + + @available(*, deprecated, renamed:"snp.updateConstraints(_:)") + func snp_updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + self.snp.updateConstraints(closure) + } + + @available(*, deprecated, renamed:"snp.removeConstraints()") + func snp_removeConstraints() { + self.snp.removeConstraints() + } + + var snp: ConstraintViewDSL { + return ConstraintViewDSL(view: self) + } + +} diff --git a/Pods/SnapKit/Sources/ConstraintView.swift b/Pods/SnapKit/Sources/ConstraintView.swift new file mode 100644 index 0000000..6ff8a76 --- /dev/null +++ b/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/ConstraintViewDSL.swift b/Pods/SnapKit/Sources/ConstraintViewDSL.swift new file mode 100644 index 0000000..a0187f9 --- /dev/null +++ b/Pods/SnapKit/Sources/ConstraintViewDSL.swift @@ -0,0 +1,101 @@ +// +// 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(item: self.view, closure: closure) + } + + public func makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + ConstraintMaker.makeConstraints(item: self.view, closure: closure) + } + + public func remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + ConstraintMaker.remakeConstraints(item: self.view, closure: closure) + } + + public func updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + ConstraintMaker.updateConstraints(item: self.view, closure: closure) + } + + public func removeConstraints() { + ConstraintMaker.removeConstraints(item: self.view) + } + + public var contentHuggingHorizontalPriority: Float { + get { + return self.view.contentHuggingPriority(for: .horizontal).rawValue + } + nonmutating set { + self.view.setContentHuggingPriority(LayoutPriority(rawValue: newValue), for: .horizontal) + } + } + + public var contentHuggingVerticalPriority: Float { + get { + return self.view.contentHuggingPriority(for: .vertical).rawValue + } + nonmutating set { + self.view.setContentHuggingPriority(LayoutPriority(rawValue: newValue), for: .vertical) + } + } + + public var contentCompressionResistanceHorizontalPriority: Float { + get { + return self.view.contentCompressionResistancePriority(for: .horizontal).rawValue + } + nonmutating set { + self.view.setContentCompressionResistancePriority(LayoutPriority(rawValue: newValue), for: .horizontal) + } + } + + public var contentCompressionResistanceVerticalPriority: Float { + get { + return self.view.contentCompressionResistancePriority(for: .vertical).rawValue + } + nonmutating set { + self.view.setContentCompressionResistancePriority(LayoutPriority(rawValue: newValue), for: .vertical) + } + } + + public var target: AnyObject? { + return self.view + } + + internal let view: ConstraintView + + internal init(view: ConstraintView) { + self.view = view + + } + +} diff --git a/Pods/SnapKit/Sources/Debugging.swift b/Pods/SnapKit/Sources/Debugging.swift new file mode 100644 index 0000000..a78579a --- /dev/null +++ b/Pods/SnapKit/Sources/Debugging.swift @@ -0,0 +1,169 @@ +// +// 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 LayoutConstraint { + + override var description: String { + var description = "<" + + description += descriptionForObject(self) + + if let firstItem = conditionalOptional(from: self.firstItem) { + description += " \(descriptionForObject(firstItem))" + } + + if self.firstAttribute != .notAnAttribute { + description += ".\(descriptionForAttribute(self.firstAttribute))" + } + + description += " \(descriptionForRelation(self.relation))" + + if let secondItem = self.secondItem { + description += " \(descriptionForObject(secondItem))" + } + + if self.secondAttribute != .notAnAttribute { + description += ".\(descriptionForAttribute(self.secondAttribute))" + } + + if self.multiplier != 1.0 { + description += " * \(self.multiplier)" + } + + if self.secondAttribute == .notAnAttribute { + description += " \(self.constant)" + } else { + if self.constant > 0.0 { + description += " + \(self.constant)" + } else if self.constant < 0.0 { + description += " - \(abs(self.constant))" + } + } + + if self.priority.rawValue != 1000.0 { + description += " ^\(self.priority)" + } + + description += ">" + + return description + } + +} + +private func descriptionForRelation(_ relation: LayoutRelation) -> String { + switch relation { + case .equal: return "==" + case .greaterThanOrEqual: return ">=" + case .lessThanOrEqual: return "<=" + #if swift(>=5.0) + @unknown default: return "unknown" + #endif + } +} + +private func descriptionForAttribute(_ attribute: LayoutAttribute) -> 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" + #if swift(>=5.0) + @unknown default: return "unknown" + #endif + } + #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" + #if swift(>=5.0) + @unknown default: return "unknown" + #endif + } + #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 = String(format: "%p", UInt(bitPattern: ObjectIdentifier(object))) + var desc = "" + + desc += type(of: object).description() + + if let object = object as? ConstraintView { + desc += ":\(object.snp.label() ?? pointerDescription)" + } else if let object = object as? LayoutConstraint { + desc += ":\(object.label ?? pointerDescription)" + } else { + desc += ":\(pointerDescription)" + } + + 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 +} diff --git a/Pods/SnapKit/Sources/LayoutConstraint.swift b/Pods/SnapKit/Sources/LayoutConstraint.swift new file mode 100644 index 0000000..5425ea8 --- /dev/null +++ b/Pods/SnapKit/Sources/LayoutConstraint.swift @@ -0,0 +1,61 @@ +// +// 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 LayoutConstraint : NSLayoutConstraint { + + public var label: String? { + get { + return self.identifier + } + set { + self.identifier = newValue + } + } + + internal weak var constraint: Constraint? = nil + +} + +internal func ==(lhs: LayoutConstraint, rhs: LayoutConstraint) -> Bool { + // If firstItem or secondItem on either constraint has a dangling pointer + // this comparison can cause a crash. The solution for this is to ensure + // your layout code hold strong references to things like Views, LayoutGuides + // and LayoutAnchors as SnapKit will not keep strong references to any of these. + guard lhs.firstAttribute == rhs.firstAttribute && + lhs.secondAttribute == rhs.secondAttribute && + lhs.relation == rhs.relation && + lhs.priority == rhs.priority && + lhs.multiplier == rhs.multiplier && + lhs.secondItem === rhs.secondItem && + lhs.firstItem === rhs.firstItem else { + return false + } + return true +} diff --git a/Pods/SnapKit/Sources/LayoutConstraintItem.swift b/Pods/SnapKit/Sources/LayoutConstraintItem.swift new file mode 100644 index 0000000..9b61d18 --- /dev/null +++ b/Pods/SnapKit/Sources/LayoutConstraintItem.swift @@ -0,0 +1,93 @@ +// +// 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 LayoutConstraintItem: AnyObject { +} + +@available(iOS 9.0, OSX 10.11, *) +extension ConstraintLayoutGuide : LayoutConstraintItem { +} + +extension ConstraintView : LayoutConstraintItem { +} + + +extension LayoutConstraintItem { + + internal func prepare() { + if let view = self as? ConstraintView { + view.translatesAutoresizingMaskIntoConstraints = false + } + } + + internal var superview: ConstraintView? { + if let view = self as? ConstraintView { + return view.superview + } + + if #available(iOS 9.0, OSX 10.11, *), let guide = self as? ConstraintLayoutGuide { + return guide.owningView + } + + return nil + } + internal var constraints: [Constraint] { + return self.constraintsSet.allObjects as! [Constraint] + } + + internal func add(constraints: [Constraint]) { + let constraintsSet = self.constraintsSet + for constraint in constraints { + constraintsSet.add(constraint) + } + } + + internal func remove(constraints: [Constraint]) { + let constraintsSet = self.constraintsSet + for constraint in constraints { + constraintsSet.remove(constraint) + } + } + + private var constraintsSet: NSMutableSet { + let constraintsSet: NSMutableSet + + if let existing = objc_getAssociatedObject(self, &constraintsKey) as? NSMutableSet { + constraintsSet = existing + } else { + constraintsSet = NSMutableSet() + objc_setAssociatedObject(self, &constraintsKey, constraintsSet, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) + } + return constraintsSet + + } + +} +private var constraintsKey: UInt8 = 0 diff --git a/Pods/SnapKit/Sources/Typealiases.swift b/Pods/SnapKit/Sources/Typealiases.swift new file mode 100644 index 0000000..ded96cc --- /dev/null +++ b/Pods/SnapKit/Sources/Typealiases.swift @@ -0,0 +1,42 @@ +// +// 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. + +import Foundation + +#if os(iOS) || os(tvOS) + import UIKit +#if swift(>=4.2) + typealias LayoutRelation = NSLayoutConstraint.Relation + typealias LayoutAttribute = NSLayoutConstraint.Attribute +#else + typealias LayoutRelation = NSLayoutRelation + typealias LayoutAttribute = NSLayoutAttribute +#endif + typealias LayoutPriority = UILayoutPriority +#else + import AppKit + typealias LayoutRelation = NSLayoutConstraint.Relation + typealias LayoutAttribute = NSLayoutConstraint.Attribute + typealias LayoutPriority = NSLayoutConstraint.Priority +#endif + diff --git a/Pods/SnapKit/Sources/UILayoutSupport+Extensions.swift b/Pods/SnapKit/Sources/UILayoutSupport+Extensions.swift new file mode 100644 index 0000000..8e7644c --- /dev/null +++ b/Pods/SnapKit/Sources/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 { + + var snp: ConstraintLayoutSupportDSL { + return ConstraintLayoutSupportDSL(support: self) + } + +} diff --git a/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-Info.plist b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-Info.plist new file mode 100644 index 0000000..19cf209 --- /dev/null +++ b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + ${PODS_DEVELOPMENT_LANGUAGE} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-acknowledgements.markdown b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-acknowledgements.markdown new file mode 100644 index 0000000..25f8f66 --- /dev/null +++ b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-acknowledgements.markdown @@ -0,0 +1,26 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## 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. + +Generated by CocoaPods - https://cocoapods.org diff --git a/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-acknowledgements.plist b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-acknowledgements.plist new file mode 100644 index 0000000..8474d45 --- /dev/null +++ b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-acknowledgements.plist @@ -0,0 +1,58 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + 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. + + License + MIT + Title + SnapKit + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-dummy.m b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-dummy.m new file mode 100644 index 0000000..e6ed4bd --- /dev/null +++ b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_iOS_Study_A : NSObject +@end +@implementation PodsDummy_Pods_iOS_Study_A +@end diff --git a/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks-Debug-input-files.xcfilelist b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks-Debug-input-files.xcfilelist new file mode 100644 index 0000000..4e435de --- /dev/null +++ b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks-Debug-input-files.xcfilelist @@ -0,0 +1,2 @@ +${PODS_ROOT}/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks.sh +${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks-Debug-output-files.xcfilelist b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks-Debug-output-files.xcfilelist new file mode 100644 index 0000000..b156f80 --- /dev/null +++ b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks-Debug-output-files.xcfilelist @@ -0,0 +1 @@ +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks-Release-input-files.xcfilelist b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks-Release-input-files.xcfilelist new file mode 100644 index 0000000..4e435de --- /dev/null +++ b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks-Release-input-files.xcfilelist @@ -0,0 +1,2 @@ +${PODS_ROOT}/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks.sh +${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks-Release-output-files.xcfilelist b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks-Release-output-files.xcfilelist new file mode 100644 index 0000000..b156f80 --- /dev/null +++ b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks-Release-output-files.xcfilelist @@ -0,0 +1 @@ +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks.sh b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks.sh new file mode 100755 index 0000000..6a91fc3 --- /dev/null +++ b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks.sh @@ -0,0 +1,186 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +function on_error { + echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" +} +trap 'on_error $LINENO' ERR + +if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then + # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy + # frameworks to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" +SWIFT_STDLIB_PATH="${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +BCSYMBOLMAP_DIR="BCSymbolMaps" + + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink -f "${source}")" + fi + + if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then + # Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied + find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do + echo "Installing $f" + install_bcsymbolmap "$f" "$destination" + rm "$f" + done + rmdir "${source}/${BCSYMBOLMAP_DIR}" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + elif [ -L "${binary}" ]; then + echo "Destination binary is symlinked..." + dirname="$(dirname "${binary}")" + binary="${dirname}/$(readlink "${binary}")" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + warn_missing_arch=${2:-true} + if [ -r "$source" ]; then + # Copy the dSYM into the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .dSYM "$source")" + binary_name="$(ls "$source/Contents/Resources/DWARF")" + binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" + + # Strip invalid architectures from the dSYM. + if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then + strip_invalid_archs "$binary" "$warn_missing_arch" + fi + if [[ $STRIP_BINARY_RETVAL == 0 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + mkdir -p "${DWARF_DSYM_FOLDER_PATH}" + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" + fi + fi +} + +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + warn_missing_arch=${2:-true} + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + if [[ "$warn_missing_arch" == "true" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + fi + STRIP_BINARY_RETVAL=1 + return + fi + stripped="" + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi + STRIP_BINARY_RETVAL=0 +} + +# Copies the bcsymbolmap files of a vendored framework +install_bcsymbolmap() { + local bcsymbolmap_path="$1" + local destination="${BUILT_PRODUCTS_DIR}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identity + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-umbrella.h b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-umbrella.h new file mode 100644 index 0000000..51364f2 --- /dev/null +++ b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_iOS_Study_AVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_iOS_Study_AVersionString[]; + diff --git a/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A.debug.xcconfig b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A.debug.xcconfig new file mode 100644 index 0000000..1ec013e --- /dev/null +++ b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A.debug.xcconfig @@ -0,0 +1,15 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -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_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A.modulemap b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A.modulemap new file mode 100644 index 0000000..974aa7c --- /dev/null +++ b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A.modulemap @@ -0,0 +1,6 @@ +framework module Pods_iOS_Study_A { + umbrella header "Pods-iOS_Study_A-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A.release.xcconfig b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A.release.xcconfig new file mode 100644 index 0000000..1ec013e --- /dev/null +++ b/Pods/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A.release.xcconfig @@ -0,0 +1,15 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -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_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/SnapKit/SnapKit-Info.plist b/Pods/Target Support Files/SnapKit/SnapKit-Info.plist new file mode 100644 index 0000000..8b4dc1d --- /dev/null +++ b/Pods/Target Support Files/SnapKit/SnapKit-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + ${PODS_DEVELOPMENT_LANGUAGE} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 5.6.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/SnapKit/SnapKit-dummy.m b/Pods/Target Support Files/SnapKit/SnapKit-dummy.m new file mode 100644 index 0000000..b44e8e5 --- /dev/null +++ b/Pods/Target Support Files/SnapKit/SnapKit-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_SnapKit : NSObject +@end +@implementation PodsDummy_SnapKit +@end diff --git a/Pods/Target Support Files/SnapKit/SnapKit-prefix.pch b/Pods/Target Support Files/SnapKit/SnapKit-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Pods/Target Support Files/SnapKit/SnapKit-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Pods/Target Support Files/SnapKit/SnapKit-umbrella.h b/Pods/Target Support Files/SnapKit/SnapKit-umbrella.h new file mode 100644 index 0000000..1b1be64 --- /dev/null +++ b/Pods/Target Support Files/SnapKit/SnapKit-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double SnapKitVersionNumber; +FOUNDATION_EXPORT const unsigned char SnapKitVersionString[]; + diff --git a/Pods/Target Support Files/SnapKit/SnapKit.debug.xcconfig b/Pods/Target Support Files/SnapKit/SnapKit.debug.xcconfig new file mode 100644 index 0000000..3aab1a8 --- /dev/null +++ b/Pods/Target Support Files/SnapKit/SnapKit.debug.xcconfig @@ -0,0 +1,14 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapKit +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/SnapKit +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/SnapKit/SnapKit.modulemap b/Pods/Target Support Files/SnapKit/SnapKit.modulemap new file mode 100644 index 0000000..4b3e47b --- /dev/null +++ b/Pods/Target Support Files/SnapKit/SnapKit.modulemap @@ -0,0 +1,6 @@ +framework module SnapKit { + umbrella header "SnapKit-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/SnapKit/SnapKit.release.xcconfig b/Pods/Target Support Files/SnapKit/SnapKit.release.xcconfig new file mode 100644 index 0000000..3aab1a8 --- /dev/null +++ b/Pods/Target Support Files/SnapKit/SnapKit.release.xcconfig @@ -0,0 +1,14 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapKit +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/SnapKit +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/iOS_Study_A.xcodeproj/project.pbxproj b/iOS_Study_A.xcodeproj/project.pbxproj index 1f5c336..ac5f54e 100644 --- a/iOS_Study_A.xcodeproj/project.pbxproj +++ b/iOS_Study_A.xcodeproj/project.pbxproj @@ -7,23 +7,34 @@ objects = { /* Begin PBXBuildFile section */ + 33627957C254F517880EC15C /* Pods_iOS_Study_A.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F42EEE11B7266A0476078A3C /* Pods_iOS_Study_A.framework */; }; 954B6B612AC57BE100FDCFAB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 954B6B602AC57BE100FDCFAB /* AppDelegate.swift */; }; 954B6B632AC57BE100FDCFAB /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 954B6B622AC57BE100FDCFAB /* SceneDelegate.swift */; }; 954B6B652AC57BE100FDCFAB /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 954B6B642AC57BE100FDCFAB /* ViewController.swift */; }; - 954B6B682AC57BE100FDCFAB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 954B6B662AC57BE100FDCFAB /* Main.storyboard */; }; 954B6B6A2AC57BE200FDCFAB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 954B6B692AC57BE200FDCFAB /* Assets.xcassets */; }; 954B6B6D2AC57BE200FDCFAB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 954B6B6B2AC57BE200FDCFAB /* LaunchScreen.storyboard */; }; + DFB412B42AF9334000DA60B7 /* SecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFB412B32AF9334000DA60B7 /* SecondViewController.swift */; }; + DFF6FFDA2AF2A30E004B6374 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = DFF6FFD92AF2A30E004B6374 /* GoogleService-Info.plist */; }; + DFF6FFDD2AF2A40B004B6374 /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = DFF6FFDC2AF2A40B004B6374 /* FirebaseAnalytics */; }; + DFF6FFDF2AF2A40B004B6374 /* FirebaseAuth in Frameworks */ = {isa = PBXBuildFile; productRef = DFF6FFDE2AF2A40B004B6374 /* FirebaseAuth */; }; + DFF6FFE12AF2A40B004B6374 /* FirebaseDatabase in Frameworks */ = {isa = PBXBuildFile; productRef = DFF6FFE02AF2A40B004B6374 /* FirebaseDatabase */; }; + DFF6FFE32AF2A40B004B6374 /* FirebaseFirestore in Frameworks */ = {isa = PBXBuildFile; productRef = DFF6FFE22AF2A40B004B6374 /* FirebaseFirestore */; }; + DFF6FFE52AF2A40B004B6374 /* FirebaseStorage in Frameworks */ = {isa = PBXBuildFile; productRef = DFF6FFE42AF2A40B004B6374 /* FirebaseStorage */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 48A4BE12E2CAA76380E75709 /* Pods-iOS_Study_A.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iOS_Study_A.release.xcconfig"; path = "Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A.release.xcconfig"; sourceTree = ""; }; 954B6B5D2AC57BE100FDCFAB /* iOS_Study_A.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOS_Study_A.app; sourceTree = BUILT_PRODUCTS_DIR; }; 954B6B602AC57BE100FDCFAB /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 954B6B622AC57BE100FDCFAB /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 954B6B642AC57BE100FDCFAB /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 954B6B672AC57BE100FDCFAB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 954B6B692AC57BE200FDCFAB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 954B6B6C2AC57BE200FDCFAB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 954B6B6E2AC57BE200FDCFAB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DFB412B32AF9334000DA60B7 /* SecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondViewController.swift; sourceTree = ""; }; + DFF6FFD92AF2A30E004B6374 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../../Downloads/GoogleService-Info.plist"; sourceTree = ""; }; + F2D4D28A6BE109C31A8CD379 /* Pods-iOS_Study_A.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iOS_Study_A.debug.xcconfig"; path = "Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A.debug.xcconfig"; sourceTree = ""; }; + F42EEE11B7266A0476078A3C /* Pods_iOS_Study_A.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iOS_Study_A.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -31,17 +42,33 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + DFF6FFDD2AF2A40B004B6374 /* FirebaseAnalytics in Frameworks */, + DFF6FFDF2AF2A40B004B6374 /* FirebaseAuth in Frameworks */, + DFF6FFE12AF2A40B004B6374 /* FirebaseDatabase in Frameworks */, + DFF6FFE32AF2A40B004B6374 /* FirebaseFirestore in Frameworks */, + 33627957C254F517880EC15C /* Pods_iOS_Study_A.framework in Frameworks */, + DFF6FFE52AF2A40B004B6374 /* FirebaseStorage in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 57F5414A64ED2F719F836680 /* Frameworks */ = { + isa = PBXGroup; + children = ( + F42EEE11B7266A0476078A3C /* Pods_iOS_Study_A.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 954B6B542AC57BE100FDCFAB = { isa = PBXGroup; children = ( 954B6B5F2AC57BE100FDCFAB /* iOS_Study_A */, 954B6B5E2AC57BE100FDCFAB /* Products */, + F9483701C2F9E405C05A0E44 /* Pods */, + 57F5414A64ED2F719F836680 /* Frameworks */, ); sourceTree = ""; }; @@ -59,14 +86,24 @@ 954B6B602AC57BE100FDCFAB /* AppDelegate.swift */, 954B6B622AC57BE100FDCFAB /* SceneDelegate.swift */, 954B6B642AC57BE100FDCFAB /* ViewController.swift */, - 954B6B662AC57BE100FDCFAB /* Main.storyboard */, + DFB412B32AF9334000DA60B7 /* SecondViewController.swift */, 954B6B692AC57BE200FDCFAB /* Assets.xcassets */, 954B6B6B2AC57BE200FDCFAB /* LaunchScreen.storyboard */, 954B6B6E2AC57BE200FDCFAB /* Info.plist */, + DFF6FFD92AF2A30E004B6374 /* GoogleService-Info.plist */, ); path = iOS_Study_A; sourceTree = ""; }; + F9483701C2F9E405C05A0E44 /* Pods */ = { + isa = PBXGroup; + children = ( + F2D4D28A6BE109C31A8CD379 /* Pods-iOS_Study_A.debug.xcconfig */, + 48A4BE12E2CAA76380E75709 /* Pods-iOS_Study_A.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -74,15 +111,24 @@ isa = PBXNativeTarget; buildConfigurationList = 954B6B712AC57BE200FDCFAB /* Build configuration list for PBXNativeTarget "iOS_Study_A" */; buildPhases = ( + 214F92FBCDB50F87B0C05A1D /* [CP] Check Pods Manifest.lock */, 954B6B592AC57BE100FDCFAB /* Sources */, 954B6B5A2AC57BE100FDCFAB /* Frameworks */, 954B6B5B2AC57BE100FDCFAB /* Resources */, + F0FE6FBC7924A9F0537B1D25 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( ); name = iOS_Study_A; + packageProductDependencies = ( + DFF6FFDC2AF2A40B004B6374 /* FirebaseAnalytics */, + DFF6FFDE2AF2A40B004B6374 /* FirebaseAuth */, + DFF6FFE02AF2A40B004B6374 /* FirebaseDatabase */, + DFF6FFE22AF2A40B004B6374 /* FirebaseFirestore */, + DFF6FFE42AF2A40B004B6374 /* FirebaseStorage */, + ); productName = iOS_Study_A; productReference = 954B6B5D2AC57BE100FDCFAB /* iOS_Study_A.app */; productType = "com.apple.product-type.application"; @@ -111,6 +157,9 @@ Base, ); mainGroup = 954B6B542AC57BE100FDCFAB; + packageReferences = ( + DFF6FFDB2AF2A40B004B6374 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, + ); productRefGroup = 954B6B5E2AC57BE100FDCFAB /* Products */; projectDirPath = ""; projectRoot = ""; @@ -127,17 +176,60 @@ files = ( 954B6B6D2AC57BE200FDCFAB /* LaunchScreen.storyboard in Resources */, 954B6B6A2AC57BE200FDCFAB /* Assets.xcassets in Resources */, - 954B6B682AC57BE100FDCFAB /* Main.storyboard in Resources */, + DFF6FFDA2AF2A30E004B6374 /* GoogleService-Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 214F92FBCDB50F87B0C05A1D /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-iOS_Study_A-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + F0FE6FBC7924A9F0537B1D25 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iOS_Study_A/Pods-iOS_Study_A-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 954B6B592AC57BE100FDCFAB /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + DFB412B42AF9334000DA60B7 /* SecondViewController.swift in Sources */, 954B6B652AC57BE100FDCFAB /* ViewController.swift in Sources */, 954B6B612AC57BE100FDCFAB /* AppDelegate.swift in Sources */, 954B6B632AC57BE100FDCFAB /* SceneDelegate.swift in Sources */, @@ -147,14 +239,6 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ - 954B6B662AC57BE100FDCFAB /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 954B6B672AC57BE100FDCFAB /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; 954B6B6B2AC57BE200FDCFAB /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( @@ -282,6 +366,7 @@ }; 954B6B722AC57BE200FDCFAB /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = F2D4D28A6BE109C31A8CD379 /* Pods-iOS_Study_A.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -291,7 +376,6 @@ INFOPLIST_FILE = iOS_Study_A/Info.plist; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; - INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; LD_RUNPATH_SEARCH_PATHS = ( @@ -309,6 +393,7 @@ }; 954B6B732AC57BE200FDCFAB /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 48A4BE12E2CAA76380E75709 /* Pods-iOS_Study_A.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -318,7 +403,6 @@ INFOPLIST_FILE = iOS_Study_A/Info.plist; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; - INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; LD_RUNPATH_SEARCH_PATHS = ( @@ -356,6 +440,45 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + DFF6FFDB2AF2A40B004B6374 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/firebase/firebase-ios-sdk"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 10.0.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + DFF6FFDC2AF2A40B004B6374 /* FirebaseAnalytics */ = { + isa = XCSwiftPackageProductDependency; + package = DFF6FFDB2AF2A40B004B6374 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseAnalytics; + }; + DFF6FFDE2AF2A40B004B6374 /* FirebaseAuth */ = { + isa = XCSwiftPackageProductDependency; + package = DFF6FFDB2AF2A40B004B6374 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseAuth; + }; + DFF6FFE02AF2A40B004B6374 /* FirebaseDatabase */ = { + isa = XCSwiftPackageProductDependency; + package = DFF6FFDB2AF2A40B004B6374 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseDatabase; + }; + DFF6FFE22AF2A40B004B6374 /* FirebaseFirestore */ = { + isa = XCSwiftPackageProductDependency; + package = DFF6FFDB2AF2A40B004B6374 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseFirestore; + }; + DFF6FFE42AF2A40B004B6374 /* FirebaseStorage */ = { + isa = XCSwiftPackageProductDependency; + package = DFF6FFDB2AF2A40B004B6374 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseStorage; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 954B6B552AC57BE100FDCFAB /* Project object */; } diff --git a/iOS_Study_A.xcworkspace/contents.xcworkspacedata b/iOS_Study_A.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..48b8894 --- /dev/null +++ b/iOS_Study_A.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/iOS_Study_A.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/iOS_Study_A.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/iOS_Study_A.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/iOS_Study_A.xcworkspace/xcshareddata/swiftpm/Package.resolved b/iOS_Study_A.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..8679bdf --- /dev/null +++ b/iOS_Study_A.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,113 @@ +{ + "pins" : [ + { + "identity" : "abseil-cpp-binary", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/abseil-cpp-binary.git", + "state" : { + "revision" : "bfc0b6f81adc06ce5121eb23f628473638d67c5c", + "version" : "1.2022062300.0" + } + }, + { + "identity" : "firebase-ios-sdk", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/firebase-ios-sdk", + "state" : { + "revision" : "8872dbd7d947acf757abab933da10e83c1842280", + "version" : "10.17.0" + } + }, + { + "identity" : "googleappmeasurement", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleAppMeasurement.git", + "state" : { + "revision" : "6b332152355c372ace9966d8ee76ed191f97025e", + "version" : "10.17.0" + } + }, + { + "identity" : "googledatatransport", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleDataTransport.git", + "state" : { + "revision" : "aae45a320fd0d11811820335b1eabc8753902a40", + "version" : "9.2.5" + } + }, + { + "identity" : "googleutilities", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleUtilities.git", + "state" : { + "revision" : "1cd556b33550982ec17f80e358253d905e756f0f", + "version" : "7.11.6" + } + }, + { + "identity" : "grpc-binary", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/grpc-binary.git", + "state" : { + "revision" : "a673bc2937fbe886dd1f99c401b01b6d977a9c98", + "version" : "1.49.1" + } + }, + { + "identity" : "gtm-session-fetcher", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/gtm-session-fetcher.git", + "state" : { + "revision" : "d415594121c9e8a4f9d79cecee0965cf35e74dbd", + "version" : "3.1.1" + } + }, + { + "identity" : "interop-ios-for-google-sdks", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/interop-ios-for-google-sdks.git", + "state" : { + "revision" : "2d12673670417654f08f5f90fdd62926dc3a2648", + "version" : "100.0.0" + } + }, + { + "identity" : "leveldb", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/leveldb.git", + "state" : { + "revision" : "0706abcc6b0bd9cedfbb015ba840e4a780b5159b", + "version" : "1.22.2" + } + }, + { + "identity" : "nanopb", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/nanopb.git", + "state" : { + "revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692", + "version" : "2.30909.0" + } + }, + { + "identity" : "promises", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/promises.git", + "state" : { + "revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e", + "version" : "2.3.1" + } + }, + { + "identity" : "swift-protobuf", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-protobuf.git", + "state" : { + "revision" : "07f7f26ded8df9645c072f220378879c4642e063", + "version" : "1.25.1" + } + } + ], + "version" : 2 +} diff --git a/iOS_Study_A/AppDelegate.swift b/iOS_Study_A/AppDelegate.swift index a37563b..b66de29 100644 --- a/iOS_Study_A/AppDelegate.swift +++ b/iOS_Study_A/AppDelegate.swift @@ -6,16 +6,25 @@ // import UIKit +import FirebaseCore + @main class AppDelegate: UIResponder, UIApplicationDelegate { + var window: UIWindow? - + func application(_ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: + [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + FirebaseApp.configure() + return true + } +/* func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true - } + }*/ // MARK: UISceneSession Lifecycle diff --git a/iOS_Study_A/Base.lproj/Main.storyboard b/iOS_Study_A/Base.lproj/Main.storyboard deleted file mode 100644 index 25a7638..0000000 --- a/iOS_Study_A/Base.lproj/Main.storyboard +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iOS_Study_A/Info.plist b/iOS_Study_A/Info.plist index dd3c9af..0eb786d 100644 --- a/iOS_Study_A/Info.plist +++ b/iOS_Study_A/Info.plist @@ -15,8 +15,6 @@ Default Configuration UISceneDelegateClassName $(PRODUCT_MODULE_NAME).SceneDelegate - UISceneStoryboardFile - Main diff --git a/iOS_Study_A/SceneDelegate.swift b/iOS_Study_A/SceneDelegate.swift index aaf78de..13366dd 100644 --- a/iOS_Study_A/SceneDelegate.swift +++ b/iOS_Study_A/SceneDelegate.swift @@ -16,7 +16,12 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). - guard let _ = (scene as? UIWindowScene) else { return } + guard let windowScene = (scene as? UIWindowScene) else { return } + window = UIWindow(windowScene: windowScene) + let mainViewController = ViewController() + + window?.rootViewController = mainViewController + window?.makeKeyAndVisible() } func sceneDidDisconnect(_ scene: UIScene) { diff --git a/iOS_Study_A/SecondViewController.swift b/iOS_Study_A/SecondViewController.swift new file mode 100644 index 0000000..0842650 --- /dev/null +++ b/iOS_Study_A/SecondViewController.swift @@ -0,0 +1,89 @@ +// +// SecondViewController.swift +// iOS_Study_A +// +// Created by 박현수 on 2023/11/06. +// + +import UIKit +import SnapKit +import Firebase +import FirebaseCore +import FirebaseFirestore +import FirebaseAuth + +class SecondViewController: UIViewController { + + var handle: AuthStateDidChangeListenerHandle? + + let loginSuccessedLabel: UILabel = { + let label = UILabel() + label.text = "로그인 성공" + return label + }() + + let logOutButton: UIButton = { + let button = UIButton() + button.setTitle("로그아웃", for: .normal) + button.backgroundColor = .systemBlue + return button + }() + + @objc func logOutButtonTapped() { + let firebaseAuth = Auth.auth() + do { + try firebaseAuth.signOut() + let defaults = UserDefaults.standard + defaults.set(false, forKey: "isAutoLogin") + dismiss(animated: true, completion: nil) + } + catch let signOutError as NSError { + print("Error signing out: %@", signOutError) + } + } + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .white + + view.addSubview(loginSuccessedLabel) + loginSuccessedLabel.snp.makeConstraints { make in + make.width.height.equalTo(200) + make.center.equalToSuperview() + } + + self.view.addSubview(logOutButton) + logOutButton.snp.makeConstraints { (make) -> Void in + make.width.equalTo(100) + make.height.equalTo(50) + make.trailing.equalTo(-10) + make.bottomMargin.equalToSuperview().inset(10) + } + logOutButton.titleLabel?.font = UIFont.systemFont(ofSize: 16) + logOutButton.addTarget(self, action: #selector(logOutButtonTapped), for: .touchUpInside) + } + + override func viewWillAppear(_ animated: Bool) { + handle = Auth.auth().addStateDidChangeListener { auth, user in + + } + } + + override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) + // [START remove_auth_listener] + Auth.auth().removeStateDidChangeListener(handle!) + // [END remove_auth_listener] + } + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/iOS_Study_A/ViewController.swift b/iOS_Study_A/ViewController.swift index 0804a27..871d656 100644 --- a/iOS_Study_A/ViewController.swift +++ b/iOS_Study_A/ViewController.swift @@ -6,14 +6,163 @@ // import UIKit +import SnapKit +import Firebase +import FirebaseCore +import FirebaseFirestore +import FirebaseAuth class ViewController: UIViewController { + var handle: AuthStateDidChangeListenerHandle? + + + let signInButton: UIButton = { + let button = UIButton() + button.setTitle("로그인", for: .normal) + button.backgroundColor = .blue + return button + }() + + let signUpButton: UIButton = { + let button = UIButton() + button.setTitle("회원가입", for: .normal) + button.backgroundColor = .systemBlue + return button + }() + + let timeLabel: UILabel = { + let label = UILabel() + label.text = "Welcome" + label.font = UIFont.systemFont(ofSize: 20) + label.textAlignment = .center + label.textColor = .blue + return label + }() + + let idTextView: UITextView = { + let idText = UITextView() + idText.text = "ID를 입력하세요" + idText.backgroundColor = .white + return idText + }() + + let pwTextView: UITextView = { + let pwText = UITextView() + pwText.text = "비밀번호를 입력하세요" + pwText.backgroundColor = .white + return pwText + }() + + @objc func signUpButtonTapped() { + Auth.auth().createUser(withEmail: idTextView.text, password: pwTextView.text) { authResult, error in + guard let user = authResult?.user, error == nil else { + print(error!.localizedDescription) + self.timeLabel.text = "\(error?.localizedDescription ?? "signup failed")" + return + } + print("\(user.email!) created") + self.timeLabel.text = "\(user.email!) created" + } + } + + @objc func signInButtonTapped() { + Auth.auth().signIn(withEmail: idTextView.text, password: pwTextView.text) { [weak self] authResult, error in + guard let strongSelf = self else { return } + if let error = error { + print("\(error.localizedDescription)") + strongSelf.timeLabel.text = "\(error.localizedDescription)" + } + else { + let defaults = UserDefaults.standard + defaults.set(true, forKey: "isAutoLogin") + let secondViewController = SecondViewController() + secondViewController.modalPresentationStyle = UIModalPresentationStyle.fullScreen + strongSelf.present(secondViewController, animated: true, completion: nil) + print("\(strongSelf.idTextView.text ?? "nil") login Successed") + } + } + } + + @objc func autoLogin() { + let secondViewController = SecondViewController() + secondViewController.modalPresentationStyle = UIModalPresentationStyle.fullScreen + self.present(secondViewController, animated: true, completion: nil) + print("\(self.idTextView.text ?? "nil") login Successed") + } + override func viewDidLoad() { super.viewDidLoad() - // Do any additional setup after loading the view. + + view.backgroundColor = .systemGray6 + + view.addSubview(timeLabel) + timeLabel.snp.makeConstraints { make in + make.height.equalTo(50) + make.left.right.equalToSuperview().inset(50) + make.top.equalToSuperview().inset(100) + } + + view.addSubview(idTextView) + idTextView.snp.makeConstraints { make in + make.height.equalTo(50) + make.bottom.equalToSuperview().inset(180) + make.left.right.equalToSuperview().inset(50) + } + + self.view.addSubview(signInButton) + signInButton.snp.makeConstraints { (make) -> Void in + make.width.equalTo(100) + make.height.equalTo(50) + make.trailing.equalTo(-50) + make.top.equalTo(idTextView.snp.top).offset(-60) + } + signInButton.titleLabel?.font = UIFont.systemFont(ofSize: 16) + signInButton.addTarget(self, action: #selector(signInButtonTapped), for: .touchUpInside) + + self.view.addSubview(signUpButton) + signUpButton.snp.makeConstraints { (make) -> Void in + make.width.equalTo(100) + make.height.equalTo(50) + make.trailing.equalTo(-160) + make.top.equalTo(idTextView.snp.top).offset(-60) + } + signUpButton.titleLabel?.font = UIFont.systemFont(ofSize: 16) + signUpButton.addTarget(self, action: #selector(signUpButtonTapped), for: .touchUpInside) + + view.addSubview(pwTextView) + pwTextView.snp.makeConstraints { make in + make.height.equalTo(50) + make.bottom.equalToSuperview().inset(100) + make.left.right.equalToSuperview().inset(50) + } + } - - + + override func viewWillAppear(_ animated: Bool) { + handle = Auth.auth().addStateDidChangeListener { auth, user in + + } + } + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + let defaults = UserDefaults.standard + if let object = defaults.object(forKey: "isAutoLogin") as? Bool, object{ + autoLogin() + print("\(self.idTextView.text ?? "nil") login Successed") + print("자동 로그인 \(object)") + } else { + print("자동 로그인 값 없음") + } + } + + override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) + // [START remove_auth_listener] + Auth.auth().removeStateDidChangeListener(handle!) + // [END remove_auth_listener] + } } +