diff --git a/.gitignore b/.gitignore index 421ae0b..1034bdd 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,5 @@ fastlane/test_output # https://github.com/johnno1962/injectionforxcode iOSInjectionProject/ + +.DS_Store diff --git a/Example/Podfile b/Example/Podfile new file mode 100644 index 0000000..3667e55 --- /dev/null +++ b/Example/Podfile @@ -0,0 +1,12 @@ +use_frameworks! + +platform :ios, '10.0' + +target 'RHViewStateKit_Example' do + pod 'RHViewStateKit', :path => '../' + + target 'RHViewStateKit_Tests' do + inherit! :search_paths + + end +end diff --git a/Example/Podfile.lock b/Example/Podfile.lock new file mode 100644 index 0000000..e302f26 --- /dev/null +++ b/Example/Podfile.lock @@ -0,0 +1,23 @@ +PODS: + - RHViewStateKit (1.0.0): + - SnapKit (= 5.0.1) + - SnapKit (5.0.1) + +DEPENDENCIES: + - RHViewStateKit (from `../`) + +SPEC REPOS: + trunk: + - SnapKit + +EXTERNAL SOURCES: + RHViewStateKit: + :path: "../" + +SPEC CHECKSUMS: + RHViewStateKit: eed7cf528a3798781d4f08022485071650e9edbc + SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb + +PODFILE CHECKSUM: 79ccd6c3760d3225684279bbe90e94d07d721d79 + +COCOAPODS: 1.10.2 diff --git a/Example/Pods/Local Podspecs/RHViewStateKit.podspec.json b/Example/Pods/Local Podspecs/RHViewStateKit.podspec.json new file mode 100644 index 0000000..41fcfe5 --- /dev/null +++ b/Example/Pods/Local Podspecs/RHViewStateKit.podspec.json @@ -0,0 +1,30 @@ +{ + "name": "RHViewStateKit", + "version": "1.0.0", + "summary": "RHViewState provides fully customizable configuration to change state in your view", + "platforms": { + "ios": "10.0" + }, + "swift_versions": "5.1", + "requires_arc": true, + "homepage": "https://github.com/bagusandinata/RHViewStateKit", + "license": { + "type": "MIT", + "file": "LICENSE" + }, + "authors": { + "bagusandinata": "bagusandinata@icloud.com" + }, + "source": { + "git": "https://github.com/bagusandinata/RHViewStateKit.git", + "tag": "1.0.0" + }, + "frameworks": "UIKit", + "source_files": "Source/*.swift", + "dependencies": { + "SnapKit": [ + "5.0.1" + ] + }, + "swift_version": "5.1" +} diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock new file mode 100644 index 0000000..e302f26 --- /dev/null +++ b/Example/Pods/Manifest.lock @@ -0,0 +1,23 @@ +PODS: + - RHViewStateKit (1.0.0): + - SnapKit (= 5.0.1) + - SnapKit (5.0.1) + +DEPENDENCIES: + - RHViewStateKit (from `../`) + +SPEC REPOS: + trunk: + - SnapKit + +EXTERNAL SOURCES: + RHViewStateKit: + :path: "../" + +SPEC CHECKSUMS: + RHViewStateKit: eed7cf528a3798781d4f08022485071650e9edbc + SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb + +PODFILE CHECKSUM: 79ccd6c3760d3225684279bbe90e94d07d721d79 + +COCOAPODS: 1.10.2 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..b19e6c8 --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,1187 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0125CC4A36C88A722195CAC1294D1ABA /* RHViewConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 748C914FBE486E1A47C4CE01A66F51FA /* RHViewConfiguration.swift */; }; + 0182A3D3332AECD72450D3CD2519B5D4 /* ConstraintOffsetTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B200BD964F52F6693D4168248B8645 /* ConstraintOffsetTarget.swift */; }; + 048476C42E91460983E98D2E5617E237 /* ConstraintRelatableTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2975CA5A0D26BC84F3EE9912FEBDA795 /* ConstraintRelatableTarget.swift */; }; + 05380B582C925162ED673B4D2240E8E3 /* RHLoadingConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C8BB3DA246D13B0F4E32A0F5ADE5F6 /* RHLoadingConfiguration.swift */; }; + 054008EEFE72D6DF7C28842F474B04C7 /* RHImageConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0058394C54F3353D969F8FD6F66AB331 /* RHImageConfiguration.swift */; }; + 0C4763B98C866C2D0B40AC4C5A330EA1 /* RHViewState+Delegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55415A3B206F4C09FBD6F414F7CD3B8B /* RHViewState+Delegate.swift */; }; + 14CA5DDBDE92C4ADA3416241DC0BE669 /* UIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F62D8A0C11B68CD054C554239D53E834 /* UIView.swift */; }; + 16FF6723D82F05282A66F2DB037DE5B9 /* RHViewStateKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F69EF54B337C3AAF3FE524441CDCEFA /* RHViewStateKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 17806A6544F7D9AB041FC8878E3F83C0 /* RHViewCollectionState.swift in Sources */ = {isa = PBXBuildFile; fileRef = A31DC412B1ABF37E535AE5557D57CA30 /* RHViewCollectionState.swift */; }; + 1873B75811C92AF916A0EBE5B6B614FB /* ConstraintDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AE00ECC24C5CC6DC938204FF42AD0E5 /* ConstraintDSL.swift */; }; + 1CFFE7B57D171C9297B0C3BA184F87DF /* RHViewStateKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 94201BA35465AC641AD89232885C0C2C /* RHViewStateKit-dummy.m */; }; + 2911B5E55A59E62DADF4196FE31F2E15 /* ConstraintMultiplierTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7AB9BB47A2175181386A432C07253AE /* ConstraintMultiplierTarget.swift */; }; + 2C9FAE3A220BCFC61144CBD8A68A73C5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32F16DF945CE73ECA0F797633B716F8E /* Foundation.framework */; }; + 2CD1A09C4434EB01D666B846BBEEFE27 /* UILayoutSupport+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A9341666EAC154422A032092A7DC2D7 /* UILayoutSupport+Extensions.swift */; }; + 313DAB871B76CD9484357B2F70625FD3 /* Pods-RHViewStateKit_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 60734E71DA41D5E53B1C0AA824A4149B /* Pods-RHViewStateKit_Example-dummy.m */; }; + 314F8B113A098B93758591CD23FCFE93 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32F16DF945CE73ECA0F797633B716F8E /* Foundation.framework */; }; + 3AAF5D454CC438D3F6442B36BCE67A0D /* ConstraintDirectionalInsets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91164BE769DA144776663FBF46785561 /* ConstraintDirectionalInsets.swift */; }; + 43B9A7628E8D57AC5728E583EC9D7E77 /* ConstraintLayoutSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D705690D879064ED84970813189D8D4 /* ConstraintLayoutSupport.swift */; }; + 4863A04B9B3AF213D590F9C8A3990A98 /* RHViewState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C796ECCFF8AF7939F2F7687FBC0BAA5 /* RHViewState.swift */; }; + 489F385459C6CDF8A53E93D785A9C3BA /* ConstraintItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 474AFC560A8B414B467174737DBC891A /* ConstraintItem.swift */; }; + 4CA57276E1AD9F27CE1660F631D8218D /* ConstraintViewDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56006AA49A060CA2830F32CD6F394823 /* ConstraintViewDSL.swift */; }; + 4E46F03A3985E8646BAC8FA51AF546DB /* LayoutConstraintItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 464C01543F3BCEDEE51ABAA696513D0B /* LayoutConstraintItem.swift */; }; + 540AD42C93798F743FA7EF2881877D43 /* ConstraintMakerRelatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 724FB64349F5678CE1709979CF0DD952 /* ConstraintMakerRelatable.swift */; }; + 54B18A94EE7F59F613DB11D2A98D1F56 /* RHButtonConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EEF9CF5165C61D936F4DB137EF85986 /* RHButtonConfiguration.swift */; }; + 64CE3ED663B1EF2CA8E12C6326AC9909 /* ConstraintLayoutSupportDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4A46A8054577838D49C60142EB88B13 /* ConstraintLayoutSupportDSL.swift */; }; + 6DFBEB88A23C4553463143476A083F80 /* Pods-RHViewStateKit_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E95BAA563DC916B26122950FEC3F7BC /* Pods-RHViewStateKit_Tests-dummy.m */; }; + 6FB7C9FEF88C2D9406614FF2ACC19F47 /* ConstraintMakerFinalizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11D02329E74D733C03BF6BAE1F564481 /* ConstraintMakerFinalizable.swift */; }; + 7546B906779A55EB7B82617393AE43A3 /* ConstraintMaker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 141BC33167429B9926FB24A17F01568C /* ConstraintMaker.swift */; }; + 76C6FE4EDB163E175683FB44CD91F3FF /* ConstraintConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 250E41DBB680A3A2ECDDD2210311B230 /* ConstraintConfig.swift */; }; + 8709D68FA43D6B4008965506611AA691 /* UILabel+TextWidth.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1E70FFBD40E32D0776A2B14D315224A /* UILabel+TextWidth.swift */; }; + 877CE1770557AE22021A18D7960FC687 /* ConstraintLayoutGuideDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE0BE9F3D55FDB29EF516F6D6B1B6BCA /* ConstraintLayoutGuideDSL.swift */; }; + 882EF84C07F7C6DCBB979DBBC0B95318 /* ConstraintInsetTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C2EC377264B25FB0E67D150E37E87CD /* ConstraintInsetTarget.swift */; }; + 8EACD59A411198654AB3137C39020746 /* Pods-RHViewStateKit_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A2C423093FE675FDD0950DFB01BCD2F2 /* Pods-RHViewStateKit_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9176D1AA04DC8AEEFABCA02A5929486B /* ConstraintDescription.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB1D9F6F4E2364DFAF158E04AF5D5EAA /* ConstraintDescription.swift */; }; + 92A39A4A1A1094F27490A2329E516C35 /* ConstraintView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE9055CEA7890517265589BD23D73A49 /* ConstraintView+Extensions.swift */; }; + 955E9AF5A23E0AE21A29C2790C796887 /* RHTitleConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 619FB6A9D2B28D69A10E666BE37AE15A /* RHTitleConfiguration.swift */; }; + 9A36BD532F50F622C6C5C096012BF8ED /* ConstraintInsets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 549471CD1FE3A1E1865DD172864918D3 /* ConstraintInsets.swift */; }; + 9D914D41A2364388B45C0EC205FCA83C /* Constraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50380F281EC3EE769C85035CCEA77226 /* Constraint.swift */; }; + A730F94A306FD7FE5454A01FB9E2D4F4 /* ConstraintPriorityTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9716AD15FADF38A93170E034F2BCE457 /* ConstraintPriorityTarget.swift */; }; + A736787C0AA7CE424CA7AECB4726FD8E /* ConstraintLayoutGuide.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66C5188AE61F0E667CD9E7ED28CDD61C /* ConstraintLayoutGuide.swift */; }; + A7EC12C6FE05F8B396D55796A2C44F7C /* Pods-RHViewStateKit_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 72B50A29067CDBEFDCB6E3E74760F532 /* Pods-RHViewStateKit_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A9D5250A15EA7B51823B720058D072DF /* SnapKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E13B89FFD81AACB7530769CA05EEA26B /* SnapKit-dummy.m */; }; + B1ED1778FF7D6EA788CB4E022810495E /* ConstraintAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13F460233F2A555D41511B6CCA66A124 /* ConstraintAttributes.swift */; }; + B5F72555E9AA8E1B0A1052E57C969926 /* RHDefaultViewState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 587A36FD57FBA1629BDB9367EB798F91 /* RHDefaultViewState.swift */; }; + C8735DA80CAE830D735393898B823B66 /* SnapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E769393FE2F7DCF3E342575F5DF05239 /* SnapKit.framework */; }; + CBDDE864F6D788222535101C83A141FC /* RHViewStateAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC929EC9D87C41C243058C7C12C1FF36 /* RHViewStateAnimation.swift */; }; + CFD40566576A4DB6D7A213E0285C49D8 /* RHDescriptionConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31567371D500544DFA5DE399DB87CF9F /* RHDescriptionConfiguration.swift */; }; + D0C2F56F7A65B474FEB226048591C869 /* RHPositionConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C2CA9EAEC139DF3A81F37C56A891565 /* RHPositionConfiguration.swift */; }; + D1690E4933E7746E1710DF8872B50EB4 /* ConstraintDirectionalInsetTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7D358AA1606C7B2CDC8555485807E9E /* ConstraintDirectionalInsetTarget.swift */; }; + D25E2A7F5619AE67D685E70602D04C21 /* RHDefaultLoading.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED40681B2472449B7AA1E8BEBCD10F32 /* RHDefaultLoading.swift */; }; + D35A86882F758022DD86180677016754 /* ConstraintConstantTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D990E0FED5B41C1F13AC6B08208A99B /* ConstraintConstantTarget.swift */; }; + D6B20511EAFAEFFD03B738ECBC55163D /* Debugging.swift in Sources */ = {isa = PBXBuildFile; fileRef = D038D2FAA2F6B073D1B64B8635F4E3E6 /* Debugging.swift */; }; + D70A1ABC843258FBD8105076C89F405D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32F16DF945CE73ECA0F797633B716F8E /* Foundation.framework */; }; + DAE27DE0DF7F3F175C55D66E34646039 /* ConstraintPriority.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0BD95F32F2E57D6B9100B77B93F013C /* ConstraintPriority.swift */; }; + E134174E010FE7B40B6BD50C74795127 /* LayoutConstraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44C5B72775F6AF0891BF331F32FE10D /* LayoutConstraint.swift */; }; + E157DF5631B333E92BE502E0A544338B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32F16DF945CE73ECA0F797633B716F8E /* Foundation.framework */; }; + E410F63EE9984624FF764BA6478B6BC3 /* ConstraintMakerExtendable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E43F10DE451FED17810D9B5C237324A5 /* ConstraintMakerExtendable.swift */; }; + E52D44B70234F19F0C848051564EAEC3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68D1B94523097CAB40FE2A587B7A6A59 /* UIKit.framework */; }; + E69E0C50C869ABFCF113BCDCDE4A8C24 /* RHViewState+DataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9EA6F246E81793F97AE0FED302BA06B /* RHViewState+DataSource.swift */; }; + EE57C45C37F61AFD2D2CFE19FC407E19 /* ConstraintView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A51E99894F75F00A281BE6A32FBDE495 /* ConstraintView.swift */; }; + EF96A0D5F9D8AC912F2889F7760FEBD8 /* SnapKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0116B84A6773B75FCBFCB479E740F0F3 /* SnapKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F2BD33332FA939677BAA2C9B2A5950B3 /* Typealiases.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4E066869A95E00B949CBA4D2284C35F /* Typealiases.swift */; }; + F3C9E481FFCE3BA9F2A6A5F8661DF4FA /* ConstraintMakerEditable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2C3B0B200350EAC8F42EF635FF31BD1 /* ConstraintMakerEditable.swift */; }; + F75D0D91FA8334647234AF60068FA437 /* ConstraintMakerPriortizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91A53CAF547D71AEFABE49D91B4E6816 /* ConstraintMakerPriortizable.swift */; }; + FE307D1D14B7AA1267284B2491958C74 /* AssociationPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6CA820421B61B1A13D55C878D1DBEF7 /* AssociationPolicy.swift */; }; + FED90BB50DD5C4659C4D6AF0F2A6024C /* ConstraintRelation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25479F58B67AA43E092C7B156C1B5C1B /* ConstraintRelation.swift */; }; + FEEB86B35DAB9A5053B0F204D54B60CC /* ConstraintLayoutGuide+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09BF299D2EEB87E7DD02630E87B96224 /* ConstraintLayoutGuide+Extensions.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 3DE904DFDEE35DAC6F6805695F4D676E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 5A0EBD8A851EDA1AF01C039F2C3AC74B; + remoteInfo = RHViewStateKit; + }; + 5A1314872650690D2240510083BBDB5C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B91233CA26B0D65B291C2E8E7E65D5CD; + remoteInfo = "Pods-RHViewStateKit_Example"; + }; + BAA62A7733276590D7D0995A9860410C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 19622742EBA51E823D6DAE3F8CDBFAD4; + remoteInfo = SnapKit; + }; + E958F054CD16FC50B4D2ED463E56068C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 19622742EBA51E823D6DAE3F8CDBFAD4; + remoteInfo = SnapKit; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 0058394C54F3353D969F8FD6F66AB331 /* RHImageConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RHImageConfiguration.swift; path = Source/RHImageConfiguration.swift; sourceTree = ""; }; + 0116B84A6773B75FCBFCB479E740F0F3 /* SnapKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SnapKit-umbrella.h"; sourceTree = ""; }; + 024A9098B65CB3681496B4F0F0FF640D /* Pods_RHViewStateKit_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_RHViewStateKit_Example.framework; path = "Pods-RHViewStateKit_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 0344FE02A5F4DFC1B8FF99EF8C365F55 /* Pods-RHViewStateKit_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RHViewStateKit_Tests.debug.xcconfig"; sourceTree = ""; }; + 063DB8D843507981999BA078C21A4C98 /* Pods-RHViewStateKit_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-RHViewStateKit_Example-frameworks.sh"; sourceTree = ""; }; + 09BF299D2EEB87E7DD02630E87B96224 /* ConstraintLayoutGuide+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ConstraintLayoutGuide+Extensions.swift"; path = "Source/ConstraintLayoutGuide+Extensions.swift"; sourceTree = ""; }; + 11D02329E74D733C03BF6BAE1F564481 /* ConstraintMakerFinalizable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerFinalizable.swift; path = Source/ConstraintMakerFinalizable.swift; sourceTree = ""; }; + 12C627C9E916AFFD50374C4D271FD8A9 /* RHViewStateKit-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "RHViewStateKit-Info.plist"; sourceTree = ""; }; + 13F460233F2A555D41511B6CCA66A124 /* ConstraintAttributes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintAttributes.swift; path = Source/ConstraintAttributes.swift; sourceTree = ""; }; + 141BC33167429B9926FB24A17F01568C /* ConstraintMaker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMaker.swift; path = Source/ConstraintMaker.swift; sourceTree = ""; }; + 250E41DBB680A3A2ECDDD2210311B230 /* ConstraintConfig.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintConfig.swift; path = Source/ConstraintConfig.swift; sourceTree = ""; }; + 25479F58B67AA43E092C7B156C1B5C1B /* ConstraintRelation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintRelation.swift; path = Source/ConstraintRelation.swift; sourceTree = ""; }; + 27CBD46D0A9F8CF659DF3AC9FCADC329 /* Pods-RHViewStateKit_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-RHViewStateKit_Tests.modulemap"; sourceTree = ""; }; + 2975CA5A0D26BC84F3EE9912FEBDA795 /* ConstraintRelatableTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintRelatableTarget.swift; path = Source/ConstraintRelatableTarget.swift; sourceTree = ""; }; + 2C2CA9EAEC139DF3A81F37C56A891565 /* RHPositionConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RHPositionConfiguration.swift; path = Source/RHPositionConfiguration.swift; sourceTree = ""; }; + 3099CCCB5354B1F6EA7AC21898BD0C27 /* Pods-RHViewStateKit_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RHViewStateKit_Tests.release.xcconfig"; sourceTree = ""; }; + 314E4582A9D16E426518833C3665B560 /* Pods-RHViewStateKit_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RHViewStateKit_Example-Info.plist"; sourceTree = ""; }; + 31567371D500544DFA5DE399DB87CF9F /* RHDescriptionConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RHDescriptionConfiguration.swift; path = Source/RHDescriptionConfiguration.swift; sourceTree = ""; }; + 32F16DF945CE73ECA0F797633B716F8E /* 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; }; + 391A6F8B42D2CD885F8F3C4CE6859439 /* SnapKit-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "SnapKit-Info.plist"; sourceTree = ""; }; + 3C796ECCFF8AF7939F2F7687FBC0BAA5 /* RHViewState.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RHViewState.swift; path = Source/RHViewState.swift; sourceTree = ""; }; + 3D705690D879064ED84970813189D8D4 /* ConstraintLayoutSupport.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutSupport.swift; path = Source/ConstraintLayoutSupport.swift; sourceTree = ""; }; + 43C8BB3DA246D13B0F4E32A0F5ADE5F6 /* RHLoadingConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RHLoadingConfiguration.swift; path = Source/RHLoadingConfiguration.swift; sourceTree = ""; }; + 464C01543F3BCEDEE51ABAA696513D0B /* LayoutConstraintItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutConstraintItem.swift; path = Source/LayoutConstraintItem.swift; sourceTree = ""; }; + 474AFC560A8B414B467174737DBC891A /* ConstraintItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintItem.swift; path = Source/ConstraintItem.swift; sourceTree = ""; }; + 47B200BD964F52F6693D4168248B8645 /* ConstraintOffsetTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintOffsetTarget.swift; path = Source/ConstraintOffsetTarget.swift; sourceTree = ""; }; + 48800EF45B9EC6CDD220C068D73E66AB /* Pods-RHViewStateKit_Tests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RHViewStateKit_Tests-Info.plist"; sourceTree = ""; }; + 50380F281EC3EE769C85035CCEA77226 /* Constraint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Constraint.swift; path = Source/Constraint.swift; sourceTree = ""; }; + 50D146F8C095151C1E1DF0132EB9E966 /* Pods-RHViewStateKit_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-RHViewStateKit_Example-acknowledgements.markdown"; sourceTree = ""; }; + 51E1F8752DC2EFB827475BD2D7EBB708 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; + 549471CD1FE3A1E1865DD172864918D3 /* ConstraintInsets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintInsets.swift; path = Source/ConstraintInsets.swift; sourceTree = ""; }; + 54F0E810001428E73F71DD8E89EA5B97 /* RHViewStateKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = RHViewStateKit.modulemap; sourceTree = ""; }; + 55415A3B206F4C09FBD6F414F7CD3B8B /* RHViewState+Delegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "RHViewState+Delegate.swift"; path = "Source/RHViewState+Delegate.swift"; sourceTree = ""; }; + 56006AA49A060CA2830F32CD6F394823 /* ConstraintViewDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintViewDSL.swift; path = Source/ConstraintViewDSL.swift; sourceTree = ""; }; + 587A36FD57FBA1629BDB9367EB798F91 /* RHDefaultViewState.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RHDefaultViewState.swift; path = Source/RHDefaultViewState.swift; sourceTree = ""; }; + 5AB16C72997EA695133937C5D86E15AF /* RHViewStateKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RHViewStateKit-prefix.pch"; sourceTree = ""; }; + 60734E71DA41D5E53B1C0AA824A4149B /* Pods-RHViewStateKit_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-RHViewStateKit_Example-dummy.m"; sourceTree = ""; }; + 619FB6A9D2B28D69A10E666BE37AE15A /* RHTitleConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RHTitleConfiguration.swift; path = Source/RHTitleConfiguration.swift; sourceTree = ""; }; + 62E455378CC11AC4F7D6BF581DD8B785 /* Pods-RHViewStateKit_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-RHViewStateKit_Example.modulemap"; sourceTree = ""; }; + 63E4F78BDAFF490544268F9DEE1AA35A /* Pods-RHViewStateKit_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RHViewStateKit_Example.release.xcconfig"; sourceTree = ""; }; + 648E6697612356C99237FF6BF7B0B634 /* Pods-RHViewStateKit_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RHViewStateKit_Example-acknowledgements.plist"; sourceTree = ""; }; + 66C5188AE61F0E667CD9E7ED28CDD61C /* ConstraintLayoutGuide.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutGuide.swift; path = Source/ConstraintLayoutGuide.swift; sourceTree = ""; }; + 68D1B94523097CAB40FE2A587B7A6A59 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + 6A9341666EAC154422A032092A7DC2D7 /* UILayoutSupport+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UILayoutSupport+Extensions.swift"; path = "Source/UILayoutSupport+Extensions.swift"; sourceTree = ""; }; + 6D990E0FED5B41C1F13AC6B08208A99B /* ConstraintConstantTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintConstantTarget.swift; path = Source/ConstraintConstantTarget.swift; sourceTree = ""; }; + 6EEF9CF5165C61D936F4DB137EF85986 /* RHButtonConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RHButtonConfiguration.swift; path = Source/RHButtonConfiguration.swift; sourceTree = ""; }; + 724FB64349F5678CE1709979CF0DD952 /* ConstraintMakerRelatable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerRelatable.swift; path = Source/ConstraintMakerRelatable.swift; sourceTree = ""; }; + 72B50A29067CDBEFDCB6E3E74760F532 /* Pods-RHViewStateKit_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-RHViewStateKit_Example-umbrella.h"; sourceTree = ""; }; + 748C914FBE486E1A47C4CE01A66F51FA /* RHViewConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RHViewConfiguration.swift; path = Source/RHViewConfiguration.swift; sourceTree = ""; }; + 7889131C1139F96BBDA94CEE2E694763 /* SnapKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = SnapKit.modulemap; sourceTree = ""; }; + 7AE00ECC24C5CC6DC938204FF42AD0E5 /* ConstraintDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintDSL.swift; path = Source/ConstraintDSL.swift; sourceTree = ""; }; + 7C151ED993E980B7CEA7FFB748E926F7 /* RHViewStateKit.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = RHViewStateKit.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 7C21E0C93A1141A1E2EB51575500E27D /* SnapKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SnapKit.debug.xcconfig; sourceTree = ""; }; + 7C2EC377264B25FB0E67D150E37E87CD /* ConstraintInsetTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintInsetTarget.swift; path = Source/ConstraintInsetTarget.swift; sourceTree = ""; }; + 8F69EF54B337C3AAF3FE524441CDCEFA /* RHViewStateKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RHViewStateKit-umbrella.h"; sourceTree = ""; }; + 91164BE769DA144776663FBF46785561 /* ConstraintDirectionalInsets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintDirectionalInsets.swift; path = Source/ConstraintDirectionalInsets.swift; sourceTree = ""; }; + 91A53CAF547D71AEFABE49D91B4E6816 /* ConstraintMakerPriortizable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerPriortizable.swift; path = Source/ConstraintMakerPriortizable.swift; sourceTree = ""; }; + 94201BA35465AC641AD89232885C0C2C /* RHViewStateKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RHViewStateKit-dummy.m"; sourceTree = ""; }; + 9716AD15FADF38A93170E034F2BCE457 /* ConstraintPriorityTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintPriorityTarget.swift; path = Source/ConstraintPriorityTarget.swift; sourceTree = ""; }; + 979486118B3E90C08386079D57962701 /* SnapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SnapKit.framework; 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; }; + 9E95BAA563DC916B26122950FEC3F7BC /* Pods-RHViewStateKit_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-RHViewStateKit_Tests-dummy.m"; sourceTree = ""; }; + A1CD432F32277BB93DEAADA626ECEC5B /* SnapKit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SnapKit.release.xcconfig; sourceTree = ""; }; + A2C423093FE675FDD0950DFB01BCD2F2 /* Pods-RHViewStateKit_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-RHViewStateKit_Tests-umbrella.h"; sourceTree = ""; }; + A31DC412B1ABF37E535AE5557D57CA30 /* RHViewCollectionState.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RHViewCollectionState.swift; path = Source/RHViewCollectionState.swift; sourceTree = ""; }; + A51E99894F75F00A281BE6A32FBDE495 /* ConstraintView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintView.swift; path = Source/ConstraintView.swift; sourceTree = ""; }; + A7D358AA1606C7B2CDC8555485807E9E /* ConstraintDirectionalInsetTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintDirectionalInsetTarget.swift; path = Source/ConstraintDirectionalInsetTarget.swift; sourceTree = ""; }; + BE0BE9F3D55FDB29EF516F6D6B1B6BCA /* ConstraintLayoutGuideDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutGuideDSL.swift; path = Source/ConstraintLayoutGuideDSL.swift; sourceTree = ""; }; + C26D26B27DB834D8733B9D594E353B2B /* RHViewStateKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = RHViewStateKit.framework; path = RHViewStateKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C4A46A8054577838D49C60142EB88B13 /* ConstraintLayoutSupportDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutSupportDSL.swift; path = Source/ConstraintLayoutSupportDSL.swift; sourceTree = ""; }; + CB1D9F6F4E2364DFAF158E04AF5D5EAA /* ConstraintDescription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintDescription.swift; path = Source/ConstraintDescription.swift; sourceTree = ""; }; + D038D2FAA2F6B073D1B64B8635F4E3E6 /* Debugging.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debugging.swift; path = Source/Debugging.swift; sourceTree = ""; }; + D4E066869A95E00B949CBA4D2284C35F /* Typealiases.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Typealiases.swift; path = Source/Typealiases.swift; sourceTree = ""; }; + D6CA820421B61B1A13D55C878D1DBEF7 /* AssociationPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssociationPolicy.swift; path = Source/AssociationPolicy.swift; sourceTree = ""; }; + E13B89FFD81AACB7530769CA05EEA26B /* SnapKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SnapKit-dummy.m"; sourceTree = ""; }; + E14A09DC3AD8CA84464FEC37F0FC99D1 /* SnapKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SnapKit-prefix.pch"; sourceTree = ""; }; + E1E70FFBD40E32D0776A2B14D315224A /* UILabel+TextWidth.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UILabel+TextWidth.swift"; path = "Source/UILabel+TextWidth.swift"; sourceTree = ""; }; + E2412B25ADDEC58A3655152D8A6E1331 /* Pods_RHViewStateKit_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_RHViewStateKit_Tests.framework; path = "Pods-RHViewStateKit_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + E2C3B0B200350EAC8F42EF635FF31BD1 /* ConstraintMakerEditable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerEditable.swift; path = Source/ConstraintMakerEditable.swift; sourceTree = ""; }; + E43F10DE451FED17810D9B5C237324A5 /* ConstraintMakerExtendable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerExtendable.swift; path = Source/ConstraintMakerExtendable.swift; sourceTree = ""; }; + E6D4AFF1DA3A06E80E1FE0BBD3CBD706 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; + E769393FE2F7DCF3E342575F5DF05239 /* SnapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SnapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E82DF60F18ECAFAF727D529FF05672AC /* Pods-RHViewStateKit_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RHViewStateKit_Example.debug.xcconfig"; sourceTree = ""; }; + E9EA6F246E81793F97AE0FED302BA06B /* RHViewState+DataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "RHViewState+DataSource.swift"; path = "Source/RHViewState+DataSource.swift"; sourceTree = ""; }; + EC929EC9D87C41C243058C7C12C1FF36 /* RHViewStateAnimation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RHViewStateAnimation.swift; path = Source/RHViewStateAnimation.swift; sourceTree = ""; }; + ED101DB54AB2F8F1BCCE12E9200FC619 /* Pods-RHViewStateKit_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-RHViewStateKit_Tests-acknowledgements.markdown"; sourceTree = ""; }; + ED40681B2472449B7AA1E8BEBCD10F32 /* RHDefaultLoading.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RHDefaultLoading.swift; path = Source/RHDefaultLoading.swift; sourceTree = ""; }; + EE9055CEA7890517265589BD23D73A49 /* ConstraintView+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ConstraintView+Extensions.swift"; path = "Source/ConstraintView+Extensions.swift"; sourceTree = ""; }; + F0BD95F32F2E57D6B9100B77B93F013C /* ConstraintPriority.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintPriority.swift; path = Source/ConstraintPriority.swift; sourceTree = ""; }; + F203878D13F4508D0FE4398AF91567F3 /* RHViewStateKit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RHViewStateKit.release.xcconfig; sourceTree = ""; }; + F44C5B72775F6AF0891BF331F32FE10D /* LayoutConstraint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutConstraint.swift; path = Source/LayoutConstraint.swift; sourceTree = ""; }; + F62D8A0C11B68CD054C554239D53E834 /* UIView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UIView.swift; path = Source/UIView.swift; sourceTree = ""; }; + F7AB9BB47A2175181386A432C07253AE /* ConstraintMultiplierTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMultiplierTarget.swift; path = Source/ConstraintMultiplierTarget.swift; sourceTree = ""; }; + F9486D344C677FBAFBAA11A39BA271B5 /* RHViewStateKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RHViewStateKit.debug.xcconfig; sourceTree = ""; }; + FD79D0431011B6C9D7AA46E04843B058 /* Pods-RHViewStateKit_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RHViewStateKit_Tests-acknowledgements.plist"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + DFECCDE16833F419EF4B3426FA1CEE9B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 314F8B113A098B93758591CD23FCFE93 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E80B49D0F94CBC7FCF2317ABA15E02A4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E157DF5631B333E92BE502E0A544338B /* Foundation.framework in Frameworks */, + C8735DA80CAE830D735393898B823B66 /* SnapKit.framework in Frameworks */, + E52D44B70234F19F0C848051564EAEC3 /* UIKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F0283E1033BA88BB680766E15625B999 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2C9FAE3A220BCFC61144CBD8A68A73C5 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F3167B6D1315112A595969DFBD1034D9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D70A1ABC843258FBD8105076C89F405D /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 004336DFA7AA16388BC99D9B77F4622D /* Pods-RHViewStateKit_Example */ = { + isa = PBXGroup; + children = ( + 62E455378CC11AC4F7D6BF581DD8B785 /* Pods-RHViewStateKit_Example.modulemap */, + 50D146F8C095151C1E1DF0132EB9E966 /* Pods-RHViewStateKit_Example-acknowledgements.markdown */, + 648E6697612356C99237FF6BF7B0B634 /* Pods-RHViewStateKit_Example-acknowledgements.plist */, + 60734E71DA41D5E53B1C0AA824A4149B /* Pods-RHViewStateKit_Example-dummy.m */, + 063DB8D843507981999BA078C21A4C98 /* Pods-RHViewStateKit_Example-frameworks.sh */, + 314E4582A9D16E426518833C3665B560 /* Pods-RHViewStateKit_Example-Info.plist */, + 72B50A29067CDBEFDCB6E3E74760F532 /* Pods-RHViewStateKit_Example-umbrella.h */, + E82DF60F18ECAFAF727D529FF05672AC /* Pods-RHViewStateKit_Example.debug.xcconfig */, + 63E4F78BDAFF490544268F9DEE1AA35A /* Pods-RHViewStateKit_Example.release.xcconfig */, + ); + name = "Pods-RHViewStateKit_Example"; + path = "Target Support Files/Pods-RHViewStateKit_Example"; + sourceTree = ""; + }; + 0E3070B536EBADB7A1FFA2EFE1CB674F /* Pod */ = { + isa = PBXGroup; + children = ( + 51E1F8752DC2EFB827475BD2D7EBB708 /* LICENSE */, + E6D4AFF1DA3A06E80E1FE0BBD3CBD706 /* README.md */, + 7C151ED993E980B7CEA7FFB748E926F7 /* RHViewStateKit.podspec */, + ); + name = Pod; + sourceTree = ""; + }; + 2D4094FF51BCED0C382686B877688648 /* Development Pods */ = { + isa = PBXGroup; + children = ( + D0B93634E1D8D5B399EE15214F85079A /* RHViewStateKit */, + ); + name = "Development Pods"; + sourceTree = ""; + }; + 387ECC0312475450753C9E8687127A57 /* Support Files */ = { + isa = PBXGroup; + children = ( + 54F0E810001428E73F71DD8E89EA5B97 /* RHViewStateKit.modulemap */, + 94201BA35465AC641AD89232885C0C2C /* RHViewStateKit-dummy.m */, + 12C627C9E916AFFD50374C4D271FD8A9 /* RHViewStateKit-Info.plist */, + 5AB16C72997EA695133937C5D86E15AF /* RHViewStateKit-prefix.pch */, + 8F69EF54B337C3AAF3FE524441CDCEFA /* RHViewStateKit-umbrella.h */, + F9486D344C677FBAFBAA11A39BA271B5 /* RHViewStateKit.debug.xcconfig */, + F203878D13F4508D0FE4398AF91567F3 /* RHViewStateKit.release.xcconfig */, + ); + name = "Support Files"; + path = "Example/Pods/Target Support Files/RHViewStateKit"; + sourceTree = ""; + }; + 535CD497228DA023E262D17647BAB8E8 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 004336DFA7AA16388BC99D9B77F4622D /* Pods-RHViewStateKit_Example */, + EB9C9B00D5E8E887BE70E3A4689847CA /* Pods-RHViewStateKit_Tests */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + 7F02E3862C6E84203E8324D9D0088797 /* SnapKit */ = { + isa = PBXGroup; + children = ( + 50380F281EC3EE769C85035CCEA77226 /* Constraint.swift */, + 13F460233F2A555D41511B6CCA66A124 /* ConstraintAttributes.swift */, + 250E41DBB680A3A2ECDDD2210311B230 /* ConstraintConfig.swift */, + 6D990E0FED5B41C1F13AC6B08208A99B /* ConstraintConstantTarget.swift */, + CB1D9F6F4E2364DFAF158E04AF5D5EAA /* ConstraintDescription.swift */, + 91164BE769DA144776663FBF46785561 /* ConstraintDirectionalInsets.swift */, + A7D358AA1606C7B2CDC8555485807E9E /* ConstraintDirectionalInsetTarget.swift */, + 7AE00ECC24C5CC6DC938204FF42AD0E5 /* ConstraintDSL.swift */, + 549471CD1FE3A1E1865DD172864918D3 /* ConstraintInsets.swift */, + 7C2EC377264B25FB0E67D150E37E87CD /* ConstraintInsetTarget.swift */, + 474AFC560A8B414B467174737DBC891A /* ConstraintItem.swift */, + 66C5188AE61F0E667CD9E7ED28CDD61C /* ConstraintLayoutGuide.swift */, + 09BF299D2EEB87E7DD02630E87B96224 /* ConstraintLayoutGuide+Extensions.swift */, + BE0BE9F3D55FDB29EF516F6D6B1B6BCA /* ConstraintLayoutGuideDSL.swift */, + 3D705690D879064ED84970813189D8D4 /* ConstraintLayoutSupport.swift */, + C4A46A8054577838D49C60142EB88B13 /* ConstraintLayoutSupportDSL.swift */, + 141BC33167429B9926FB24A17F01568C /* ConstraintMaker.swift */, + E2C3B0B200350EAC8F42EF635FF31BD1 /* ConstraintMakerEditable.swift */, + E43F10DE451FED17810D9B5C237324A5 /* ConstraintMakerExtendable.swift */, + 11D02329E74D733C03BF6BAE1F564481 /* ConstraintMakerFinalizable.swift */, + 91A53CAF547D71AEFABE49D91B4E6816 /* ConstraintMakerPriortizable.swift */, + 724FB64349F5678CE1709979CF0DD952 /* ConstraintMakerRelatable.swift */, + F7AB9BB47A2175181386A432C07253AE /* ConstraintMultiplierTarget.swift */, + 47B200BD964F52F6693D4168248B8645 /* ConstraintOffsetTarget.swift */, + F0BD95F32F2E57D6B9100B77B93F013C /* ConstraintPriority.swift */, + 9716AD15FADF38A93170E034F2BCE457 /* ConstraintPriorityTarget.swift */, + 2975CA5A0D26BC84F3EE9912FEBDA795 /* ConstraintRelatableTarget.swift */, + 25479F58B67AA43E092C7B156C1B5C1B /* ConstraintRelation.swift */, + A51E99894F75F00A281BE6A32FBDE495 /* ConstraintView.swift */, + EE9055CEA7890517265589BD23D73A49 /* ConstraintView+Extensions.swift */, + 56006AA49A060CA2830F32CD6F394823 /* ConstraintViewDSL.swift */, + D038D2FAA2F6B073D1B64B8635F4E3E6 /* Debugging.swift */, + F44C5B72775F6AF0891BF331F32FE10D /* LayoutConstraint.swift */, + 464C01543F3BCEDEE51ABAA696513D0B /* LayoutConstraintItem.swift */, + D4E066869A95E00B949CBA4D2284C35F /* Typealiases.swift */, + 6A9341666EAC154422A032092A7DC2D7 /* UILayoutSupport+Extensions.swift */, + 843EFF0C650682C304D518A9092EE9FD /* Support Files */, + ); + name = SnapKit; + path = SnapKit; + sourceTree = ""; + }; + 843EFF0C650682C304D518A9092EE9FD /* Support Files */ = { + isa = PBXGroup; + children = ( + 7889131C1139F96BBDA94CEE2E694763 /* SnapKit.modulemap */, + E13B89FFD81AACB7530769CA05EEA26B /* SnapKit-dummy.m */, + 391A6F8B42D2CD885F8F3C4CE6859439 /* SnapKit-Info.plist */, + E14A09DC3AD8CA84464FEC37F0FC99D1 /* SnapKit-prefix.pch */, + 0116B84A6773B75FCBFCB479E740F0F3 /* SnapKit-umbrella.h */, + 7C21E0C93A1141A1E2EB51575500E27D /* SnapKit.debug.xcconfig */, + A1CD432F32277BB93DEAADA626ECEC5B /* SnapKit.release.xcconfig */, + ); + name = "Support Files"; + path = "../Target Support Files/SnapKit"; + sourceTree = ""; + }; + 99DBB30AE89E388321E3A189A8A571D9 /* iOS */ = { + isa = PBXGroup; + children = ( + 32F16DF945CE73ECA0F797633B716F8E /* Foundation.framework */, + 68D1B94523097CAB40FE2A587B7A6A59 /* UIKit.framework */, + ); + name = iOS; + sourceTree = ""; + }; + A5295F30F49CEBECAE3FA01C1DA73F8C /* Frameworks */ = { + isa = PBXGroup; + children = ( + E769393FE2F7DCF3E342575F5DF05239 /* SnapKit.framework */, + 99DBB30AE89E388321E3A189A8A571D9 /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + BA22F08D059965C9A09F78196176CEDB /* Pods */ = { + isa = PBXGroup; + children = ( + 7F02E3862C6E84203E8324D9D0088797 /* SnapKit */, + ); + name = Pods; + sourceTree = ""; + }; + CF1408CF629C7361332E53B88F7BD30C = { + isa = PBXGroup; + children = ( + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, + 2D4094FF51BCED0C382686B877688648 /* Development Pods */, + A5295F30F49CEBECAE3FA01C1DA73F8C /* Frameworks */, + BA22F08D059965C9A09F78196176CEDB /* Pods */, + DF19695B5BDAC2429FA960FBCDE38AD9 /* Products */, + 535CD497228DA023E262D17647BAB8E8 /* Targets Support Files */, + ); + sourceTree = ""; + }; + D0B93634E1D8D5B399EE15214F85079A /* RHViewStateKit */ = { + isa = PBXGroup; + children = ( + D6CA820421B61B1A13D55C878D1DBEF7 /* AssociationPolicy.swift */, + 6EEF9CF5165C61D936F4DB137EF85986 /* RHButtonConfiguration.swift */, + ED40681B2472449B7AA1E8BEBCD10F32 /* RHDefaultLoading.swift */, + 587A36FD57FBA1629BDB9367EB798F91 /* RHDefaultViewState.swift */, + 31567371D500544DFA5DE399DB87CF9F /* RHDescriptionConfiguration.swift */, + 0058394C54F3353D969F8FD6F66AB331 /* RHImageConfiguration.swift */, + 43C8BB3DA246D13B0F4E32A0F5ADE5F6 /* RHLoadingConfiguration.swift */, + 2C2CA9EAEC139DF3A81F37C56A891565 /* RHPositionConfiguration.swift */, + 619FB6A9D2B28D69A10E666BE37AE15A /* RHTitleConfiguration.swift */, + A31DC412B1ABF37E535AE5557D57CA30 /* RHViewCollectionState.swift */, + 748C914FBE486E1A47C4CE01A66F51FA /* RHViewConfiguration.swift */, + 3C796ECCFF8AF7939F2F7687FBC0BAA5 /* RHViewState.swift */, + E9EA6F246E81793F97AE0FED302BA06B /* RHViewState+DataSource.swift */, + 55415A3B206F4C09FBD6F414F7CD3B8B /* RHViewState+Delegate.swift */, + EC929EC9D87C41C243058C7C12C1FF36 /* RHViewStateAnimation.swift */, + E1E70FFBD40E32D0776A2B14D315224A /* UILabel+TextWidth.swift */, + F62D8A0C11B68CD054C554239D53E834 /* UIView.swift */, + 0E3070B536EBADB7A1FFA2EFE1CB674F /* Pod */, + 387ECC0312475450753C9E8687127A57 /* Support Files */, + ); + name = RHViewStateKit; + path = ../..; + sourceTree = ""; + }; + DF19695B5BDAC2429FA960FBCDE38AD9 /* Products */ = { + isa = PBXGroup; + children = ( + 024A9098B65CB3681496B4F0F0FF640D /* Pods_RHViewStateKit_Example.framework */, + E2412B25ADDEC58A3655152D8A6E1331 /* Pods_RHViewStateKit_Tests.framework */, + C26D26B27DB834D8733B9D594E353B2B /* RHViewStateKit.framework */, + 979486118B3E90C08386079D57962701 /* SnapKit.framework */, + ); + name = Products; + sourceTree = ""; + }; + EB9C9B00D5E8E887BE70E3A4689847CA /* Pods-RHViewStateKit_Tests */ = { + isa = PBXGroup; + children = ( + 27CBD46D0A9F8CF659DF3AC9FCADC329 /* Pods-RHViewStateKit_Tests.modulemap */, + ED101DB54AB2F8F1BCCE12E9200FC619 /* Pods-RHViewStateKit_Tests-acknowledgements.markdown */, + FD79D0431011B6C9D7AA46E04843B058 /* Pods-RHViewStateKit_Tests-acknowledgements.plist */, + 9E95BAA563DC916B26122950FEC3F7BC /* Pods-RHViewStateKit_Tests-dummy.m */, + 48800EF45B9EC6CDD220C068D73E66AB /* Pods-RHViewStateKit_Tests-Info.plist */, + A2C423093FE675FDD0950DFB01BCD2F2 /* Pods-RHViewStateKit_Tests-umbrella.h */, + 0344FE02A5F4DFC1B8FF99EF8C365F55 /* Pods-RHViewStateKit_Tests.debug.xcconfig */, + 3099CCCB5354B1F6EA7AC21898BD0C27 /* Pods-RHViewStateKit_Tests.release.xcconfig */, + ); + name = "Pods-RHViewStateKit_Tests"; + path = "Target Support Files/Pods-RHViewStateKit_Tests"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 43CB78CD3808CD0F9D3E2646BEB844F3 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + EF96A0D5F9D8AC912F2889F7760FEBD8 /* SnapKit-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 79927B1C1771BC483B7267D4E976E2D0 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 8EACD59A411198654AB3137C39020746 /* Pods-RHViewStateKit_Tests-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A37592D89A91D130F12109FE80814647 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A7EC12C6FE05F8B396D55796A2C44F7C /* Pods-RHViewStateKit_Example-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A9FF77413FEAA472CCCBFC454A09F846 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 16FF6723D82F05282A66F2DB037DE5B9 /* RHViewStateKit-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 07189942DCB94AD1B725FACC89B115D0 /* Pods-RHViewStateKit_Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 18DB3B5F42FA9D19E3CD08562D449424 /* Build configuration list for PBXNativeTarget "Pods-RHViewStateKit_Tests" */; + buildPhases = ( + 79927B1C1771BC483B7267D4E976E2D0 /* Headers */, + 741234B48EEBFCBFDF79DD9FCCF9CCBA /* Sources */, + F0283E1033BA88BB680766E15625B999 /* Frameworks */, + 08282C919F5DF54B86388414E0FD98AD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + CF90E0529F8175A125329B6338456289 /* PBXTargetDependency */, + ); + name = "Pods-RHViewStateKit_Tests"; + productName = "Pods-RHViewStateKit_Tests"; + productReference = E2412B25ADDEC58A3655152D8A6E1331 /* Pods_RHViewStateKit_Tests.framework */; + productType = "com.apple.product-type.framework"; + }; + 19622742EBA51E823D6DAE3F8CDBFAD4 /* SnapKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5CC73B9C7A0944A2E545A24C76DC2326 /* Build configuration list for PBXNativeTarget "SnapKit" */; + buildPhases = ( + 43CB78CD3808CD0F9D3E2646BEB844F3 /* Headers */, + A2D5CC047B647192E857D60A89E07465 /* Sources */, + F3167B6D1315112A595969DFBD1034D9 /* Frameworks */, + 5A311613F24671E84E7E835A8503B1B6 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SnapKit; + productName = SnapKit; + productReference = 979486118B3E90C08386079D57962701 /* SnapKit.framework */; + productType = "com.apple.product-type.framework"; + }; + 5A0EBD8A851EDA1AF01C039F2C3AC74B /* RHViewStateKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4B68FE620253C2B76021EAAB9BC8DAA8 /* Build configuration list for PBXNativeTarget "RHViewStateKit" */; + buildPhases = ( + A9FF77413FEAA472CCCBFC454A09F846 /* Headers */, + 77723C44626A64FC9439470277EC1E7C /* Sources */, + E80B49D0F94CBC7FCF2317ABA15E02A4 /* Frameworks */, + 11835C1EE0C58C9B711922B11A75775E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 0004558B5BF8CEE73A129AD88F8F9287 /* PBXTargetDependency */, + ); + name = RHViewStateKit; + productName = RHViewStateKit; + productReference = C26D26B27DB834D8733B9D594E353B2B /* RHViewStateKit.framework */; + productType = "com.apple.product-type.framework"; + }; + B91233CA26B0D65B291C2E8E7E65D5CD /* Pods-RHViewStateKit_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 882B8BCB963D16ED3F15EB3AF39D3670 /* Build configuration list for PBXNativeTarget "Pods-RHViewStateKit_Example" */; + buildPhases = ( + A37592D89A91D130F12109FE80814647 /* Headers */, + FB52E8C65ABDF275172E36501E357FBA /* Sources */, + DFECCDE16833F419EF4B3426FA1CEE9B /* Frameworks */, + A0B26F136AADF46AB49819B51474EBDA /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + B707602FD87392B175F8175C8BBA2357 /* PBXTargetDependency */, + 6ABD7541C650A8C2C9B92D4B062BB21D /* PBXTargetDependency */, + ); + name = "Pods-RHViewStateKit_Example"; + productName = "Pods-RHViewStateKit_Example"; + productReference = 024A9098B65CB3681496B4F0F0FF640D /* Pods_RHViewStateKit_Example.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + BFDFE7DC352907FC980B868725387E98 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1240; + LastUpgradeCheck = 1240; + }; + buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = CF1408CF629C7361332E53B88F7BD30C; + productRefGroup = DF19695B5BDAC2429FA960FBCDE38AD9 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + B91233CA26B0D65B291C2E8E7E65D5CD /* Pods-RHViewStateKit_Example */, + 07189942DCB94AD1B725FACC89B115D0 /* Pods-RHViewStateKit_Tests */, + 5A0EBD8A851EDA1AF01C039F2C3AC74B /* RHViewStateKit */, + 19622742EBA51E823D6DAE3F8CDBFAD4 /* SnapKit */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 08282C919F5DF54B86388414E0FD98AD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 11835C1EE0C58C9B711922B11A75775E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5A311613F24671E84E7E835A8503B1B6 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A0B26F136AADF46AB49819B51474EBDA /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 741234B48EEBFCBFDF79DD9FCCF9CCBA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6DFBEB88A23C4553463143476A083F80 /* Pods-RHViewStateKit_Tests-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 77723C44626A64FC9439470277EC1E7C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FE307D1D14B7AA1267284B2491958C74 /* AssociationPolicy.swift in Sources */, + 54B18A94EE7F59F613DB11D2A98D1F56 /* RHButtonConfiguration.swift in Sources */, + D25E2A7F5619AE67D685E70602D04C21 /* RHDefaultLoading.swift in Sources */, + B5F72555E9AA8E1B0A1052E57C969926 /* RHDefaultViewState.swift in Sources */, + CFD40566576A4DB6D7A213E0285C49D8 /* RHDescriptionConfiguration.swift in Sources */, + 054008EEFE72D6DF7C28842F474B04C7 /* RHImageConfiguration.swift in Sources */, + 05380B582C925162ED673B4D2240E8E3 /* RHLoadingConfiguration.swift in Sources */, + D0C2F56F7A65B474FEB226048591C869 /* RHPositionConfiguration.swift in Sources */, + 955E9AF5A23E0AE21A29C2790C796887 /* RHTitleConfiguration.swift in Sources */, + 17806A6544F7D9AB041FC8878E3F83C0 /* RHViewCollectionState.swift in Sources */, + 0125CC4A36C88A722195CAC1294D1ABA /* RHViewConfiguration.swift in Sources */, + E69E0C50C869ABFCF113BCDCDE4A8C24 /* RHViewState+DataSource.swift in Sources */, + 0C4763B98C866C2D0B40AC4C5A330EA1 /* RHViewState+Delegate.swift in Sources */, + 4863A04B9B3AF213D590F9C8A3990A98 /* RHViewState.swift in Sources */, + CBDDE864F6D788222535101C83A141FC /* RHViewStateAnimation.swift in Sources */, + 1CFFE7B57D171C9297B0C3BA184F87DF /* RHViewStateKit-dummy.m in Sources */, + 8709D68FA43D6B4008965506611AA691 /* UILabel+TextWidth.swift in Sources */, + 14CA5DDBDE92C4ADA3416241DC0BE669 /* UIView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A2D5CC047B647192E857D60A89E07465 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9D914D41A2364388B45C0EC205FCA83C /* Constraint.swift in Sources */, + B1ED1778FF7D6EA788CB4E022810495E /* ConstraintAttributes.swift in Sources */, + 76C6FE4EDB163E175683FB44CD91F3FF /* ConstraintConfig.swift in Sources */, + D35A86882F758022DD86180677016754 /* ConstraintConstantTarget.swift in Sources */, + 9176D1AA04DC8AEEFABCA02A5929486B /* ConstraintDescription.swift in Sources */, + 3AAF5D454CC438D3F6442B36BCE67A0D /* ConstraintDirectionalInsets.swift in Sources */, + D1690E4933E7746E1710DF8872B50EB4 /* ConstraintDirectionalInsetTarget.swift in Sources */, + 1873B75811C92AF916A0EBE5B6B614FB /* ConstraintDSL.swift in Sources */, + 9A36BD532F50F622C6C5C096012BF8ED /* ConstraintInsets.swift in Sources */, + 882EF84C07F7C6DCBB979DBBC0B95318 /* ConstraintInsetTarget.swift in Sources */, + 489F385459C6CDF8A53E93D785A9C3BA /* ConstraintItem.swift in Sources */, + FEEB86B35DAB9A5053B0F204D54B60CC /* ConstraintLayoutGuide+Extensions.swift in Sources */, + A736787C0AA7CE424CA7AECB4726FD8E /* ConstraintLayoutGuide.swift in Sources */, + 877CE1770557AE22021A18D7960FC687 /* ConstraintLayoutGuideDSL.swift in Sources */, + 43B9A7628E8D57AC5728E583EC9D7E77 /* ConstraintLayoutSupport.swift in Sources */, + 64CE3ED663B1EF2CA8E12C6326AC9909 /* ConstraintLayoutSupportDSL.swift in Sources */, + 7546B906779A55EB7B82617393AE43A3 /* ConstraintMaker.swift in Sources */, + F3C9E481FFCE3BA9F2A6A5F8661DF4FA /* ConstraintMakerEditable.swift in Sources */, + E410F63EE9984624FF764BA6478B6BC3 /* ConstraintMakerExtendable.swift in Sources */, + 6FB7C9FEF88C2D9406614FF2ACC19F47 /* ConstraintMakerFinalizable.swift in Sources */, + F75D0D91FA8334647234AF60068FA437 /* ConstraintMakerPriortizable.swift in Sources */, + 540AD42C93798F743FA7EF2881877D43 /* ConstraintMakerRelatable.swift in Sources */, + 2911B5E55A59E62DADF4196FE31F2E15 /* ConstraintMultiplierTarget.swift in Sources */, + 0182A3D3332AECD72450D3CD2519B5D4 /* ConstraintOffsetTarget.swift in Sources */, + DAE27DE0DF7F3F175C55D66E34646039 /* ConstraintPriority.swift in Sources */, + A730F94A306FD7FE5454A01FB9E2D4F4 /* ConstraintPriorityTarget.swift in Sources */, + 048476C42E91460983E98D2E5617E237 /* ConstraintRelatableTarget.swift in Sources */, + FED90BB50DD5C4659C4D6AF0F2A6024C /* ConstraintRelation.swift in Sources */, + 92A39A4A1A1094F27490A2329E516C35 /* ConstraintView+Extensions.swift in Sources */, + EE57C45C37F61AFD2D2CFE19FC407E19 /* ConstraintView.swift in Sources */, + 4CA57276E1AD9F27CE1660F631D8218D /* ConstraintViewDSL.swift in Sources */, + D6B20511EAFAEFFD03B738ECBC55163D /* Debugging.swift in Sources */, + E134174E010FE7B40B6BD50C74795127 /* LayoutConstraint.swift in Sources */, + 4E46F03A3985E8646BAC8FA51AF546DB /* LayoutConstraintItem.swift in Sources */, + A9D5250A15EA7B51823B720058D072DF /* SnapKit-dummy.m in Sources */, + F2BD33332FA939677BAA2C9B2A5950B3 /* Typealiases.swift in Sources */, + 2CD1A09C4434EB01D666B846BBEEFE27 /* UILayoutSupport+Extensions.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FB52E8C65ABDF275172E36501E357FBA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 313DAB871B76CD9484357B2F70625FD3 /* Pods-RHViewStateKit_Example-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 0004558B5BF8CEE73A129AD88F8F9287 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SnapKit; + target = 19622742EBA51E823D6DAE3F8CDBFAD4 /* SnapKit */; + targetProxy = E958F054CD16FC50B4D2ED463E56068C /* PBXContainerItemProxy */; + }; + 6ABD7541C650A8C2C9B92D4B062BB21D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SnapKit; + target = 19622742EBA51E823D6DAE3F8CDBFAD4 /* SnapKit */; + targetProxy = BAA62A7733276590D7D0995A9860410C /* PBXContainerItemProxy */; + }; + B707602FD87392B175F8175C8BBA2357 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = RHViewStateKit; + target = 5A0EBD8A851EDA1AF01C039F2C3AC74B /* RHViewStateKit */; + targetProxy = 3DE904DFDEE35DAC6F6805695F4D676E /* PBXContainerItemProxy */; + }; + CF90E0529F8175A125329B6338456289 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Pods-RHViewStateKit_Example"; + target = B91233CA26B0D65B291C2E8E7E65D5CD /* Pods-RHViewStateKit_Example */; + targetProxy = 5A1314872650690D2240510083BBDB5C /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 1F4AC2841076AA24F0E8229F5048E450 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A1CD432F32277BB93DEAADA626ECEC5B /* 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; + }; + 298064DE697009A4B6617260CD214F79 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F9486D344C677FBAFBAA11A39BA271B5 /* RHViewStateKit.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/RHViewStateKit/RHViewStateKit-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RHViewStateKit/RHViewStateKit-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/RHViewStateKit/RHViewStateKit.modulemap"; + PRODUCT_MODULE_NAME = RHViewStateKit; + PRODUCT_NAME = RHViewStateKit; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.1; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 379621B9115E3369F1C2EA48B4DDBC26 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7C21E0C93A1141A1E2EB51575500E27D /* 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; + }; + 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; + }; + 7FFF3C60037E6BB99114175514640296 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3099CCCB5354B1F6EA7AC21898BD0C27 /* Pods-RHViewStateKit_Tests.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-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-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-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests.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; + }; + 876B097A182435E1416ADFA33F07EF36 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F203878D13F4508D0FE4398AF91567F3 /* RHViewStateKit.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/RHViewStateKit/RHViewStateKit-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RHViewStateKit/RHViewStateKit-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/RHViewStateKit/RHViewStateKit.modulemap"; + PRODUCT_MODULE_NAME = RHViewStateKit; + PRODUCT_NAME = RHViewStateKit; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.1; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 9B66ADE4EAA77D42BDBC0A92FAA13FCF /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 0344FE02A5F4DFC1B8FF99EF8C365F55 /* Pods-RHViewStateKit_Tests.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-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-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-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests.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; + }; + A480DCC9288A14C042782C91D6DA5B7B /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 63E4F78BDAFF490544268F9DEE1AA35A /* Pods-RHViewStateKit_Example.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-RHViewStateKit_Example/Pods-RHViewStateKit_Example-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-RHViewStateKit_Example/Pods-RHViewStateKit_Example.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; + }; + 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; + }; + DE0DB47308FBE3CEFB772BEDDBA0565E /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E82DF60F18ECAFAF727D529FF05672AC /* Pods-RHViewStateKit_Example.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-RHViewStateKit_Example/Pods-RHViewStateKit_Example-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-RHViewStateKit_Example/Pods-RHViewStateKit_Example.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 */ + 18DB3B5F42FA9D19E3CD08562D449424 /* Build configuration list for PBXNativeTarget "Pods-RHViewStateKit_Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9B66ADE4EAA77D42BDBC0A92FAA13FCF /* Debug */, + 7FFF3C60037E6BB99114175514640296 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D299434AB35E7FD6F7921C8EF24742FF /* Debug */, + 7EE7A78859F657F6BEFC651185B43192 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4B68FE620253C2B76021EAAB9BC8DAA8 /* Build configuration list for PBXNativeTarget "RHViewStateKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 298064DE697009A4B6617260CD214F79 /* Debug */, + 876B097A182435E1416ADFA33F07EF36 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 5CC73B9C7A0944A2E545A24C76DC2326 /* Build configuration list for PBXNativeTarget "SnapKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 379621B9115E3369F1C2EA48B4DDBC26 /* Debug */, + 1F4AC2841076AA24F0E8229F5048E450 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 882B8BCB963D16ED3F15EB3AF39D3670 /* Build configuration list for PBXNativeTarget "Pods-RHViewStateKit_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DE0DB47308FBE3CEFB772BEDDBA0565E /* Debug */, + A480DCC9288A14C042782C91D6DA5B7B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; +} diff --git a/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Example/Pods/Pods.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/Pods/Pods.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/Pods/SnapKit/LICENSE b/Example/Pods/SnapKit/LICENSE new file mode 100644 index 0000000..a18ccfb --- /dev/null +++ b/Example/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/Example/Pods/SnapKit/README.md b/Example/Pods/SnapKit/README.md new file mode 100644 index 0000000..0945ce6 --- /dev/null +++ b/Example/Pods/SnapKit/README.md @@ -0,0 +1,136 @@ + + +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+ + +## 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.0.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. + +### 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.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](http://snapkit.io/docs/) +- [F.A.Q.](http://snapkit.io/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/Example/Pods/SnapKit/Source/Constraint.swift b/Example/Pods/SnapKit/Source/Constraint.swift new file mode 100644 index 0000000..390629e --- /dev/null +++ b/Example/Pods/SnapKit/Source/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, message:"Use activate().") + public func install() { + self.activate() + } + + @available(*, deprecated, message:"Use 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, message:"Use update(offset: ConstraintOffsetTarget) instead.") + public func updateOffset(amount: ConstraintOffsetTarget) -> Void { self.update(offset: amount) } + + @available(*, deprecated, message:"Use update(inset: ConstraintInsetTarget) instead.") + public func updateInsets(amount: ConstraintInsetTarget) -> Void { self.update(inset: amount) } + + @available(*, deprecated, message:"Use update(priority: ConstraintPriorityTarget) instead.") + 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/Example/Pods/SnapKit/Source/ConstraintAttributes.swift b/Example/Pods/SnapKit/Source/ConstraintAttributes.swift new file mode 100644 index 0000000..2f0fbe9 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintAttributes.swift @@ -0,0 +1,199 @@ +// +// 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 var none: ConstraintAttributes { return 0 } + internal static var left: ConstraintAttributes { return 1 } + internal static var top: ConstraintAttributes { return 2 } + internal static var right: ConstraintAttributes { return 4 } + internal static var bottom: ConstraintAttributes { return 8 } + internal static var leading: ConstraintAttributes { return 16 } + internal static var trailing: ConstraintAttributes { return 32 } + internal static var width: ConstraintAttributes { return 64 } + internal static var height: ConstraintAttributes { return 128 } + internal static var centerX: ConstraintAttributes { return 256 } + internal static var centerY: ConstraintAttributes { return 512 } + internal static var lastBaseline: ConstraintAttributes { return 1024 } + + @available(iOS 8.0, OSX 10.11, *) + internal static var firstBaseline: ConstraintAttributes { return 2048 } + + @available(iOS 8.0, *) + internal static var leftMargin: ConstraintAttributes { return 4096 } + + @available(iOS 8.0, *) + internal static var rightMargin: ConstraintAttributes { return 8192 } + + @available(iOS 8.0, *) + internal static var topMargin: ConstraintAttributes { return 16384 } + + @available(iOS 8.0, *) + internal static var bottomMargin: ConstraintAttributes { return 32768 } + + @available(iOS 8.0, *) + internal static var leadingMargin: ConstraintAttributes { return 65536 } + + @available(iOS 8.0, *) + internal static var trailingMargin: ConstraintAttributes { return 131072 } + + @available(iOS 8.0, *) + internal static var centerXWithinMargins: ConstraintAttributes { return 262144 } + + @available(iOS 8.0, *) + internal static var centerYWithinMargins: ConstraintAttributes { return 524288 } + + // aggregates + + internal static var edges: ConstraintAttributes { return 15 } + internal static var directionalEdges: ConstraintAttributes { return 58 } + internal static var size: ConstraintAttributes { return 192 } + internal static var center: ConstraintAttributes { return 768 } + + @available(iOS 8.0, *) + internal static var margins: ConstraintAttributes { return 61440 } + + @available(iOS 8.0, *) + internal static var directionalMargins: ConstraintAttributes { return 245760 } + + @available(iOS 8.0, *) + internal static var centerWithinMargins: ConstraintAttributes { return 786432 } + + 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/Example/Pods/SnapKit/Source/ConstraintConfig.swift b/Example/Pods/SnapKit/Source/ConstraintConfig.swift new file mode 100644 index 0000000..2746b7d --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/ConstraintConstantTarget.swift b/Example/Pods/SnapKit/Source/ConstraintConstantTarget.swift new file mode 100644 index 0000000..7f54907 --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/ConstraintDSL.swift b/Example/Pods/SnapKit/Source/ConstraintDSL.swift new file mode 100644 index 0000000..ecc5173 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintDSL.swift @@ -0,0 +1,194 @@ +// +// 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 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, message:"Use .lastBaseline instead") + public var baseline: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.lastBaseline) + } + + @available(iOS 8.0, OSX 10.11, *) + public var lastBaseline: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.lastBaseline) + } + + @available(iOS 8.0, OSX 10.11, *) + public var firstBaseline: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.firstBaseline) + } + + // MARK: Margins + + @available(iOS 8.0, *) + public var leftMargin: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.leftMargin) + } + + @available(iOS 8.0, *) + public var topMargin: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.topMargin) + } + + @available(iOS 8.0, *) + public var rightMargin: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.rightMargin) + } + + @available(iOS 8.0, *) + public var bottomMargin: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.bottomMargin) + } + + @available(iOS 8.0, *) + public var leadingMargin: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.leadingMargin) + } + + @available(iOS 8.0, *) + public var trailingMargin: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.trailingMargin) + } + + @available(iOS 8.0, *) + public var centerXWithinMargins: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerXWithinMargins) + } + + @available(iOS 8.0, *) + public var centerYWithinMargins: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerYWithinMargins) + } + + @available(iOS 8.0, *) + public var margins: ConstraintItem { + return ConstraintItem(target: self.target, attributes: ConstraintAttributes.margins) + } + + @available(iOS 8.0, *) + public var 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/Example/Pods/SnapKit/Source/ConstraintDescription.swift b/Example/Pods/SnapKit/Source/ConstraintDescription.swift new file mode 100644 index 0000000..3521f9f --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/ConstraintDirectionalInsetTarget.swift b/Example/Pods/SnapKit/Source/ConstraintDirectionalInsetTarget.swift new file mode 100644 index 0000000..955aec3 --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/ConstraintDirectionalInsets.swift b/Example/Pods/SnapKit/Source/ConstraintDirectionalInsets.swift new file mode 100644 index 0000000..ada8ed5 --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/ConstraintInsetTarget.swift b/Example/Pods/SnapKit/Source/ConstraintInsetTarget.swift new file mode 100644 index 0000000..ba8a0f3 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintInsetTarget.swift @@ -0,0 +1,72 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public protocol ConstraintInsetTarget: ConstraintConstantTarget { +} + +extension Int: ConstraintInsetTarget { +} + +extension UInt: ConstraintInsetTarget { +} + +extension Float: ConstraintInsetTarget { +} + +extension Double: ConstraintInsetTarget { +} + +extension CGFloat: ConstraintInsetTarget { +} + +extension ConstraintInsets: ConstraintInsetTarget { +} + +extension ConstraintInsetTarget { + + internal var constraintInsetTargetValue: ConstraintInsets { + if let amount = self as? ConstraintInsets { + return amount + } else if let amount = self as? Float { + return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) + } else if let amount = self as? Double { + return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) + } else if let amount = self as? CGFloat { + return ConstraintInsets(top: amount, left: amount, bottom: amount, right: amount) + } else if let amount = self as? Int { + return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) + } else if let amount = self as? UInt { + return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) + } else { + return ConstraintInsets(top: 0, left: 0, bottom: 0, right: 0) + } + } + +} diff --git a/Example/Pods/SnapKit/Source/ConstraintInsets.swift b/Example/Pods/SnapKit/Source/ConstraintInsets.swift new file mode 100644 index 0000000..738ca05 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintInsets.swift @@ -0,0 +1,35 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +#if os(iOS) || os(tvOS) + public typealias ConstraintInsets = UIEdgeInsets +#else + public typealias ConstraintInsets = NSEdgeInsets +#endif diff --git a/Example/Pods/SnapKit/Source/ConstraintItem.swift b/Example/Pods/SnapKit/Source/ConstraintItem.swift new file mode 100644 index 0000000..a342c1d --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift b/Example/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift new file mode 100644 index 0000000..d429e0c --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/ConstraintLayoutGuide.swift b/Example/Pods/SnapKit/Source/ConstraintLayoutGuide.swift new file mode 100644 index 0000000..e3e50c8 --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift b/Example/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift new file mode 100644 index 0000000..0007819 --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/ConstraintLayoutSupport.swift b/Example/Pods/SnapKit/Source/ConstraintLayoutSupport.swift new file mode 100644 index 0000000..e92e9fb --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintLayoutSupport.swift @@ -0,0 +1,36 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +#if os(iOS) || os(tvOS) + @available(iOS 8.0, *) + public typealias ConstraintLayoutSupport = UILayoutSupport +#else + public class ConstraintLayoutSupport {} +#endif diff --git a/Example/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift b/Example/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift new file mode 100644 index 0000000..5d6ae89 --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/ConstraintMaker.swift b/Example/Pods/SnapKit/Source/ConstraintMaker.swift new file mode 100644 index 0000000..38f4d31 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintMaker.swift @@ -0,0 +1,212 @@ +// +// 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, message:"Use lastBaseline instead") + 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 directionalEdges: ConstraintMakerExtendable { + return self.makeExtendableWithAttributes(.directionalEdges) + } + 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) + } + + private 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/Example/Pods/SnapKit/Source/ConstraintMakerEditable.swift b/Example/Pods/SnapKit/Source/ConstraintMakerEditable.swift new file mode 100644 index 0000000..f768a17 --- /dev/null +++ b/Example/Pods/SnapKit/Source/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: ConstraintMakerPriortizable { + + @discardableResult + public func multipliedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable { + self.description.multiplier = amount + return self + } + + @discardableResult + public func dividedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable { + return self.multipliedBy(1.0 / amount.constraintMultiplierTargetValue) + } + + @discardableResult + public func offset(_ amount: ConstraintOffsetTarget) -> ConstraintMakerEditable { + self.description.constant = amount.constraintOffsetTargetValue + return self + } + + @discardableResult + public func inset(_ amount: ConstraintInsetTarget) -> ConstraintMakerEditable { + self.description.constant = amount.constraintInsetTargetValue + return self + } + + #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/Example/Pods/SnapKit/Source/ConstraintMakerExtendable.swift b/Example/Pods/SnapKit/Source/ConstraintMakerExtendable.swift new file mode 100644 index 0000000..ce47169 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintMakerExtendable.swift @@ -0,0 +1,179 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public 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, message:"Use lastBaseline instead") + public var baseline: ConstraintMakerExtendable { + self.description.attributes += .lastBaseline + return self + } + + public var lastBaseline: ConstraintMakerExtendable { + self.description.attributes += .lastBaseline + return self + } + + @available(iOS 8.0, OSX 10.11, *) + public var firstBaseline: ConstraintMakerExtendable { + self.description.attributes += .firstBaseline + return self + } + + @available(iOS 8.0, *) + public var leftMargin: ConstraintMakerExtendable { + self.description.attributes += .leftMargin + return self + } + + @available(iOS 8.0, *) + public var rightMargin: ConstraintMakerExtendable { + self.description.attributes += .rightMargin + return self + } + + @available(iOS 8.0, *) + public var 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 directionalEdges: ConstraintMakerExtendable { + self.description.attributes += .directionalEdges + 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/Example/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift b/Example/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift new file mode 100644 index 0000000..4e1379e --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift @@ -0,0 +1,49 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public class ConstraintMakerFinalizable { + + internal let description: ConstraintDescription + + internal init(_ description: ConstraintDescription) { + self.description = description + } + + @discardableResult + public func labeled(_ label: String) -> ConstraintMakerFinalizable { + self.description.label = label + return self + } + + public var constraint: Constraint { + return self.description.constraint! + } + +} diff --git a/Example/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift b/Example/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift new file mode 100644 index 0000000..e0d452d --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift @@ -0,0 +1,68 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public class ConstraintMakerPriortizable: ConstraintMakerFinalizable { + + @discardableResult + public func priority(_ amount: 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/Example/Pods/SnapKit/Source/ConstraintMakerRelatable.swift b/Example/Pods/SnapKit/Source/ConstraintMakerRelatable.swift new file mode 100644 index 0000000..7889532 --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift b/Example/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift new file mode 100644 index 0000000..6fecd33 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift @@ -0,0 +1,75 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public protocol ConstraintMultiplierTarget { + + var constraintMultiplierTargetValue: CGFloat { get } + +} + +extension Int: ConstraintMultiplierTarget { + + public var constraintMultiplierTargetValue: CGFloat { + return CGFloat(self) + } + +} + +extension UInt: ConstraintMultiplierTarget { + + public var constraintMultiplierTargetValue: CGFloat { + return CGFloat(self) + } + +} + +extension Float: ConstraintMultiplierTarget { + + public var constraintMultiplierTargetValue: CGFloat { + return CGFloat(self) + } + +} + +extension Double: ConstraintMultiplierTarget { + + public var constraintMultiplierTargetValue: CGFloat { + return CGFloat(self) + } + +} + +extension CGFloat: ConstraintMultiplierTarget { + + public var constraintMultiplierTargetValue: CGFloat { + return self + } + +} diff --git a/Example/Pods/SnapKit/Source/ConstraintOffsetTarget.swift b/Example/Pods/SnapKit/Source/ConstraintOffsetTarget.swift new file mode 100644 index 0000000..bd9e0a1 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintOffsetTarget.swift @@ -0,0 +1,69 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public protocol ConstraintOffsetTarget: ConstraintConstantTarget { +} + +extension Int: ConstraintOffsetTarget { +} + +extension UInt: ConstraintOffsetTarget { +} + +extension Float: ConstraintOffsetTarget { +} + +extension Double: ConstraintOffsetTarget { +} + +extension CGFloat: ConstraintOffsetTarget { +} + +extension ConstraintOffsetTarget { + + internal var constraintOffsetTargetValue: CGFloat { + let offset: CGFloat + if let amount = self as? Float { + offset = CGFloat(amount) + } else if let amount = self as? Double { + offset = CGFloat(amount) + } else if let amount = self as? CGFloat { + offset = CGFloat(amount) + } else if let amount = self as? Int { + offset = CGFloat(amount) + } else if let amount = self as? UInt { + offset = CGFloat(amount) + } else { + offset = 0.0 + } + return offset + } + +} diff --git a/Example/Pods/SnapKit/Source/ConstraintPriority.swift b/Example/Pods/SnapKit/Source/ConstraintPriority.swift new file mode 100644 index 0000000..f9dab16 --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/ConstraintPriorityTarget.swift b/Example/Pods/SnapKit/Source/ConstraintPriorityTarget.swift new file mode 100644 index 0000000..064f750 --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/ConstraintRelatableTarget.swift b/Example/Pods/SnapKit/Source/ConstraintRelatableTarget.swift new file mode 100644 index 0000000..d517a61 --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/ConstraintRelation.swift b/Example/Pods/SnapKit/Source/ConstraintRelation.swift new file mode 100644 index 0000000..446aaf7 --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/ConstraintView+Extensions.swift b/Example/Pods/SnapKit/Source/ConstraintView+Extensions.swift new file mode 100644 index 0000000..a4898dc --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintView+Extensions.swift @@ -0,0 +1,152 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public extension ConstraintView { + + @available(*, deprecated, message:"Use newer snp.* syntax.") + var snp_left: ConstraintItem { return self.snp.left } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + var snp_top: ConstraintItem { return self.snp.top } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + var snp_right: ConstraintItem { return self.snp.right } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + var snp_bottom: ConstraintItem { return self.snp.bottom } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + var snp_leading: ConstraintItem { return self.snp.leading } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + var snp_trailing: ConstraintItem { return self.snp.trailing } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + var snp_width: ConstraintItem { return self.snp.width } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + var snp_height: ConstraintItem { return self.snp.height } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + var snp_centerX: ConstraintItem { return self.snp.centerX } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + var snp_centerY: ConstraintItem { return self.snp.centerY } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + var snp_baseline: ConstraintItem { return self.snp.baseline } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + @available(iOS 8.0, OSX 10.11, *) + var snp_lastBaseline: ConstraintItem { return self.snp.lastBaseline } + + @available(iOS, deprecated, message:"Use newer snp.* syntax.") + @available(iOS 8.0, OSX 10.11, *) + var snp_firstBaseline: ConstraintItem { return self.snp.firstBaseline } + + @available(iOS, deprecated, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + var snp_leftMargin: ConstraintItem { return self.snp.leftMargin } + + @available(iOS, deprecated, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + var snp_topMargin: ConstraintItem { return self.snp.topMargin } + + @available(iOS, deprecated, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + var snp_rightMargin: ConstraintItem { return self.snp.rightMargin } + + @available(iOS, deprecated, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + var snp_bottomMargin: ConstraintItem { return self.snp.bottomMargin } + + @available(iOS, deprecated, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + var snp_leadingMargin: ConstraintItem { return self.snp.leadingMargin } + + @available(iOS, deprecated, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + var snp_trailingMargin: ConstraintItem { return self.snp.trailingMargin } + + @available(iOS, deprecated, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + var snp_centerXWithinMargins: ConstraintItem { return self.snp.centerXWithinMargins } + + @available(iOS, deprecated, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + var snp_centerYWithinMargins: ConstraintItem { return self.snp.centerYWithinMargins } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + var snp_edges: ConstraintItem { return self.snp.edges } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + var snp_size: ConstraintItem { return self.snp.size } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + var snp_center: ConstraintItem { return self.snp.center } + + @available(iOS, deprecated, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + var snp_margins: ConstraintItem { return self.snp.margins } + + @available(iOS, deprecated, message:"Use newer snp.* syntax.") + @available(iOS 8.0, *) + var snp_centerWithinMargins: ConstraintItem { return self.snp.centerWithinMargins } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + func snp_prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { + return self.snp.prepareConstraints(closure) + } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + func snp_makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + self.snp.makeConstraints(closure) + } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + func snp_remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + self.snp.remakeConstraints(closure) + } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + func snp_updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + self.snp.updateConstraints(closure) + } + + @available(*, deprecated, message:"Use newer snp.* syntax.") + func snp_removeConstraints() { + self.snp.removeConstraints() + } + + var snp: ConstraintViewDSL { + return ConstraintViewDSL(view: self) + } + +} diff --git a/Example/Pods/SnapKit/Source/ConstraintView.swift b/Example/Pods/SnapKit/Source/ConstraintView.swift new file mode 100644 index 0000000..6ff8a76 --- /dev/null +++ b/Example/Pods/SnapKit/Source/ConstraintView.swift @@ -0,0 +1,35 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +#if os(iOS) || os(tvOS) + public typealias ConstraintView = UIView +#else + public typealias ConstraintView = NSView +#endif diff --git a/Example/Pods/SnapKit/Source/ConstraintViewDSL.swift b/Example/Pods/SnapKit/Source/ConstraintViewDSL.swift new file mode 100644 index 0000000..a0187f9 --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/Debugging.swift b/Example/Pods/SnapKit/Source/Debugging.swift new file mode 100644 index 0000000..a78579a --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/LayoutConstraint.swift b/Example/Pods/SnapKit/Source/LayoutConstraint.swift new file mode 100644 index 0000000..5425ea8 --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/LayoutConstraintItem.swift b/Example/Pods/SnapKit/Source/LayoutConstraintItem.swift new file mode 100644 index 0000000..a59de6b --- /dev/null +++ b/Example/Pods/SnapKit/Source/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: class { +} + +@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/Example/Pods/SnapKit/Source/Typealiases.swift b/Example/Pods/SnapKit/Source/Typealiases.swift new file mode 100644 index 0000000..ded96cc --- /dev/null +++ b/Example/Pods/SnapKit/Source/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/Example/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift b/Example/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift new file mode 100644 index 0000000..8e7644c --- /dev/null +++ b/Example/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift @@ -0,0 +1,36 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#if os(iOS) || os(tvOS) + import UIKit +#endif + + +@available(iOS 8.0, *) +public extension ConstraintLayoutSupport { + + var snp: ConstraintLayoutSupportDSL { + return ConstraintLayoutSupportDSL(support: self) + } + +} diff --git a/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-Info.plist b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-acknowledgements.markdown new file mode 100644 index 0000000..abfdf6f --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-acknowledgements.markdown @@ -0,0 +1,49 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## RHViewStateKit + +Copyright (c) 2021 bagusandinata + +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. + + +## 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/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-acknowledgements.plist new file mode 100644 index 0000000..d98df2d --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-acknowledgements.plist @@ -0,0 +1,87 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2021 bagusandinata <bagus.dinata@erajaya.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + License + MIT + Title + RHViewStateKit + 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/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-dummy.m b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-dummy.m new file mode 100644 index 0000000..cbd23dd --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_RHViewStateKit_Example : NSObject +@end +@implementation PodsDummy_Pods_RHViewStateKit_Example +@end diff --git a/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-frameworks.sh new file mode 100755 index 0000000..f8f2861 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-frameworks.sh @@ -0,0 +1,187 @@ +#!/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="${DT_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 "${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. + 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}/RHViewStateKit/RHViewStateKit.framework" + install_framework "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/RHViewStateKit/RHViewStateKit.framework" + install_framework "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-umbrella.h b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-umbrella.h new file mode 100644 index 0000000..c1e69e0 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-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_RHViewStateKit_ExampleVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_RHViewStateKit_ExampleVersionString[]; + diff --git a/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example.debug.xcconfig new file mode 100644 index 0000000..19bbc18 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example.debug.xcconfig @@ -0,0 +1,14 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RHViewStateKit" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RHViewStateKit/RHViewStateKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_LDFLAGS = $(inherited) -framework "RHViewStateKit" -framework "SnapKit" -framework "UIKit" +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/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example.modulemap b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example.modulemap new file mode 100644 index 0000000..b3ca0d6 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example.modulemap @@ -0,0 +1,6 @@ +framework module Pods_RHViewStateKit_Example { + umbrella header "Pods-RHViewStateKit_Example-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example.release.xcconfig new file mode 100644 index 0000000..19bbc18 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example.release.xcconfig @@ -0,0 +1,14 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RHViewStateKit" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RHViewStateKit/RHViewStateKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_LDFLAGS = $(inherited) -framework "RHViewStateKit" -framework "SnapKit" -framework "UIKit" +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/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-Info.plist b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-acknowledgements.markdown new file mode 100644 index 0000000..102af75 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-acknowledgements.markdown @@ -0,0 +1,3 @@ +# Acknowledgements +This application makes use of the following third party libraries: +Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-acknowledgements.plist new file mode 100644 index 0000000..7acbad1 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-acknowledgements.plist @@ -0,0 +1,29 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-dummy.m b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-dummy.m new file mode 100644 index 0000000..043273b --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_RHViewStateKit_Tests : NSObject +@end +@implementation PodsDummy_Pods_RHViewStateKit_Tests +@end diff --git a/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-frameworks.sh b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-frameworks.sh new file mode 100755 index 0000000..7846a74 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-frameworks.sh @@ -0,0 +1,185 @@ +#!/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="${DT_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 "${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. + 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/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-umbrella.h b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-umbrella.h new file mode 100644 index 0000000..023cbaf --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests-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_RHViewStateKit_TestsVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_RHViewStateKit_TestsVersionString[]; + diff --git a/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests.debug.xcconfig new file mode 100644 index 0000000..61f96b4 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests.debug.xcconfig @@ -0,0 +1,11 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RHViewStateKit" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RHViewStateKit/RHViewStateKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "RHViewStateKit" -framework "SnapKit" -framework "UIKit" +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/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests.modulemap b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests.modulemap new file mode 100644 index 0000000..3873ddf --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests.modulemap @@ -0,0 +1,6 @@ +framework module Pods_RHViewStateKit_Tests { + umbrella header "Pods-RHViewStateKit_Tests-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests.release.xcconfig new file mode 100644 index 0000000..61f96b4 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests.release.xcconfig @@ -0,0 +1,11 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RHViewStateKit" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RHViewStateKit/RHViewStateKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "RHViewStateKit" -framework "SnapKit" -framework "UIKit" +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/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit-Info.plist b/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit-Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit-dummy.m b/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit-dummy.m new file mode 100644 index 0000000..9382622 --- /dev/null +++ b/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_RHViewStateKit : NSObject +@end +@implementation PodsDummy_RHViewStateKit +@end diff --git a/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit-prefix.pch b/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit-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/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit-umbrella.h b/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit-umbrella.h new file mode 100644 index 0000000..4f722b7 --- /dev/null +++ b/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit-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 RHViewStateKitVersionNumber; +FOUNDATION_EXPORT const unsigned char RHViewStateKitVersionString[]; + diff --git a/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit.debug.xcconfig b/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit.debug.xcconfig new file mode 100644 index 0000000..01b12bb --- /dev/null +++ b/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit.debug.xcconfig @@ -0,0 +1,14 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RHViewStateKit +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_LDFLAGS = $(inherited) -framework "UIKit" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. +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/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit.modulemap b/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit.modulemap new file mode 100644 index 0000000..3c77355 --- /dev/null +++ b/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit.modulemap @@ -0,0 +1,6 @@ +framework module RHViewStateKit { + umbrella header "RHViewStateKit-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit.release.xcconfig b/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit.release.xcconfig new file mode 100644 index 0000000..01b12bb --- /dev/null +++ b/Example/Pods/Target Support Files/RHViewStateKit/RHViewStateKit.release.xcconfig @@ -0,0 +1,14 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RHViewStateKit +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_LDFLAGS = $(inherited) -framework "UIKit" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. +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/Example/Pods/Target Support Files/SnapKit/SnapKit-Info.plist b/Example/Pods/Target Support Files/SnapKit/SnapKit-Info.plist new file mode 100644 index 0000000..8d87a1a --- /dev/null +++ b/Example/Pods/Target Support Files/SnapKit/SnapKit-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 5.0.1 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/SnapKit/SnapKit-dummy.m b/Example/Pods/Target Support Files/SnapKit/SnapKit-dummy.m new file mode 100644 index 0000000..b44e8e5 --- /dev/null +++ b/Example/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/Example/Pods/Target Support Files/SnapKit/SnapKit-prefix.pch b/Example/Pods/Target Support Files/SnapKit/SnapKit-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Example/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/Example/Pods/Target Support Files/SnapKit/SnapKit-umbrella.h b/Example/Pods/Target Support Files/SnapKit/SnapKit-umbrella.h new file mode 100644 index 0000000..1b1be64 --- /dev/null +++ b/Example/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/Example/Pods/Target Support Files/SnapKit/SnapKit.debug.xcconfig b/Example/Pods/Target Support Files/SnapKit/SnapKit.debug.xcconfig new file mode 100644 index 0000000..39fc265 --- /dev/null +++ b/Example/Pods/Target Support Files/SnapKit/SnapKit.debug.xcconfig @@ -0,0 +1,12 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapKit +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_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/Example/Pods/Target Support Files/SnapKit/SnapKit.modulemap b/Example/Pods/Target Support Files/SnapKit/SnapKit.modulemap new file mode 100644 index 0000000..4b3e47b --- /dev/null +++ b/Example/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/Example/Pods/Target Support Files/SnapKit/SnapKit.release.xcconfig b/Example/Pods/Target Support Files/SnapKit/SnapKit.release.xcconfig new file mode 100644 index 0000000..39fc265 --- /dev/null +++ b/Example/Pods/Target Support Files/SnapKit/SnapKit.release.xcconfig @@ -0,0 +1,12 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapKit +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_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/Example/RHViewStateKit.xcodeproj/project.pbxproj b/Example/RHViewStateKit.xcodeproj/project.pbxproj new file mode 100644 index 0000000..600d0ba --- /dev/null +++ b/Example/RHViewStateKit.xcodeproj/project.pbxproj @@ -0,0 +1,665 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 490E648926A31CD8002A10DE /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 490E648726A31CD8002A10DE /* MainViewController.swift */; }; + 490E649C26A4A4F7002A10DE /* Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 490E649B26A4A4F7002A10DE /* Extension.swift */; }; + 492AB04F26A80B9E00D17413 /* ItemTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 492AB04E26A80B9E00D17413 /* ItemTableViewCell.swift */; }; + 492AB05426A810FB00D17413 /* ExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 492AB05226A810FB00D17413 /* ExampleViewController.swift */; }; + 492AB07926A9DB4A00D17413 /* EAnimationBallPulseSync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 492AB07526A9DB4A00D17413 /* EAnimationBallPulseSync.swift */; }; + 492AB07A26A9DB4A00D17413 /* EAnimationMultipleBallClipRotate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 492AB07626A9DB4A00D17413 /* EAnimationMultipleBallClipRotate.swift */; }; + 492AB07B26A9DB4A00D17413 /* EActivityIndicatorShape.swift in Sources */ = {isa = PBXBuildFile; fileRef = 492AB07726A9DB4A00D17413 /* EActivityIndicatorShape.swift */; }; + 492AB07C26A9DB4A00D17413 /* EActivityIndicatorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 492AB07826A9DB4A00D17413 /* EActivityIndicatorView.swift */; }; + 493F4A3426AC95550061908A /* ExampleTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 493F4A3226AC95550061908A /* ExampleTableViewController.swift */; }; + 493F4A3726AD9E710061908A /* TableViewState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 493F4A3626AD9E710061908A /* TableViewState.swift */; }; + 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; + 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; + 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; + 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; + 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; + 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; + 62F627B7F4C23D82293F5C42 /* Pods_RHViewStateKit_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F133B3CCEA0B2A20CBC37096 /* Pods_RHViewStateKit_Tests.framework */; }; + 8E22708FD33F281591F4368A /* Pods_RHViewStateKit_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4209A5818EE8209B92690FC /* Pods_RHViewStateKit_Example.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 607FACC81AFB9204008FA782 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 607FACCF1AFB9204008FA782; + remoteInfo = RHViewStateKit; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 001FD45FAAB3AFBC1A67B500 /* Pods-RHViewStateKit_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RHViewStateKit_Tests.release.xcconfig"; path = "Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests.release.xcconfig"; sourceTree = ""; }; + 337DFFC6C6456878C47388A3 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; + 33F508E0EC66F41123858D78 /* Pods-RHViewStateKit_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RHViewStateKit_Example.debug.xcconfig"; path = "Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example.debug.xcconfig"; sourceTree = ""; }; + 490E648726A31CD8002A10DE /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = ""; }; + 490E649B26A4A4F7002A10DE /* Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extension.swift; sourceTree = ""; }; + 492AB04E26A80B9E00D17413 /* ItemTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemTableViewCell.swift; sourceTree = ""; }; + 492AB05226A810FB00D17413 /* ExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleViewController.swift; sourceTree = ""; }; + 492AB05A26A876E700D17413 /* SnapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SnapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 492AB05E26A8770B00D17413 /* SnapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SnapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 492AB07526A9DB4A00D17413 /* EAnimationBallPulseSync.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EAnimationBallPulseSync.swift; sourceTree = ""; }; + 492AB07626A9DB4A00D17413 /* EAnimationMultipleBallClipRotate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EAnimationMultipleBallClipRotate.swift; sourceTree = ""; }; + 492AB07726A9DB4A00D17413 /* EActivityIndicatorShape.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EActivityIndicatorShape.swift; sourceTree = ""; }; + 492AB07826A9DB4A00D17413 /* EActivityIndicatorView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EActivityIndicatorView.swift; sourceTree = ""; }; + 493F4A3226AC95550061908A /* ExampleTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleTableViewController.swift; sourceTree = ""; }; + 493F4A3626AD9E710061908A /* TableViewState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableViewState.swift; sourceTree = ""; }; + 57FD731DBBD4D687A98418C9 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; + 607FACD01AFB9204008FA782 /* RHViewStateKit_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RHViewStateKit_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 607FACE51AFB9204008FA782 /* RHViewStateKit_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RHViewStateKit_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; + 6C6FB6924C3664A3EA390738 /* Pods-RHViewStateKit_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RHViewStateKit_Example.release.xcconfig"; path = "Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example.release.xcconfig"; sourceTree = ""; }; + B44C3412625A37BDC56B8E93 /* Pods-RHViewStateKit_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RHViewStateKit_Tests.debug.xcconfig"; path = "Target Support Files/Pods-RHViewStateKit_Tests/Pods-RHViewStateKit_Tests.debug.xcconfig"; sourceTree = ""; }; + B4D194DF5CAB382C3999B4A4 /* RHViewStateKit.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = RHViewStateKit.podspec; path = ../RHViewStateKit.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + E4209A5818EE8209B92690FC /* Pods_RHViewStateKit_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RHViewStateKit_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F133B3CCEA0B2A20CBC37096 /* Pods_RHViewStateKit_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RHViewStateKit_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 607FACCD1AFB9204008FA782 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8E22708FD33F281591F4368A /* Pods_RHViewStateKit_Example.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 607FACE21AFB9204008FA782 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 62F627B7F4C23D82293F5C42 /* Pods_RHViewStateKit_Tests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 016D142B3F336A43DE2E2F58 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 492AB05E26A8770B00D17413 /* SnapKit.framework */, + 492AB05A26A876E700D17413 /* SnapKit.framework */, + E4209A5818EE8209B92690FC /* Pods_RHViewStateKit_Example.framework */, + F133B3CCEA0B2A20CBC37096 /* Pods_RHViewStateKit_Tests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 1491A4723A5A4D7FBB475C03 /* Pods */ = { + isa = PBXGroup; + children = ( + 33F508E0EC66F41123858D78 /* Pods-RHViewStateKit_Example.debug.xcconfig */, + 6C6FB6924C3664A3EA390738 /* Pods-RHViewStateKit_Example.release.xcconfig */, + B44C3412625A37BDC56B8E93 /* Pods-RHViewStateKit_Tests.debug.xcconfig */, + 001FD45FAAB3AFBC1A67B500 /* Pods-RHViewStateKit_Tests.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 490E648626A31CC4002A10DE /* Main */ = { + isa = PBXGroup; + children = ( + 490E648726A31CD8002A10DE /* MainViewController.swift */, + 492AB04E26A80B9E00D17413 /* ItemTableViewCell.swift */, + ); + path = Main; + sourceTree = ""; + }; + 492AB05126A810BC00D17413 /* ExampleUIViewContoller */ = { + isa = PBXGroup; + children = ( + 492AB05226A810FB00D17413 /* ExampleViewController.swift */, + ); + path = ExampleUIViewContoller; + sourceTree = ""; + }; + 492AB07426A9DADC00D17413 /* Animation */ = { + isa = PBXGroup; + children = ( + 492AB07726A9DB4A00D17413 /* EActivityIndicatorShape.swift */, + 492AB07826A9DB4A00D17413 /* EActivityIndicatorView.swift */, + 492AB07526A9DB4A00D17413 /* EAnimationBallPulseSync.swift */, + 492AB07626A9DB4A00D17413 /* EAnimationMultipleBallClipRotate.swift */, + ); + path = Animation; + sourceTree = ""; + }; + 493F4A3126AC95320061908A /* ExampleTableView */ = { + isa = PBXGroup; + children = ( + 493F4A3226AC95550061908A /* ExampleTableViewController.swift */, + 493F4A3626AD9E710061908A /* TableViewState.swift */, + ); + path = ExampleTableView; + sourceTree = ""; + }; + 607FACC71AFB9204008FA782 = { + isa = PBXGroup; + children = ( + 607FACF51AFB993E008FA782 /* Podspec Metadata */, + 607FACD21AFB9204008FA782 /* Example for RHViewStateKit */, + 607FACE81AFB9204008FA782 /* Tests */, + 607FACD11AFB9204008FA782 /* Products */, + 1491A4723A5A4D7FBB475C03 /* Pods */, + 016D142B3F336A43DE2E2F58 /* Frameworks */, + ); + sourceTree = ""; + }; + 607FACD11AFB9204008FA782 /* Products */ = { + isa = PBXGroup; + children = ( + 607FACD01AFB9204008FA782 /* RHViewStateKit_Example.app */, + 607FACE51AFB9204008FA782 /* RHViewStateKit_Tests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 607FACD21AFB9204008FA782 /* Example for RHViewStateKit */ = { + isa = PBXGroup; + children = ( + 493F4A3126AC95320061908A /* ExampleTableView */, + 492AB07426A9DADC00D17413 /* Animation */, + 492AB05126A810BC00D17413 /* ExampleUIViewContoller */, + 490E648626A31CC4002A10DE /* Main */, + 490E649B26A4A4F7002A10DE /* Extension.swift */, + 607FACD51AFB9204008FA782 /* AppDelegate.swift */, + 607FACD71AFB9204008FA782 /* ViewController.swift */, + 607FACD91AFB9204008FA782 /* Main.storyboard */, + 607FACDC1AFB9204008FA782 /* Images.xcassets */, + 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, + 607FACD31AFB9204008FA782 /* Supporting Files */, + ); + name = "Example for RHViewStateKit"; + path = RHViewStateKit; + sourceTree = ""; + }; + 607FACD31AFB9204008FA782 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 607FACD41AFB9204008FA782 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 607FACE81AFB9204008FA782 /* Tests */ = { + isa = PBXGroup; + children = ( + 607FACEB1AFB9204008FA782 /* Tests.swift */, + 607FACE91AFB9204008FA782 /* Supporting Files */, + ); + path = Tests; + sourceTree = ""; + }; + 607FACE91AFB9204008FA782 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 607FACEA1AFB9204008FA782 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { + isa = PBXGroup; + children = ( + B4D194DF5CAB382C3999B4A4 /* RHViewStateKit.podspec */, + 337DFFC6C6456878C47388A3 /* README.md */, + 57FD731DBBD4D687A98418C9 /* LICENSE */, + ); + name = "Podspec Metadata"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 607FACCF1AFB9204008FA782 /* RHViewStateKit_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "RHViewStateKit_Example" */; + buildPhases = ( + C13A9CB954ED80C5ABD8A9C6 /* [CP] Check Pods Manifest.lock */, + 607FACCC1AFB9204008FA782 /* Sources */, + 607FACCD1AFB9204008FA782 /* Frameworks */, + 607FACCE1AFB9204008FA782 /* Resources */, + 967A1534A54CA771DDF22643 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = RHViewStateKit_Example; + productName = RHViewStateKit; + productReference = 607FACD01AFB9204008FA782 /* RHViewStateKit_Example.app */; + productType = "com.apple.product-type.application"; + }; + 607FACE41AFB9204008FA782 /* RHViewStateKit_Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "RHViewStateKit_Tests" */; + buildPhases = ( + 69ADEF2A189E81032BC8E85C /* [CP] Check Pods Manifest.lock */, + 607FACE11AFB9204008FA782 /* Sources */, + 607FACE21AFB9204008FA782 /* Frameworks */, + 607FACE31AFB9204008FA782 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 607FACE71AFB9204008FA782 /* PBXTargetDependency */, + ); + name = RHViewStateKit_Tests; + productName = Tests; + productReference = 607FACE51AFB9204008FA782 /* RHViewStateKit_Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 607FACC81AFB9204008FA782 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0830; + LastUpgradeCheck = 0830; + ORGANIZATIONNAME = CocoaPods; + TargetAttributes = { + 607FACCF1AFB9204008FA782 = { + CreatedOnToolsVersion = 6.3.1; + DevelopmentTeam = B5DSNG9A4N; + LastSwiftMigration = 0900; + }; + 607FACE41AFB9204008FA782 = { + CreatedOnToolsVersion = 6.3.1; + DevelopmentTeam = B5DSNG9A4N; + LastSwiftMigration = 0900; + TestTargetID = 607FACCF1AFB9204008FA782; + }; + }; + }; + buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "RHViewStateKit" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 607FACC71AFB9204008FA782; + productRefGroup = 607FACD11AFB9204008FA782 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 607FACCF1AFB9204008FA782 /* RHViewStateKit_Example */, + 607FACE41AFB9204008FA782 /* RHViewStateKit_Tests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 607FACCE1AFB9204008FA782 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, + 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, + 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 607FACE31AFB9204008FA782 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 69ADEF2A189E81032BC8E85C /* [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-RHViewStateKit_Tests-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; + }; + 967A1534A54CA771DDF22643 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/RHViewStateKit/RHViewStateKit.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RHViewStateKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RHViewStateKit_Example/Pods-RHViewStateKit_Example-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + C13A9CB954ED80C5ABD8A9C6 /* [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-RHViewStateKit_Example-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; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 607FACCC1AFB9204008FA782 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 493F4A3426AC95550061908A /* ExampleTableViewController.swift in Sources */, + 490E648926A31CD8002A10DE /* MainViewController.swift in Sources */, + 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, + 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, + 492AB07B26A9DB4A00D17413 /* EActivityIndicatorShape.swift in Sources */, + 492AB05426A810FB00D17413 /* ExampleViewController.swift in Sources */, + 492AB04F26A80B9E00D17413 /* ItemTableViewCell.swift in Sources */, + 492AB07C26A9DB4A00D17413 /* EActivityIndicatorView.swift in Sources */, + 492AB07A26A9DB4A00D17413 /* EAnimationMultipleBallClipRotate.swift in Sources */, + 492AB07926A9DB4A00D17413 /* EAnimationBallPulseSync.swift in Sources */, + 490E649C26A4A4F7002A10DE /* Extension.swift in Sources */, + 493F4A3726AD9E710061908A /* TableViewState.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 607FACE11AFB9204008FA782 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 607FACCF1AFB9204008FA782 /* RHViewStateKit_Example */; + targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 607FACD91AFB9204008FA782 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 607FACDA1AFB9204008FA782 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 607FACDF1AFB9204008FA782 /* Base */, + ); + name = LaunchScreen.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 607FACED1AFB9204008FA782 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + 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_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + 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 = 11.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 607FACEE1AFB9204008FA782 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + 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_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + 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 = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 607FACF01AFB9204008FA782 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33F508E0EC66F41123858D78 /* Pods-RHViewStateKit_Example.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = B5DSNG9A4N; + INFOPLIST_FILE = RHViewStateKit/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0; + MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; + }; + name = Debug; + }; + 607FACF11AFB9204008FA782 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6C6FB6924C3664A3EA390738 /* Pods-RHViewStateKit_Example.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = B5DSNG9A4N; + INFOPLIST_FILE = RHViewStateKit/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0; + MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; + }; + name = Release; + }; + 607FACF31AFB9204008FA782 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B44C3412625A37BDC56B8E93 /* Pods-RHViewStateKit_Tests.debug.xcconfig */; + buildSettings = { + DEVELOPMENT_TEAM = B5DSNG9A4N; + FRAMEWORK_SEARCH_PATHS = ( + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RHViewStateKit_Example.app/RHViewStateKit_Example"; + }; + name = Debug; + }; + 607FACF41AFB9204008FA782 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 001FD45FAAB3AFBC1A67B500 /* Pods-RHViewStateKit_Tests.release.xcconfig */; + buildSettings = { + DEVELOPMENT_TEAM = B5DSNG9A4N; + FRAMEWORK_SEARCH_PATHS = ( + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + "$(inherited)", + ); + INFOPLIST_FILE = Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RHViewStateKit_Example.app/RHViewStateKit_Example"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "RHViewStateKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 607FACED1AFB9204008FA782 /* Debug */, + 607FACEE1AFB9204008FA782 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "RHViewStateKit_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 607FACF01AFB9204008FA782 /* Debug */, + 607FACF11AFB9204008FA782 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "RHViewStateKit_Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 607FACF31AFB9204008FA782 /* Debug */, + 607FACF41AFB9204008FA782 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 607FACC81AFB9204008FA782 /* Project object */; +} diff --git a/Example/RHViewStateKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/RHViewStateKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..4b68e87 --- /dev/null +++ b/Example/RHViewStateKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Example/RHViewStateKit.xcodeproj/xcshareddata/xcschemes/RHViewStateKit-Example.xcscheme b/Example/RHViewStateKit.xcodeproj/xcshareddata/xcschemes/RHViewStateKit-Example.xcscheme new file mode 100644 index 0000000..7d7354a --- /dev/null +++ b/Example/RHViewStateKit.xcodeproj/xcshareddata/xcschemes/RHViewStateKit-Example.xcscheme @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/RHViewStateKit.xcworkspace/contents.xcworkspacedata b/Example/RHViewStateKit.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..edcd63e --- /dev/null +++ b/Example/RHViewStateKit.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Example/RHViewStateKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/RHViewStateKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Example/RHViewStateKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/RHViewStateKit/Animation/EActivityIndicatorShape.swift b/Example/RHViewStateKit/Animation/EActivityIndicatorShape.swift new file mode 100644 index 0000000..8d61a18 --- /dev/null +++ b/Example/RHViewStateKit/Animation/EActivityIndicatorShape.swift @@ -0,0 +1,75 @@ +// +// EActivityIndicatorShape.swift +// app +// +// Created by Bagus andinata on 18/02/21. +// Copyright © 2021 wit. All rights reserved. +// + +// Copy and Edit partially from https://github.com/ninjaprox/NVActivityIndicatorView + +import UIKit + +enum EActivityIndicatorShape { + case circle + case ringTwoHalfVertical + case ringTwoHalfHorizontal + + func layerWith(size: CGSize, color: UIColor) -> CALayer { + let layer: CAShapeLayer = CAShapeLayer() + let path: UIBezierPath = UIBezierPath() + let lineWidth: CGFloat = 2 + + switch self { + case .circle: + path.addArc(withCenter: CGPoint(x: size.width / 2, y: size.height / 2), + radius: size.width / 2, + startAngle: 0, + endAngle: CGFloat(2 * Double.pi), + clockwise: false) + layer.fillColor = color.cgColor + case .ringTwoHalfVertical: + path.addArc(withCenter: CGPoint(x: size.width / 2, y: size.height / 2), + radius: size.width / 2, + startAngle: CGFloat(-3 * Double.pi / 4), + endAngle: CGFloat(-Double.pi / 4), + clockwise: true) + path.move( + to: CGPoint(x: size.width / 2 - size.width / 2 * cos(CGFloat(Double.pi / 4)), + y: size.height / 2 + size.height / 2 * sin(CGFloat(Double.pi / 4))) + ) + path.addArc(withCenter: CGPoint(x: size.width / 2, y: size.height / 2), + radius: size.width / 2, + startAngle: CGFloat(-5 * Double.pi / 4), + endAngle: CGFloat(-7 * Double.pi / 4), + clockwise: false) + layer.fillColor = nil + layer.strokeColor = color.cgColor + layer.lineWidth = lineWidth + case .ringTwoHalfHorizontal: + path.addArc(withCenter: CGPoint(x: size.width / 2, y: size.height / 2), + radius: size.width / 2, + startAngle: CGFloat(3 * Double.pi / 4), + endAngle: CGFloat(5 * Double.pi / 4), + clockwise: true) + path.move( + to: CGPoint(x: size.width / 2 + size.width / 2 * cos(CGFloat(Double.pi / 4)), + y: size.height / 2 - size.height / 2 * sin(CGFloat(Double.pi / 4))) + ) + path.addArc(withCenter: CGPoint(x: size.width / 2, y: size.height / 2), + radius: size.width / 2, + startAngle: CGFloat(-Double.pi / 4), + endAngle: CGFloat(Double.pi / 4), + clockwise: true) + layer.fillColor = nil + layer.strokeColor = color.cgColor + layer.lineWidth = lineWidth + } + + layer.backgroundColor = nil + layer.path = path.cgPath + layer.frame = CGRect(x: 0, y: 0, width: size.width, height: size.height) + + return layer + } +} diff --git a/Example/RHViewStateKit/Animation/EActivityIndicatorView.swift b/Example/RHViewStateKit/Animation/EActivityIndicatorView.swift new file mode 100644 index 0000000..0445c9a --- /dev/null +++ b/Example/RHViewStateKit/Animation/EActivityIndicatorView.swift @@ -0,0 +1,167 @@ +// +// EActivityIndicatorView.swift +// app +// +// Created by Bagus andinata on 18/02/21. +// Copyright © 2021 wit. All rights reserved. +// + +// Copy and Edit partially from https://github.com/ninjaprox/NVActivityIndicatorView + +import UIKit +import RHViewStateKit + +protocol EActivityIndicatorAnimationDelegate { + func setUpAnimation(in layer: CALayer, size: CGSize, color: UIColor) +} + +public enum EActivityIndicatorType: CaseIterable { + case ballClipRotateMultiple + case ballPulseSync + + func animation() -> EActivityIndicatorAnimationDelegate { + switch self { + case .ballClipRotateMultiple: + return EAnimationMultipleBallClipRotate() + case .ballPulseSync: + return EAnimationBallPulseSync() + } + } +} + +public typealias FadeInAnimation = (UIView) -> Void + +public typealias FadeOutAnimation = (UIView, @escaping () -> Void) -> Void + +public final class EActivityIndicatorView: RHLoadingView { + + public static var DEFAULT_TYPE: EActivityIndicatorType = .ballClipRotateMultiple + + public static var DEFAULT_COLOR = UIColor.white + + public static var DEFAULT_TEXT_COLOR = UIColor.white + + public static var DEFAULT_PADDING: CGFloat = 0 + + public static var DEFAULT_BLOCKER_SIZE = CGSize(width: 60, height: 60) + + public static var DEFAULT_BLOCKER_DISPLAY_TIME_THRESHOLD = 0 + + public static var DEFAULT_BLOCKER_MINIMUM_DISPLAY_TIME = 0 + + public static var DEFAULT_BLOCKER_MESSAGE: String? + + public static var DEFAULT_BLOCKER_MESSAGE_SPACING = CGFloat(8.0) + + public static var DEFAULT_BLOCKER_MESSAGE_FONT = UIFont.boldSystemFont(ofSize: 20) + + public static var DEFAULT_BLOCKER_BACKGROUND_COLOR = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5) + + public static var DEFAULT_FADE_IN_ANIMATION: FadeInAnimation = { view in + view.alpha = 0 + UIView.animate(withDuration: 0.25) { + view.alpha = 1 + } + } + + public static var DEFAULT_FADE_OUT_ANIMATION: FadeOutAnimation = { (view, complete) in + UIView.animate(withDuration: 0.25, + animations: { + view.alpha = 0 + }, + completion: { completed in + if completed { + complete() + } + }) + } + + public var type: EActivityIndicatorType = EActivityIndicatorView.DEFAULT_TYPE + + @available(*, unavailable, message: "This property is reserved for Interface Builder. Use 'type' instead.") + @IBInspectable var typeName: String { + get { + return getTypeName() + } + set { + _setTypeName(newValue) + } + } + + @IBInspectable public var color: UIColor = EActivityIndicatorView.DEFAULT_COLOR + + @IBInspectable public var padding: CGFloat = EActivityIndicatorView.DEFAULT_PADDING + + @available(*, deprecated) + public var animating: Bool { return isAnimating } + + private(set) public var isAnimating: Bool = false + + public required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + backgroundColor = UIColor.clear + isHidden = true + } + + public init(frame: CGRect, type: EActivityIndicatorType? = nil, color: UIColor? = nil, padding: CGFloat? = nil) { + self.type = type ?? EActivityIndicatorView.DEFAULT_TYPE + self.color = color ?? EActivityIndicatorView.DEFAULT_COLOR + self.padding = padding ?? EActivityIndicatorView.DEFAULT_PADDING + super.init(frame: frame) + isHidden = true + } + + public override var intrinsicContentSize: CGSize { + return CGSize(width: bounds.width, height: bounds.height) + } + + public override var bounds: CGRect { + didSet { + if oldValue != bounds && isAnimating { + setUpAnimation() + } + } + } + + public override func startAnimating() { + guard !isAnimating else { + return + } + isHidden = false + isAnimating = true + layer.speed = 1 + setUpAnimation() + } + + public override func stopAnimating() { + guard isAnimating else { + return + } + isHidden = true + isAnimating = false + layer.sublayers?.removeAll() + } + + func _setTypeName(_ typeName: String) { + for item in EActivityIndicatorType.allCases { + if String(describing: item).caseInsensitiveCompare(typeName) == ComparisonResult.orderedSame { + type = item + break + } + } + } + + func getTypeName() -> String { + return String(describing: type) + } + + private final func setUpAnimation() { + let animation: EActivityIndicatorAnimationDelegate = type.animation() + var animationRect = UIEdgeInsetsInsetRect(frame, UIEdgeInsets(top: padding, left: padding, bottom: padding, right: padding)) + let minEdge = min(animationRect.width, animationRect.height) + + layer.sublayers = nil + animationRect.size = CGSize(width: minEdge, height: minEdge) + animation.setUpAnimation(in: layer, size: animationRect.size, color: color) + } +} diff --git a/Example/RHViewStateKit/Animation/EAnimationBallPulseSync.swift b/Example/RHViewStateKit/Animation/EAnimationBallPulseSync.swift new file mode 100644 index 0000000..060dc31 --- /dev/null +++ b/Example/RHViewStateKit/Animation/EAnimationBallPulseSync.swift @@ -0,0 +1,50 @@ +// +// EAnimationBallPulseSync.swift +// app +// +// Created by Bagus andinata on 02/03/21. +// Copyright © 2021 wit. All rights reserved. +// + +// Copy and Edit partially from https://github.com/ninjaprox/NVActivityIndicatorView + +import UIKit + +class EAnimationBallPulseSync: EActivityIndicatorAnimationDelegate { + + func setUpAnimation(in layer: CALayer, size: CGSize, color: UIColor) { + let circleSpacing: CGFloat = 2 + let circleSize = (size.width - circleSpacing * 2) / 3 + let x = (layer.bounds.size.width - size.width) / 2 + let y = (layer.bounds.size.height - circleSize) / 2 + let deltaY = (size.height / 2 - circleSize / 2) / 2 + let duration: CFTimeInterval = 0.6 + let beginTime = CACurrentMediaTime() + let beginTimes: [CFTimeInterval] = [0.07, 0.14, 0.21] + let timingFunciton = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut) + + // Animation + let animation = CAKeyframeAnimation(keyPath: "transform.translation.y") + + animation.keyTimes = [0, 0.33, 0.66, 1] + animation.timingFunctions = [timingFunciton, timingFunciton, timingFunciton] + animation.values = [0, deltaY, -deltaY, 0] + animation.duration = duration + animation.repeatCount = HUGE + animation.isRemovedOnCompletion = false + + // Draw circles + for i in 0 ..< 3 { + let circle = EActivityIndicatorShape.circle.layerWith(size: CGSize(width: circleSize, height: circleSize), color: color) + let frame = CGRect(x: x + circleSize * CGFloat(i) + circleSpacing * CGFloat(i), + y: y, + width: circleSize, + height: circleSize) + + animation.beginTime = beginTime + beginTimes[i] + circle.frame = frame + circle.add(animation, forKey: "animation") + layer.addSublayer(circle) + } + } +} diff --git a/Example/RHViewStateKit/Animation/EAnimationMultipleBallClipRotate.swift b/Example/RHViewStateKit/Animation/EAnimationMultipleBallClipRotate.swift new file mode 100644 index 0000000..99bff51 --- /dev/null +++ b/Example/RHViewStateKit/Animation/EAnimationMultipleBallClipRotate.swift @@ -0,0 +1,76 @@ +// +// EAnimationMultipleBallClipRotate.swift +// app +// +// Created by Bagus andinata on 18/02/21. +// Copyright © 2021 wit. All rights reserved. +// + +// Copy and Edit partially from https://github.com/ninjaprox/NVActivityIndicatorView + +import UIKit + +class EAnimationMultipleBallClipRotate: EActivityIndicatorAnimationDelegate { + + func setUpAnimation(in layer: CALayer, size: CGSize, color: UIColor) { + let bigCircleSize: CGFloat = size.width + let smallCircleSize: CGFloat = size.width / 2 + let longDuration: CFTimeInterval = 1 + let timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut) + + circleOf(shape: .ringTwoHalfHorizontal, + duration: longDuration, + timingFunction: timingFunction, + layer: layer, + size: bigCircleSize, + color: UIColor.init(hex: "#11074E"), reverse: false) + circleOf(shape: .ringTwoHalfVertical, + duration: longDuration, + timingFunction: timingFunction, + layer: layer, + size: smallCircleSize, + color: UIColor.init(hex: "#F4991D"), reverse: true) + } + + func createAnimationIn(duration: CFTimeInterval, timingFunction: CAMediaTimingFunction, reverse: Bool) -> CAAnimation { + let scaleAnimation = CAKeyframeAnimation(keyPath: "transform.scale") + + scaleAnimation.keyTimes = [0, 0.5, 1] + scaleAnimation.timingFunctions = [timingFunction, timingFunction] + scaleAnimation.values = [1, 0.6, 1] + scaleAnimation.duration = duration + + let rotateAnimation = CAKeyframeAnimation(keyPath: "transform.rotation.z") + + rotateAnimation.keyTimes = scaleAnimation.keyTimes + rotateAnimation.timingFunctions = [timingFunction, timingFunction] + if !reverse { + rotateAnimation.values = [0, Double.pi, 2 * Double.pi] + } else { + rotateAnimation.values = [0, -Double.pi, -2 * Double.pi] + } + rotateAnimation.duration = duration + + let animation = CAAnimationGroup() + + animation.animations = [scaleAnimation, rotateAnimation] + animation.duration = duration + animation.repeatCount = HUGE + animation.isRemovedOnCompletion = false + + return animation + } + + func circleOf(shape: EActivityIndicatorShape, duration: CFTimeInterval, timingFunction: CAMediaTimingFunction, layer: CALayer, size: CGFloat, color: UIColor, reverse: Bool) { + let circle = shape.layerWith(size: CGSize(width: size, height: size), color: color) + let frame = CGRect(x: (layer.bounds.size.width - size) / 2, + y: (layer.bounds.size.height - size) / 2, + width: size, + height: size) + let animation = createAnimationIn(duration: duration, timingFunction: timingFunction, reverse: reverse) + + circle.frame = frame + circle.add(animation, forKey: "animation") + layer.addSublayer(circle) + } +} diff --git a/Example/RHViewStateKit/AppDelegate.swift b/Example/RHViewStateKit/AppDelegate.swift new file mode 100644 index 0000000..0920759 --- /dev/null +++ b/Example/RHViewStateKit/AppDelegate.swift @@ -0,0 +1,49 @@ +// +// AppDelegate.swift +// RHViewStateKit +// +// Created by bagusandinata on 07/17/2021. +// Copyright (c) 2021 bagusandinata. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window?.rootViewController = UINavigationController(rootViewController: MainViewController()) + window?.makeKeyAndVisible() + + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/Example/RHViewStateKit/Base.lproj/LaunchScreen.xib b/Example/RHViewStateKit/Base.lproj/LaunchScreen.xib new file mode 100644 index 0000000..99ae82d --- /dev/null +++ b/Example/RHViewStateKit/Base.lproj/LaunchScreen.xib @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/RHViewStateKit/Base.lproj/Main.storyboard b/Example/RHViewStateKit/Base.lproj/Main.storyboard new file mode 100644 index 0000000..7a5a8aa --- /dev/null +++ b/Example/RHViewStateKit/Base.lproj/Main.storyboard @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/RHViewStateKit/ExampleTableView/ExampleTableViewController.swift b/Example/RHViewStateKit/ExampleTableView/ExampleTableViewController.swift new file mode 100644 index 0000000..ebdf774 --- /dev/null +++ b/Example/RHViewStateKit/ExampleTableView/ExampleTableViewController.swift @@ -0,0 +1,125 @@ +// +// ExampleTableViewController.swift +// RHViewStateKit +// +// Created by Bagus andinata on 25/07/21. +// Copyright (c) 2021 All rights reserved. +// Template by BagusAnDinata +// + +import UIKit +import RHViewStateKit + +class ExampleTableViewController: UIViewController { + //MARK: - PROPERTY + private let tableView: UITableView = { + let view = UITableView() + view.register(ItemTableViewCell.self, forCellReuseIdentifier: "ItemTableViewCell") + return view + }() + + lazy var reloadButton: UIBarButtonItem = { + let button = UIButton(frame: CGRect(origin: .zero, size: CGSize(width: 32, height: 32))) + button.setTitle("Reload", for: .normal) + button.setTitleColor(.blue, for: .normal) + button.addTarget(self, action: #selector(reloadTapped), for: .touchUpInside) + button.contentHorizontalAlignment = .right + let barButton = UIBarButtonItem(customView: button) + return barButton + }() + + private struct TableContent { + var state: TableViewState + var title: String + var description: String + } + + private var content: [TableContent] { + return [TableContent(state: .EmptyData, title: "Empty data", description: "example empty data"), + TableContent(state: .InternalError, title: "Internal Error", description: "example internal error"), + TableContent(state: .Maintenance, title: "Maintenance", description: "example maintenance"), + TableContent(state: .NoInternet, title: "No Internet", description: "example no internet"),] + } + + //MARK: - UIVIEWCONTROLLER LIFECYLE + override func loadView() { + super.loadView() + + view.backgroundColor = .white + + view.addSubview(tableView) + tableView.dataSource = self + tableView.delegate = self + + var configLoading = RHLoadingConfiguration() + configLoading.backgroundColor = .black.withAlphaComponent(0.5) + configLoading.color = .red + tableView.viewState.delegate = self + tableView.viewState.loading = configLoading + + configureConstraints() + configureNavBar() + } + + override func viewDidLoad() { + super.viewDidLoad() + + } + + //MARK: - METHOD + private func configureConstraints() { + tableView.snp.makeConstraints { make in + make.edges.equalTo(view.safeAreaLayoutGuide).inset(UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)) + } + } + + private func configureNavBar() { + navigationItem.title = "RHViewStateKit" + navigationItem.backButtonTitle = "" + navigationItem.rightBarButtonItem = reloadButton + navigationController?.navigationBar.titleTextAttributes = [ + NSAttributedString.Key.foregroundColor: UIColor.black] + navigationController?.navigationBar.isTranslucent = false + navigationController?.navigationBar.backgroundColor = .white + navigationController?.navigationBar.tintColor = .black + } + + //MARK: - ACTION + @objc + private func reloadTapped() { + tableView.viewState.hide() + } +} + +extension ExampleTableViewController: RHViewStateDelegate { + func viewState(_ viewState: RHViewState, didTapButton button: UIButton) { + viewState.hide() + } +} + +extension ExampleTableViewController: UITableViewDataSource, UITableViewDelegate { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return content.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + guard let cell = tableView.dequeueReusableCell(withIdentifier: "ItemTableViewCell") as? ItemTableViewCell else { + return UITableViewCell() + } + + cell.titleLabel.text = content[indexPath.row].title + cell.descriptionLabel.text = content[indexPath.row].description + cell.arrowRight.isHidden = false + + return cell + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + tableView.viewState.showLoader() + DispatchQueue.main.asyncAfter(deadline: .now()+2.0) { [weak self] in + guard let `self` = self else { return } + self.tableView.viewState.hideLoader() + self.tableView.viewState.show(self.content[indexPath.row].state) + } + } +} diff --git a/Example/RHViewStateKit/ExampleTableView/TableViewState.swift b/Example/RHViewStateKit/ExampleTableView/TableViewState.swift new file mode 100644 index 0000000..1efbcf3 --- /dev/null +++ b/Example/RHViewStateKit/ExampleTableView/TableViewState.swift @@ -0,0 +1,173 @@ +// +// TableViewState.swift +// RHViewStateKit_Example +// +// Created by Bagus andinata on 25/07/21. +// Copyright © 2021 CocoaPods. All rights reserved. +// + +import Foundation +import RHViewStateKit + +enum TableViewState: RHViewCollectionState { + case NoInternet + case EmptyData + case InternalError + case Maintenance + + var image: UIImage? { + switch self { + case .NoInternet: + return UIImage(named: "ic-no-internet") + case .EmptyData: + return UIImage(named: "ic-empty-data") + case .InternalError: + return UIImage(named: "ic-internal-error") + case .Maintenance: + return UIImage(named: "ic-maintenance") + } + } + + var title: String? { + switch self { + case .NoInternet: + return "No Internet Connection" + case .EmptyData: + return "Oops! It's Empty" + case .InternalError: + return "Oops! Something Went Wrong" + case .Maintenance: + return "We'll Be Back Soon" + } + } + + var description: String? { + switch self { + case .NoInternet: + return "Try turning on your Wifi or Mobile Data for using the app" + case .EmptyData: + return "There are no products under this category right now" + case .InternalError: + return "Try to reload this page or feel free to contact us if the problem persists" + case .Maintenance: + return "App is down for scheduled maintenance and expect to back online in a few minutes" + } + } + + var titleButton: String? { + switch self { + case .NoInternet: + return "RETRY" + case .EmptyData: + return "" + case .InternalError: + return "RELOAD PAGE" + case .Maintenance: + return "" + } + } + + var viewConfiguration: RHViewConfiguration { + var config = RHViewConfiguration() + + switch self { + case .NoInternet: + config.backgroundColor = UIColor(hex: "#ffd600") + case .EmptyData: + config.backgroundColor = UIColor(hex: "#c6ff00") + case .InternalError: + config.backgroundColor = UIColor(hex: "#fbe9e7") + case .Maintenance: + config.backgroundColor = UIColor(hex: "#40c4ff") + config.verticalConstraint = 100 + } + + return config + } + + var buttonConfiguration: RHButtonConfiguration { + var config = RHButtonConfiguration() + + switch self { + case .NoInternet: + config.shadowRadius = 8 + config.titleInset = 16.0 + config.cornerType = .custom(radius: 5) + case .InternalError: + config.attributes = [.font: UIFont.boldSystemFont(ofSize: 12), .foregroundColor: UIColor.red] + config.color = .clear + config.borderWidth = 1.0 + config.borderColor = .red + config.width = 200.0 + config.cornerType = .capsule + default: + return config + } + + return config + } + + var titleConfiguration: RHTitleConfiguration { + var config = RHTitleConfiguration() + + switch self { + case .NoInternet: + config.attributes = [.font: UIFont.boldSystemFont(ofSize: 24), .foregroundColor: UIColor.white] + case .EmptyData: + return config + case .InternalError: + return config + case .Maintenance: + config.attributes = [.font: UIFont.boldSystemFont(ofSize: 16), .foregroundColor: UIColor.white] + } + + return config + } + + var descriptionConfiguration: RHDescriptionConfiguration { + var config = RHDescriptionConfiguration() + + switch self { + case .NoInternet: + config.attributes = [.font: UIFont.systemFont(ofSize: 16), .foregroundColor: UIColor.black] + case .EmptyData: + return config + case .InternalError: + return config + case .Maintenance: + config.attributes = [.font: UIFont.boldSystemFont(ofSize: 12), .foregroundColor: UIColor.white] + } + + return config + } + + var imageConfiguration: RHImageConfiguration { + var config = RHImageConfiguration() + + switch self { + case .NoInternet: + config.animation = .fade(0.3, 0.3) + case .EmptyData: + config.animation = .scale(0.3, 0.3) + case .InternalError: + config.animation = .noAnimation + case .Maintenance: + config.animation = .scale(0.3, 0.3) + } + + return config + } + + var positionConfiguration: RHPositionConfiguration { + switch self { + case .NoInternet: + return RHPositionConfiguration(view: .top, text: .center, image: .bottom) + case .EmptyData: + return RHPositionConfiguration(view: .center, text: .justify, image: .top) + case .InternalError: + return RHPositionConfiguration(view: .bottom, text: .right, image: .top) + case .Maintenance: + return RHPositionConfiguration(view: .bottom, text: .center, image: .cover(50.0, 50.0)) + } + } +} diff --git a/Example/RHViewStateKit/ExampleUIViewContoller/ExampleViewController.swift b/Example/RHViewStateKit/ExampleUIViewContoller/ExampleViewController.swift new file mode 100644 index 0000000..2c787fe --- /dev/null +++ b/Example/RHViewStateKit/ExampleUIViewContoller/ExampleViewController.swift @@ -0,0 +1,133 @@ +// +// ExampleViewController.swift +// RHViewStateKit +// +// Created by Bagus andinata on 21/07/21. +// Copyright (c) 2021 All rights reserved. +// Template by BagusAnDinata +// + +import UIKit +import RHViewStateKit + +fileprivate enum ViewControllerState: RHViewCollectionState { + case noInternet +} + +class ExampleViewController: UIViewController { + //MARK: - PROPERTY + private let content: UILabel = { + let view = UILabel() + view.numberOfLines = 0 + view.text = " Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum molestie, dolor eu ultricies tristique, lacus turpis vestibulum odio, at egestas nibh leo a est. Aenean bibendum ligula eros, sit amet ultricies nisi volutpat in. Aenean eget feugiat est, ac rhoncus justo. Integer vulputate lorem felis, vitae gravida mi consequat eu. Nunc volutpat id est eu pulvinar. Ut neque nisi, efficitur eu odio molestie, gravida posuere quam. Morbi consectetur id urna et dapibus. Nunc finibus vulputate lorem ut interdum. Cras convallis massa eros, ut pulvinar nisi consectetur eu. Aenean maximus laoreet velit, in auctor felis hendrerit vel. Mauris dapibus ultricies pellentesque. Suspendisse dignissim elit et tortor aliquet, cursus fermentum sapien volutpat. Duis metus ex, accumsan et sapien at, vulputate scelerisque nunc. Nam non enim ac lacus luctus convallis dignissim eu mauris. Curabitur eu tellus commodo libero sollicitudin placerat eget sit amet turpis. Sed dolor est, lacinia sed gravida ut, efficitur sit amet velit./nSed non gravida sapien. In feugiat rhoncus nisi, eu rutrum leo feugiat sed. Vestibulum semper maximus elementum. Nunc molestie libero urna, in aliquam felis eleifend et. Donec ante tortor, tempus non euismod quis, imperdiet ut urna. Integer mauris quam, consectetur ut sem vel, iaculis dapibus mauris. Donec orci neque, aliquet ac aliquet sit amet, elementum nec ipsum. Donec pretium eu nibh a tincidunt. Morbi blandit neque tortor, at egestas sem accumsan sed. Phasellus bibendum egestas euismod. Cras congue, velit sit amet lobortis dignissim, magna erat ullamcorper sapien, quis ullamcorper nunc urna sed tellus./nMaecenas in justo ac lectus tempus consectetur quis eget nulla. Sed ac tellus faucibus, ullamcorper ex vitae, blandit augue. Cras lectus risus, vestibulum at sapien a, egestas malesuada lorem. Nullam luctus nulla vitae commodo sollicitudin. Donec semper tortor in dapibus vestibulum. Pellentesque porttitor lacus massa, eu ultricies orci vestibulum nec. Ut est justo, aliquet nec blandit quis, luctus ullamcorper tellus. Etiam at congue odio. Nunc ac feugiat leo. Suspendisse potenti. Maecenas porta tortor justo, id ultrices quam elementum a. Donec condimentum venenatis dui. Cras in leo augue. Nam et arcu congue, finibus orci viverra, tempus tortor." + return view + }() + + lazy var reloadButton: UIBarButtonItem = { + let button = UIButton(frame: CGRect(origin: .zero, size: CGSize(width: 32, height: 32))) + button.setTitle("Reload", for: .normal) + button.setTitleColor(.blue, for: .normal) + button.addTarget(self, action: #selector(reloadTapped), for: .touchUpInside) + button.contentHorizontalAlignment = .right + let barButton = UIBarButtonItem(customView: button) + return barButton + }() + + //MARK: - UIVIEWCONTROLLER LIFECYLE + override func loadView() { + super.loadView() + + view.backgroundColor = .white + + view.addSubview(content) + + configureConstraints() + configureNavBar() + } + + override func viewDidLoad() { + super.viewDidLoad() + + let loadingSize = CGSize(width: 50, height: 50) + var configLoading = RHLoadingConfiguration() + configLoading.view = EActivityIndicatorView(frame: CGRect(origin: CGPoint(x: 0, y: 0), size: loadingSize), type: .ballPulseSync, color: UIColor.init(hex: "##ffd600")) + configLoading.size = loadingSize + view.viewState.loading = configLoading + view.viewState.delegate = self + view.viewState.dataSource = self + } + + //MARK: - METHOD + private func configureConstraints() { + content.snp.makeConstraints { make in + make.edges.equalTo(view.safeAreaLayoutGuide).inset(UIEdgeInsets(top: 16, left: 16, bottom: 16, right: 16)) + } + } + + private func configureNavBar() { + navigationItem.title = "UIViewController" + navigationItem.backButtonTitle = "" + navigationItem.rightBarButtonItem = reloadButton + navigationController?.navigationBar.titleTextAttributes = [ + NSAttributedString.Key.foregroundColor: UIColor.black] + navigationController?.navigationBar.isTranslucent = false + navigationController?.navigationBar.backgroundColor = .white + navigationController?.navigationBar.tintColor = .black + } + + //MARK: - ACTION + @objc + private func reloadTapped() { + view.viewState.showLoader() + DispatchQueue.main.asyncAfter(deadline: .now()+1.0) { [weak self] in + self?.view.viewState.hideLoader() + self?.view.viewState.show(ViewControllerState.noInternet) + } + } +} + +extension ExampleViewController: RHViewStateDelegate { + func viewState(_ viewState: RHViewState, didTapButton button: UIButton) { + view.viewState.hide() + } +} + +extension ExampleViewController: RHViewStateDataSource { + func rhPositionConfiguration(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> RHPositionConfiguration { + return RHPositionConfiguration(view: .center, text: .center, image: .top) + } + + func rhButtonConfiguration(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> RHButtonConfiguration { + var config = RHButtonConfiguration() + config.color = .clear + config.attributes = [.font: UIFont.boldSystemFont(ofSize: 16), .foregroundColor: UIColor.red] + return config + } + + func imageForState(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> UIImage? { + switch state as! ViewControllerState { + case .noInternet: + return UIImage(named: "ic-no-internet") + } + } + + func titleForState(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> String? { + switch state as! ViewControllerState { + case .noInternet: + return "No Internet Connection" + } + } + + func descriptionForState(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> String? { + switch state as! ViewControllerState { + case .noInternet: + return "Try turning on your WIFI or Mobile Data for using the app" + } + } + + func titleButtonForState(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> String? { + switch state as! ViewControllerState { + case .noInternet: return "Retry" + } + } +} diff --git a/Example/RHViewStateKit/Extension.swift b/Example/RHViewStateKit/Extension.swift new file mode 100644 index 0000000..aaf0e98 --- /dev/null +++ b/Example/RHViewStateKit/Extension.swift @@ -0,0 +1,45 @@ +// +// Extension.swift +// RHViewStateKit_Example +// +// Created by Bagus andinata on 19/07/21. +// Copyright © 2021 CocoaPods. All rights reserved. +// + +import UIKit + +extension UIColor { + public convenience init(hex: String) { + var r: CGFloat = 0 + var g: CGFloat = 0 + var b: CGFloat = 0 + var a: CGFloat = 1 + + let hexColor = hex.replacingOccurrences(of: "#", with: "") + let scanner = Scanner(string: hexColor) + var hexNumber: UInt64 = 0 + var valid = false + + if scanner.scanHexInt64(&hexNumber) { + if hexColor.count == 8 { + r = CGFloat((hexNumber & 0xff000000) >> 24) / 255 + g = CGFloat((hexNumber & 0x00ff0000) >> 16) / 255 + b = CGFloat((hexNumber & 0x0000ff00) >> 8) / 255 + a = CGFloat(hexNumber & 0x000000ff) / 255 + valid = true + } + else if hexColor.count == 6 { + r = CGFloat((hexNumber & 0xff0000) >> 16) / 255 + g = CGFloat((hexNumber & 0x00ff00) >> 8) / 255 + b = CGFloat(hexNumber & 0x0000ff) / 255 + valid = true + } + } + + #if DEBUG + assert(valid, "UIColor initialized with invalid hex string") + #endif + + self.init(red: r, green: g, blue: b, alpha: a) + } +} diff --git a/Example/RHViewStateKit/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/RHViewStateKit/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..8121323 --- /dev/null +++ b/Example/RHViewStateKit/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,53 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/RHViewStateKit/Images.xcassets/Contents.json b/Example/RHViewStateKit/Images.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Example/RHViewStateKit/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/RHViewStateKit/Images.xcassets/ic-arrow-right.imageset/Contents.json b/Example/RHViewStateKit/Images.xcassets/ic-arrow-right.imageset/Contents.json new file mode 100644 index 0000000..5b465b6 --- /dev/null +++ b/Example/RHViewStateKit/Images.xcassets/ic-arrow-right.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Vector 3.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Vector 3@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Vector 3@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/RHViewStateKit/Images.xcassets/ic-arrow-right.imageset/Vector 3.png b/Example/RHViewStateKit/Images.xcassets/ic-arrow-right.imageset/Vector 3.png new file mode 100644 index 0000000..abdf2ab Binary files /dev/null and b/Example/RHViewStateKit/Images.xcassets/ic-arrow-right.imageset/Vector 3.png differ diff --git a/Example/RHViewStateKit/Images.xcassets/ic-arrow-right.imageset/Vector 3@2x.png b/Example/RHViewStateKit/Images.xcassets/ic-arrow-right.imageset/Vector 3@2x.png new file mode 100644 index 0000000..8ba603c Binary files /dev/null and b/Example/RHViewStateKit/Images.xcassets/ic-arrow-right.imageset/Vector 3@2x.png differ diff --git a/Example/RHViewStateKit/Images.xcassets/ic-arrow-right.imageset/Vector 3@3x.png b/Example/RHViewStateKit/Images.xcassets/ic-arrow-right.imageset/Vector 3@3x.png new file mode 100644 index 0000000..22c7e85 Binary files /dev/null and b/Example/RHViewStateKit/Images.xcassets/ic-arrow-right.imageset/Vector 3@3x.png differ diff --git a/Example/RHViewStateKit/Images.xcassets/ic-empty-data.imageset/011-surprise 1.png b/Example/RHViewStateKit/Images.xcassets/ic-empty-data.imageset/011-surprise 1.png new file mode 100644 index 0000000..849de0d Binary files /dev/null and b/Example/RHViewStateKit/Images.xcassets/ic-empty-data.imageset/011-surprise 1.png differ diff --git a/Example/RHViewStateKit/Images.xcassets/ic-empty-data.imageset/011-surprise 1@2x.png b/Example/RHViewStateKit/Images.xcassets/ic-empty-data.imageset/011-surprise 1@2x.png new file mode 100644 index 0000000..780dab5 Binary files /dev/null and b/Example/RHViewStateKit/Images.xcassets/ic-empty-data.imageset/011-surprise 1@2x.png differ diff --git a/Example/RHViewStateKit/Images.xcassets/ic-empty-data.imageset/011-surprise 1@3x.png b/Example/RHViewStateKit/Images.xcassets/ic-empty-data.imageset/011-surprise 1@3x.png new file mode 100644 index 0000000..b93a155 Binary files /dev/null and b/Example/RHViewStateKit/Images.xcassets/ic-empty-data.imageset/011-surprise 1@3x.png differ diff --git a/Example/RHViewStateKit/Images.xcassets/ic-empty-data.imageset/Contents.json b/Example/RHViewStateKit/Images.xcassets/ic-empty-data.imageset/Contents.json new file mode 100644 index 0000000..9f2a183 --- /dev/null +++ b/Example/RHViewStateKit/Images.xcassets/ic-empty-data.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "011-surprise 1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "011-surprise 1@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "011-surprise 1@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/RHViewStateKit/Images.xcassets/ic-internal-error.imageset/022-workout 1.png b/Example/RHViewStateKit/Images.xcassets/ic-internal-error.imageset/022-workout 1.png new file mode 100644 index 0000000..c1f6d53 Binary files /dev/null and b/Example/RHViewStateKit/Images.xcassets/ic-internal-error.imageset/022-workout 1.png differ diff --git a/Example/RHViewStateKit/Images.xcassets/ic-internal-error.imageset/022-workout 1@2x.png b/Example/RHViewStateKit/Images.xcassets/ic-internal-error.imageset/022-workout 1@2x.png new file mode 100644 index 0000000..453fc16 Binary files /dev/null and b/Example/RHViewStateKit/Images.xcassets/ic-internal-error.imageset/022-workout 1@2x.png differ diff --git a/Example/RHViewStateKit/Images.xcassets/ic-internal-error.imageset/022-workout 1@3x.png b/Example/RHViewStateKit/Images.xcassets/ic-internal-error.imageset/022-workout 1@3x.png new file mode 100644 index 0000000..63f7eb3 Binary files /dev/null and b/Example/RHViewStateKit/Images.xcassets/ic-internal-error.imageset/022-workout 1@3x.png differ diff --git a/Example/RHViewStateKit/Images.xcassets/ic-internal-error.imageset/Contents.json b/Example/RHViewStateKit/Images.xcassets/ic-internal-error.imageset/Contents.json new file mode 100644 index 0000000..ecc3a73 --- /dev/null +++ b/Example/RHViewStateKit/Images.xcassets/ic-internal-error.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "022-workout 1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "022-workout 1@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "022-workout 1@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/RHViewStateKit/Images.xcassets/ic-maintenance.imageset/004-cauldron 1.png b/Example/RHViewStateKit/Images.xcassets/ic-maintenance.imageset/004-cauldron 1.png new file mode 100644 index 0000000..f5e605e Binary files /dev/null and b/Example/RHViewStateKit/Images.xcassets/ic-maintenance.imageset/004-cauldron 1.png differ diff --git a/Example/RHViewStateKit/Images.xcassets/ic-maintenance.imageset/004-cauldron 1@2x.png b/Example/RHViewStateKit/Images.xcassets/ic-maintenance.imageset/004-cauldron 1@2x.png new file mode 100644 index 0000000..cfb291e Binary files /dev/null and b/Example/RHViewStateKit/Images.xcassets/ic-maintenance.imageset/004-cauldron 1@2x.png differ diff --git a/Example/RHViewStateKit/Images.xcassets/ic-maintenance.imageset/004-cauldron 1@3x.png b/Example/RHViewStateKit/Images.xcassets/ic-maintenance.imageset/004-cauldron 1@3x.png new file mode 100644 index 0000000..70df690 Binary files /dev/null and b/Example/RHViewStateKit/Images.xcassets/ic-maintenance.imageset/004-cauldron 1@3x.png differ diff --git a/Example/RHViewStateKit/Images.xcassets/ic-maintenance.imageset/Contents.json b/Example/RHViewStateKit/Images.xcassets/ic-maintenance.imageset/Contents.json new file mode 100644 index 0000000..0c65754 --- /dev/null +++ b/Example/RHViewStateKit/Images.xcassets/ic-maintenance.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "004-cauldron 1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "004-cauldron 1@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "004-cauldron 1@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/RHViewStateKit/Images.xcassets/ic-no-internet.imageset/015-question 1.png b/Example/RHViewStateKit/Images.xcassets/ic-no-internet.imageset/015-question 1.png new file mode 100644 index 0000000..74a37e6 Binary files /dev/null and b/Example/RHViewStateKit/Images.xcassets/ic-no-internet.imageset/015-question 1.png differ diff --git a/Example/RHViewStateKit/Images.xcassets/ic-no-internet.imageset/015-question 1@2x.png b/Example/RHViewStateKit/Images.xcassets/ic-no-internet.imageset/015-question 1@2x.png new file mode 100644 index 0000000..8982cc1 Binary files /dev/null and b/Example/RHViewStateKit/Images.xcassets/ic-no-internet.imageset/015-question 1@2x.png differ diff --git a/Example/RHViewStateKit/Images.xcassets/ic-no-internet.imageset/015-question 1@3x.png b/Example/RHViewStateKit/Images.xcassets/ic-no-internet.imageset/015-question 1@3x.png new file mode 100644 index 0000000..7b308d2 Binary files /dev/null and b/Example/RHViewStateKit/Images.xcassets/ic-no-internet.imageset/015-question 1@3x.png differ diff --git a/Example/RHViewStateKit/Images.xcassets/ic-no-internet.imageset/Contents.json b/Example/RHViewStateKit/Images.xcassets/ic-no-internet.imageset/Contents.json new file mode 100644 index 0000000..b84c5c3 --- /dev/null +++ b/Example/RHViewStateKit/Images.xcassets/ic-no-internet.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "015-question 1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "015-question 1@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "015-question 1@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/RHViewStateKit/Info.plist b/Example/RHViewStateKit/Info.plist new file mode 100644 index 0000000..15c1bef --- /dev/null +++ b/Example/RHViewStateKit/Info.plist @@ -0,0 +1,39 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + + + diff --git a/Example/RHViewStateKit/Main/ItemTableViewCell.swift b/Example/RHViewStateKit/Main/ItemTableViewCell.swift new file mode 100644 index 0000000..14f1f65 --- /dev/null +++ b/Example/RHViewStateKit/Main/ItemTableViewCell.swift @@ -0,0 +1,78 @@ +// +// ItemTableViewCell.swift +// RHViewStateKit +// +// Created by Bagus andinata on 21/07/21. +// Copyright (c) 2021 All rights reserved. +// + +import UIKit + +final class ItemTableViewCell: UITableViewCell { + //MARK: - PROPERTY + let titleLabel: UILabel = { + let view = UILabel() + view.font = .boldSystemFont(ofSize: 18) + view.textColor = .black + view.numberOfLines = 1 + return view + }() + + let descriptionLabel: UILabel = { + let view = UILabel() + view.font = .systemFont(ofSize: 14) + view.textColor = .gray + view.numberOfLines = 1 + return view + }() + + let arrowRight: UIImageView = { + let view = UIImageView(image: UIImage(named: "ic-arrow-right")) + view.contentMode = .center + return view + }() + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + selectionStyle = .none + + contentView.addSubview(titleLabel) + contentView.addSubview(descriptionLabel) + contentView.addSubview(arrowRight) + + configureConstraints() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + //MARK: - METHODS + private func configureConstraints() { + titleLabel.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + titleLabel.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 8), + titleLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 16), + titleLabel.trailingAnchor.constraint(lessThanOrEqualTo: arrowRight.leadingAnchor, constant: -8) + ]) + + descriptionLabel.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + descriptionLabel.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 8), + descriptionLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 16), + descriptionLabel.trailingAnchor.constraint(lessThanOrEqualTo: arrowRight.leadingAnchor, constant: -8), + descriptionLabel.bottomAnchor.constraint(lessThanOrEqualTo: contentView.bottomAnchor, constant: -8) + ]) + + arrowRight.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + arrowRight.centerYAnchor.constraint(equalTo: contentView.centerYAnchor), + arrowRight.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -16), + arrowRight.widthAnchor.constraint(equalToConstant: 24), + arrowRight.heightAnchor.constraint(equalToConstant: 24) + ]) + } + + //MARK: - ACTION + +} diff --git a/Example/RHViewStateKit/Main/MainViewController.swift b/Example/RHViewStateKit/Main/MainViewController.swift new file mode 100644 index 0000000..6dedc2f --- /dev/null +++ b/Example/RHViewStateKit/Main/MainViewController.swift @@ -0,0 +1,101 @@ +// +// MainViewController.swift +// RHViewStateKit +// +// Created by Bagus andinata on 17/07/21. +// Copyright (c) 2021 All rights reserved. +// Template by BagusAnDinata +// + +import UIKit +import RHViewStateKit + +class MainViewController: UIViewController { + //MARK: - PROPERTY + private let tableView: UITableView = { + let view = UITableView() + view.register(ItemTableViewCell.self, forCellReuseIdentifier: "ItemTableViewCell") + return view + }() + + private struct MainContent { + var title: String + var description: String + } + + private var content: [MainContent] { + return [MainContent(title: "Using container UIViewController", description: "RHViewState implement in UIViewController"), + MainContent(title: "Using container UITableView", description: "RHViewState implement in UITableView"), + MainContent(title: "Using container UICollectionView", description: "RHViewState implement in UICollectionView")] + } + + //MARK: - UIVIEWCONTROLLER LIFECYLE + override func loadView() { + super.loadView() + + view.backgroundColor = .white + + view.addSubview(tableView) + tableView.dataSource = self + tableView.delegate = self + + configureConstraints() + configureNavBar() + } + + override func viewDidLoad() { + super.viewDidLoad() + + } + + //MARK: - METHOD + private func configureConstraints() { + tableView.snp.makeConstraints { make in + make.edges.equalTo(view.safeAreaLayoutGuide).inset(UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)) + } + } + + private func configureNavBar() { + navigationItem.title = "RHViewStateKit" + navigationItem.backButtonTitle = "" + navigationController?.navigationBar.titleTextAttributes = [ + NSAttributedString.Key.foregroundColor: UIColor.black] + navigationController?.navigationBar.isTranslucent = false + navigationController?.navigationBar.backgroundColor = .white + navigationController?.navigationBar.tintColor = .black + } + + //MARK: - ACTION +} + +extension MainViewController: UITableViewDataSource, UITableViewDelegate { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return content.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + guard let cell = tableView.dequeueReusableCell(withIdentifier: "ItemTableViewCell") as? ItemTableViewCell else { + return UITableViewCell() + } + + cell.titleLabel.text = content[indexPath.row].title + cell.descriptionLabel.text = content[indexPath.row].description + cell.arrowRight.isHidden = false + + return cell + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + switch indexPath.row { + case 0: + let vc = ExampleViewController() + navigationController?.pushViewController(vc, animated: true) + case 1: + let vc = ExampleTableViewController() + navigationController?.pushViewController(vc, animated: true) + default: + let vc = ExampleViewController() + navigationController?.pushViewController(vc, animated: true) + } + } +} diff --git a/Example/RHViewStateKit/ViewController.swift b/Example/RHViewStateKit/ViewController.swift new file mode 100644 index 0000000..5e20bb2 --- /dev/null +++ b/Example/RHViewStateKit/ViewController.swift @@ -0,0 +1,24 @@ +// +// ViewController.swift +// RHViewStateKit +// +// Created by bagusandinata on 07/17/2021. +// Copyright (c) 2021 bagusandinata. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + +} + diff --git a/Example/Tests/Info.plist b/Example/Tests/Info.plist new file mode 100644 index 0000000..ba72822 --- /dev/null +++ b/Example/Tests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/Example/Tests/Tests.swift b/Example/Tests/Tests.swift new file mode 100644 index 0000000..41d7549 --- /dev/null +++ b/Example/Tests/Tests.swift @@ -0,0 +1,28 @@ +import XCTest +import RHViewStateKit + +class Tests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + XCTAssert(true, "Pass") + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure() { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..75bfeb4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2021 bagusandinata + +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/RHViewStateKit.podspec b/RHViewStateKit.podspec new file mode 100644 index 0000000..0d83366 --- /dev/null +++ b/RHViewStateKit.podspec @@ -0,0 +1,24 @@ +# +# Be sure to run `pod lib lint RHViewStateKit.podspec' to ensure this is a +# valid spec before submitting. +# +# Any lines starting with a # are optional, but their use is encouraged +# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html +# + +Pod::Spec.new do |s| + s.name = 'RHViewStateKit' + s.version = '1.0.0' + s.summary = 'RHViewState provides fully customizable configuration to change state in your view' + s.platform = :ios + s.ios.deployment_target = '10.0' + s.swift_version = '5.1' + s.requires_arc = true + s.homepage = 'https://github.com/bagusandinata/RHViewStateKit' + s.license = { :type => 'MIT', :file => 'LICENSE' } + s.author = { 'bagusandinata' => 'bagusandinata@icloud.com' } + s.source = { :git => 'https://github.com/bagusandinata/RHViewStateKit.git', :tag => s.version.to_s } + s.frameworks = 'UIKit' + s.source_files = 'Source/*.swift' + s.dependency 'SnapKit', '5.0.1' +end diff --git a/Source/AssociationPolicy.swift b/Source/AssociationPolicy.swift new file mode 100644 index 0000000..47804aa --- /dev/null +++ b/Source/AssociationPolicy.swift @@ -0,0 +1,50 @@ +// +// AssociationPolicy.swift +// Pods-RHViewStateKit_Example +// +// Created by Bagus andinata on 18/07/21. +// + +import Foundation + +// Partially copy/pasted from https://github.com/jameslintaylor/AssociatedObjects/blob/master/AssociatedObjects/AssociatedObjects.swift +enum AssociationPolicy: UInt { + // raw values map to objc_AssociationPolicy's raw values + case assign = 0 + case copy = 771 + case copyNonatomic = 3 + case retain = 769 + case retainNonatomic = 1 + + var objc: objc_AssociationPolicy { + return objc_AssociationPolicy(rawValue: rawValue)! + } +} + +protocol AssociatedObjects: AnyObject { } + +// transparent wrappers +extension AssociatedObjects { + /// wrapper around `objc_getAssociatedObject` + func ao_get(pkey: UnsafeRawPointer) -> Any? { + return objc_getAssociatedObject(self, pkey) + } + + /// wrapper around `objc_setAssociatedObject` + func ao_setOptional(_ value: Any?, pkey: UnsafeRawPointer, policy: AssociationPolicy = .retainNonatomic) { + guard let value = value else { return } + objc_setAssociatedObject(self, pkey, value, policy.objc) + } + + /// wrapper around `objc_setAssociatedObject` + func ao_set(_ value: Any, pkey: UnsafeRawPointer, policy: AssociationPolicy = .retainNonatomic) { + objc_setAssociatedObject(self, pkey, value, policy.objc) + } + + /// wrapper around 'objc_removeAssociatedObjects' + func ao_removeAll() { + objc_removeAssociatedObjects(self) + } +} + +extension NSObject: AssociatedObjects { } diff --git a/Source/RHButtonConfiguration.swift b/Source/RHButtonConfiguration.swift new file mode 100644 index 0000000..f5d47f0 --- /dev/null +++ b/Source/RHButtonConfiguration.swift @@ -0,0 +1,51 @@ +// +// RHButtonConfiguration.swift +// Pods-RHViewStateKit_Example +// +// Created by Bagus andinata on 18/07/21. +// + +import UIKit + +public enum RHButtonCornerType { + case capsule + case custom(radius: CGFloat) + case none +} + +public struct RHButtonConfiguration { + /// Button attributes + public var attributes: [NSAttributedString.Key: Any] = [.font: UIFont.boldSystemFont(ofSize: 12), .foregroundColor: UIColor.white] + + /// Button color + public var color: UIColor = .red + + /// Button corner radius, default = 20 + public var cornerType: RHButtonCornerType = .custom(radius: 20) + + /// Button width, nil = auto + public var width: CGFloat? = nil + + /// Button height, default = 40 + public var height: CGFloat = 40 + + /// Button top constraint, default = 20 + public var topConstraint: CGFloat = 20 + + /// Button title inset, default = 8 + public var titleInset: CGFloat = 8 + + /// Button shadow radius, default = 0 + public var shadowRadius: CGFloat = 0 + + /// Button shadow opacity, defautl = 0.5 + public var shadowOpacity: Float = 0.5 + + /// Button border color, default = nil + public var borderColor: UIColor? = nil + + /// Button border width, default = 0 + public var borderWidth: CGFloat = 0 + + public init() {} +} diff --git a/Source/RHDefaultLoading.swift b/Source/RHDefaultLoading.swift new file mode 100644 index 0000000..72e9c18 --- /dev/null +++ b/Source/RHDefaultLoading.swift @@ -0,0 +1,63 @@ +// +// RHDefaultLoading.swift +// RHViewStateKit +// +// Created by Bagus andinata on 21/07/21. +// + +import UIKit +import SnapKit + +open class RHLoadingView: UIView { + /// Start loading animation + open func startAnimating() {} + + /// Stop loading animation + open func stopAnimating() {} + + /// Optional update UI loading animation + open func updateUI() {} +} + +class RHDefaultLoading: RHLoadingView { + private let indicator: UIActivityIndicatorView = { + let view = UIActivityIndicatorView(style: .gray) + return view + }() + + var color: UIColor = .gray { + didSet { + indicator.color = color + } + } + + override init(frame: CGRect) { + super.init(frame: frame) + + backgroundColor = .clear + + addSubview(indicator) + updateUI() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Methods + + override func updateUI() { + indicator.snp.remakeConstraints { make in + make.width.height.equalTo(20) + make.center.equalTo(self) + } + } + + override func startAnimating() { + indicator.startAnimating() + } + + override func stopAnimating() { + indicator.stopAnimating() + } +} diff --git a/Source/RHDefaultViewState.swift b/Source/RHDefaultViewState.swift new file mode 100644 index 0000000..a48f12e --- /dev/null +++ b/Source/RHDefaultViewState.swift @@ -0,0 +1,518 @@ +// +// RHDefaultViewState.swift +// Pods-RHViewStateKit_Example +// +// Created by Bagus andinata on 18/07/21. +// + +import UIKit +import SnapKit + +class RHDefaultViewState: UIView { + // MARK: - PROPERTY + private let messageView: UIView = { + let view = UIView() + return view + }() + + private let coverImageView: UIImageView = { + let view = UIImageView() + view.contentMode = .scaleAspectFit + return view + }() + + private let imageView: UIImageView = { + let view = UIImageView() + view.contentMode = .scaleAspectFit + return view + }() + + private let titleLabel: UILabel = { + let view = UILabel() + view.textAlignment = .center + view.numberOfLines = 0 + return view + }() + + private let descriptionLabel: UILabel = { + let view = UILabel() + view.textAlignment = .center + view.numberOfLines = 0 + return view + }() + + private let primaryButton: UIButton = { + let view = UIButton() + view.addTarget(self, action: #selector(didTapPrimaryButton(_:)), for: .touchUpInside) + return view + }() + + private var gradientLayer: CAGradientLayer? + + private var DEFAULT_CONTENT = RHContent() + + private var DEFAULT_CONFIGURATION_VIEW = RHViewConfiguration() + + private var DEFAULT_CONFIGURATION_BUTTON = RHButtonConfiguration() + + private var DEFAULT_CONFIGURATION_TITLE = RHTitleConfiguration() + + private var DEFAULT_CONFIGURATION_DESCRIPTION = RHDescriptionConfiguration() + + private var DEFAULT_CONFIGURATION_IMAGE = RHImageConfiguration() + + private var DEFAULT_CONFIGURATION_POSITION = RHPositionConfiguration() + + private var loadingView: RHLoadingView { + return loadingConfiguration.view + } + + var loadingConfiguration = RHLoadingConfiguration() { + didSet { + configureUILoading() + } + } + + var actionButton: ((UIButton)->())? + + // MARK: - Initialization + + override init(frame: CGRect) { + super.init(frame: frame) + + addSubviews(with: [coverImageView, messageView]) + messageView.addSubviews(with: [imageView, titleLabel, descriptionLabel, primaryButton]) + + configureUILoading() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - METHODS + + /* + - content : Data source for content + - configView : Data source for view configuration + - configButton : Data source for button configuration + - configTitle : Data source for title configuration + - configDescription : Data source for description configuration + - configImage : Data source for image configuration + - configPosition : Data source for position configuration + */ + func configureDataSource(content: RHContent, + configView: RHViewConfiguration, + configButton: RHButtonConfiguration, + configTitle: RHTitleConfiguration, + configDescription: RHDescriptionConfiguration, + configImage: RHImageConfiguration, + configPosition: RHPositionConfiguration) { + self.DEFAULT_CONTENT = content + self.DEFAULT_CONFIGURATION_VIEW = configView + self.DEFAULT_CONFIGURATION_BUTTON = configButton + self.DEFAULT_CONFIGURATION_TITLE = configTitle + self.DEFAULT_CONFIGURATION_DESCRIPTION = configDescription + self.DEFAULT_CONFIGURATION_IMAGE = configImage + self.DEFAULT_CONFIGURATION_POSITION = configPosition + + updateContent() + updateUI() + } + + // Update Content + private func updateContent() { + updateContentImage() + updateContentTitle() + updateContentDescription() + updateContentButton() + } + + // Update UI + private func updateUI() { + // Message configuration + messageView.alpha = DEFAULT_CONFIGURATION_VIEW.alpha + + updateUIImage() + updateUIButton() + updateUIBackground() + configurePosition(viewPosition: DEFAULT_CONFIGURATION_POSITION.view, + imagePosition: DEFAULT_CONFIGURATION_POSITION.image, + messagePosition: DEFAULT_CONFIGURATION_POSITION.text) + } + + /// Make text alignment from message position + fileprivate func makeTextAlignment(with messagePosition: RHTextPosition) -> NSTextAlignment { + switch messagePosition { + case .left: + return .left + case .right: + return .right + case .justify: + return .justified + default: + return .center + } + } + + //MARK: - ACTION + + @objc + private func didTapPrimaryButton(_ sender: UIButton) { + actionButton?(sender) + } +} + +//MARK: - Update Content + +extension RHDefaultViewState { + /// Update content image + fileprivate func updateContentImage() { + switch DEFAULT_CONFIGURATION_POSITION.image { + case .cover(_, _): + coverImageView.image = nil + coverImageView.image = DEFAULT_CONTENT.image + imageView.image = nil + imageView.isHidden = true + default: + coverImageView.image = nil + imageView.image = nil + imageView.image = DEFAULT_CONTENT.image + imageView.isHidden = false + } + } + + /// Update content title + fileprivate func updateContentTitle() { + if let title = DEFAULT_CONTENT.title { + titleLabel.isHidden = false + titleLabel.attributedText = NSAttributedString(string: title, attributes: DEFAULT_CONFIGURATION_TITLE.attributes) + } else { + titleLabel.isHidden = true + } + } + + /// Update content description + fileprivate func updateContentDescription() { + if let description = DEFAULT_CONTENT.description { + descriptionLabel.isHidden = false + descriptionLabel.attributedText = NSAttributedString(string: description, attributes: DEFAULT_CONFIGURATION_DESCRIPTION.attributes) + } else { + descriptionLabel.isHidden = true + } + } + + /// Update content primary button + fileprivate func updateContentButton() { + if let titleButton = DEFAULT_CONTENT.titleButton, + !titleButton.isEmpty { + primaryButton.isHidden = false + primaryButton.setAttributedTitle(NSAttributedString(string: titleButton, attributes: DEFAULT_CONFIGURATION_BUTTON.attributes), for: .normal) + } else { + primaryButton.isHidden = true + } + } +} + +//MARK: - Update UI + +extension RHDefaultViewState { + /// Update UI image + fileprivate func updateUIImage() { + if let imageTintColor = DEFAULT_CONFIGURATION_IMAGE.tintColor { + imageView.tintColor = imageTintColor + coverImageView.tintColor = imageTintColor + } else { + imageView.tintColor = .systemBlue + coverImageView.tintColor = .systemBlue + } + } + + /// Update UI button + fileprivate func updateUIButton() { + primaryButton.backgroundColor = DEFAULT_CONFIGURATION_BUTTON.color + primaryButton.layer.shadowColor = DEFAULT_CONFIGURATION_BUTTON.color.cgColor + primaryButton.layer.shadowOffset = CGSize(width: 0.0, height: 0) + primaryButton.layer.masksToBounds = false + primaryButton.layer.shadowRadius = DEFAULT_CONFIGURATION_BUTTON.shadowRadius + primaryButton.layer.shadowOpacity = DEFAULT_CONFIGURATION_BUTTON.shadowOpacity + primaryButton.layer.borderWidth = DEFAULT_CONFIGURATION_BUTTON.borderWidth + primaryButton.layer.borderColor = DEFAULT_CONFIGURATION_BUTTON.borderColor?.cgColor + + switch DEFAULT_CONFIGURATION_BUTTON.cornerType { + case .capsule: + primaryButton.layer.cornerRadius = DEFAULT_CONFIGURATION_BUTTON.height*0.5 + case .custom(let radius): + primaryButton.layer.cornerRadius = radius + case .none: + primaryButton.layer.cornerRadius = 0 + } + } + + /// Update UI background + fileprivate func updateUIBackground() { + // Background gradient configuration + if let gradientColor = DEFAULT_CONFIGURATION_VIEW.gradientColor { + gradientLayer?.removeFromSuperlayer() + gradientLayer = CAGradientLayer() + gradientLayer?.colors = [gradientColor.0.cgColor, gradientColor.1.cgColor] + gradientLayer?.startPoint = CGPoint(x: 0.5, y: 1.0) + gradientLayer?.endPoint = CGPoint(x: 0.5, y: 0.0) + gradientLayer?.locations = [0, 1] + gradientLayer?.frame = bounds + layer.insertSublayer(gradientLayer!, at: 0) + } else { + gradientLayer?.removeFromSuperlayer() + // Background configuration + backgroundColor = DEFAULT_CONFIGURATION_VIEW.backgroundColor + } + } + + /// Update UI background loading + fileprivate func updateUIBackgroundLoading() { + gradientLayer?.removeFromSuperlayer() + backgroundColor = loadingConfiguration.backgroundColor + } + + /// Update UI loading + fileprivate func configureUILoading() { + loadingView.removeFromSuperview() + loadingView.isHidden = true + addSubview(loadingView) + + loadingView.snp.makeConstraints { make in + make.center.equalTo(self) + make.size.equalTo(loadingConfiguration.size) + } + + loadingView.updateUI() + guard let loadingView = loadingView as? RHDefaultLoading else { return } + loadingView.color = loadingConfiguration.color + } +} + +//MARK: - Configure Constraint + +extension RHDefaultViewState { + fileprivate func configurePosition(viewPosition: RHViewPosition, imagePosition: RHImagePosition, messagePosition: RHTextPosition) { + configureView(in: viewPosition) + + switch imagePosition { + case .top: + topImage(in: messagePosition) + case .bottom: + bottomImage(in: messagePosition) + case .cover(let topConstraint, let bottomConstraint): + coverImage(in: messagePosition, topConstraint: topConstraint, bottomConstraint: bottomConstraint) + } + } + + //MARK: Configure View Position + + private func configureView(in position: RHViewPosition) { + messageView.snp.remakeConstraints { make in + make.leading.equalTo(self).offset(DEFAULT_CONFIGURATION_VIEW.horizontalConstraint) + make.trailing.equalTo(self).offset(-DEFAULT_CONFIGURATION_VIEW.horizontalConstraint) + switch position { + case .top: + make.top.equalTo(self).offset(DEFAULT_CONFIGURATION_VIEW.verticalConstraint) + case .center: + make.centerY.equalTo(self) + case .bottom: + make.bottom.equalTo(self).offset(-DEFAULT_CONFIGURATION_VIEW.verticalConstraint) + } + } + } + + //MARK: Configure Image Position + + private func topImage(in position: RHTextPosition) { + coverImageView.snp.removeConstraints() + + imageView.snp.remakeConstraints { make in + make.top.equalTo(messageView) + make.size.equalTo(DEFAULT_CONFIGURATION_IMAGE.size) + make.centerX.equalTo(messageView) + } + + titleLabel.textAlignment = makeTextAlignment(with: position) + titleLabel.snp.remakeConstraints { make in + make.top.equalTo(imageView.snp.bottom).offset(DEFAULT_CONFIGURATION_TITLE.topConstraint) + make.trailing.leading.equalTo(messageView) + } + + descriptionLabel.textAlignment = makeTextAlignment(with: position) + descriptionLabel.snp.remakeConstraints { make in + make.top.equalTo(titleLabel.snp.bottom).offset(DEFAULT_CONFIGURATION_DESCRIPTION.topConstraint) + make.trailing.leading.equalTo(messageView) + } + + primaryButton.snp.remakeConstraints { make in + make.top.equalTo(descriptionLabel.snp.bottom).offset(DEFAULT_CONFIGURATION_BUTTON.topConstraint) + configureButton(in: position, withConstraintMaker: make) + } + } + + private func bottomImage(in position: RHTextPosition) { + coverImageView.snp.removeConstraints() + + titleLabel.textAlignment = makeTextAlignment(with: position) + titleLabel.snp.remakeConstraints { make in + make.top.trailing.leading.equalTo(messageView) + } + + descriptionLabel.textAlignment = makeTextAlignment(with: position) + descriptionLabel.snp.remakeConstraints { make in + make.top.equalTo(titleLabel.snp.bottom).offset(DEFAULT_CONFIGURATION_DESCRIPTION.topConstraint) + make.trailing.leading.equalTo(messageView) + } + + imageView.snp.remakeConstraints { make in + make.top.equalTo(descriptionLabel.snp.bottom).offset(DEFAULT_CONFIGURATION_IMAGE.topConstraint) + make.size.equalTo(DEFAULT_CONFIGURATION_IMAGE.size) + make.centerX.equalTo(messageView) + } + + primaryButton.snp.remakeConstraints { make in + make.top.equalTo(imageView.snp.bottom).offset(DEFAULT_CONFIGURATION_BUTTON.topConstraint) + configureButton(in: position, withConstraintMaker: make) + } + } + + private func coverImage(in position: RHTextPosition, topConstraint: TopConstraint, bottomConstraint: BottomConstraint) { + imageView.snp.removeConstraints() + + coverImageView.snp.remakeConstraints { make in + make.top.equalTo(self).offset(topConstraint) + make.bottom.equalTo(self).offset(-bottomConstraint) + make.trailing.leading.equalTo(self) + } + + titleLabel.textAlignment = makeTextAlignment(with: position) + titleLabel.snp.remakeConstraints { make in + make.top.trailing.leading.equalTo(messageView) + } + + descriptionLabel.textAlignment = makeTextAlignment(with: position) + descriptionLabel.snp.remakeConstraints { make in + make.top.equalTo(titleLabel.snp.bottom).offset(DEFAULT_CONFIGURATION_DESCRIPTION.topConstraint) + make.trailing.leading.equalTo(messageView) + } + + primaryButton.snp.remakeConstraints { make in + make.top.equalTo(descriptionLabel.snp.bottom).offset(DEFAULT_CONFIGURATION_BUTTON.topConstraint) + configureButton(in: position, withConstraintMaker: make) + } + } + + // MARK: Configure Button Position + + private func configureButton(in position: RHTextPosition, withConstraintMaker make: ConstraintMaker) { + make.bottom.equalTo(messageView).offset(0) + make.height.equalTo(DEFAULT_CONFIGURATION_BUTTON.height) + + switch position { + case .center, .justify: + make.centerX.equalTo(messageView) + case .left: + make.leading.equalTo(messageView) + make.trailing.lessThanOrEqualTo(messageView) + case .right: + make.leading.greaterThanOrEqualTo(messageView) + make.trailing.equalTo(messageView) + } + + if let width = DEFAULT_CONFIGURATION_BUTTON.width { + make.width.equalTo(width) + } else { + guard let titleWidth = primaryButton.titleLabel?.textWidth else { return } + + let insetTitle = DEFAULT_CONFIGURATION_BUTTON.titleInset*2 + let targetWidth = titleWidth + insetTitle + + make.width.equalTo(targetWidth) + } + } +} + +// MARK: - Animations + +extension RHDefaultViewState { + // Fade animation + func fade(_ duration1: TimeInterval, _ duration2: TimeInterval) { + + coverImageView.alpha = 0 + imageView.alpha = 0 + titleLabel.alpha = 0 + descriptionLabel.alpha = 0 + primaryButton.alpha = 0 + + UIView.animate(withDuration: duration1, animations: { [weak self] in + self?.titleLabel.alpha = 1 + self?.descriptionLabel.alpha = 1 + self?.primaryButton.alpha = 1 + }) { [weak self](completed) in + UIView.animate(withDuration: duration2, animations: { [weak self] in + self?.coverImageView.alpha = 1 + self?.imageView.alpha = 1 + }, completion: nil) + } + } + + // Scale animation + func scale(_ duration1: TimeInterval, _ duration2: TimeInterval) { + + coverImageView.transform = CGAffineTransform(scaleX: 0, y: 0) + imageView.transform = CGAffineTransform(scaleX: 0, y: 0) + titleLabel.alpha = 0 + descriptionLabel.alpha = 0 + primaryButton.alpha = 0 + + UIView.animate(withDuration: duration1, animations: { [weak self] in + self?.titleLabel.alpha = 1 + self?.descriptionLabel.alpha = 1 + self?.primaryButton.alpha = 1 + }) { [weak self](completed) in + UIView.animate(withDuration: duration2, delay: 0, usingSpringWithDamping: 0.7, initialSpringVelocity: 0.8, options: .curveEaseInOut, animations: { [weak self] in + self?.coverImageView.transform = .identity + self?.imageView.transform = .identity + }, completion: nil) + } + } +} + +extension RHDefaultViewState { + /// Play image animation + func play() { + DEFAULT_CONFIGURATION_IMAGE.animation?.play?(self) + } + + /// Show loading + func showLoader() { + coverImageView.isHidden = true + messageView.isHidden = true + loadingView.isHidden = false + loadingView.startAnimating() + updateUIBackgroundLoading() + } + + /// Hide loading + func hideLoader() { + coverImageView.isHidden = false + messageView.isHidden = false + loadingView.isHidden = true + loadingView.stopAnimating() + updateUIBackground() + } +} + +// MARK: - Model Content + +extension RHDefaultViewState { + struct RHContent { + var image: UIImage? + var title: String? + var description: String? + var titleButton: String? + } +} diff --git a/Source/RHDescriptionConfiguration.swift b/Source/RHDescriptionConfiguration.swift new file mode 100644 index 0000000..0f3221c --- /dev/null +++ b/Source/RHDescriptionConfiguration.swift @@ -0,0 +1,18 @@ +// +// RHDescriptionConfiguration.swift +// Pods-RHViewStateKit_Example +// +// Created by Bagus andinata on 18/07/21. +// + +import UIKit + +public struct RHDescriptionConfiguration { + /// Title attributes + public var attributes: [NSAttributedString.Key: Any] = [.font: UIFont.systemFont(ofSize: 16), .foregroundColor: UIColor.darkGray] + + /// Description top constraint , default = 26 + public var topConstraint: CGFloat = 10 + + public init() {} +} diff --git a/Source/RHImageConfiguration.swift b/Source/RHImageConfiguration.swift new file mode 100644 index 0000000..849557d --- /dev/null +++ b/Source/RHImageConfiguration.swift @@ -0,0 +1,24 @@ +// +// RHImageConfiguration.swift +// Pods-RHViewStateKit_Example +// +// Created by Bagus andinata on 18/07/21. +// + +import UIKit + +public struct RHImageConfiguration { + /// Image Animation + public var animation: RHViewStateAnimation? = .scale(0.3, 0.3) + + /// Image tint color + public var tintColor: UIColor? = nil + + /// Image top constraint, default = 16 + public var topConstraint: CGFloat = 16 + + /// Image size, default CGSize(width: 200, height: 200) + public var size: CGSize = CGSize(width: 200, height: 200) + + public init() {} +} diff --git a/Source/RHLoadingConfiguration.swift b/Source/RHLoadingConfiguration.swift new file mode 100644 index 0000000..17e5042 --- /dev/null +++ b/Source/RHLoadingConfiguration.swift @@ -0,0 +1,24 @@ +// +// RHLoadingConfiguration.swift +// Pods-RHViewStateKit_Example +// +// Created by Bagus andinata on 18/07/21. +// + +import UIKit + +public struct RHLoadingConfiguration { + /// Title attributes + public var view: RHLoadingView = RHDefaultLoading() + + /// Size loading, default = 50 + public var size: CGSize = CGSize(width: 20, height: 20) + + /// Background loading, default = white + public var backgroundColor: UIColor = .white + + /// Indicator color default, default = gray + public var color: UIColor = .gray + + public init() {} +} diff --git a/Source/RHPositionConfiguration.swift b/Source/RHPositionConfiguration.swift new file mode 100644 index 0000000..2081649 --- /dev/null +++ b/Source/RHPositionConfiguration.swift @@ -0,0 +1,42 @@ +// +// RHPositionConfiguration.swift +// Pods-RHViewStateKit_Example +// +// Created by Bagus andinata on 18/07/21. +// + +import UIKit + +public typealias TopConstraint = CGFloat +public typealias BottomConstraint = CGFloat + +public struct RHPositionConfiguration { + var view: RHViewPosition = .center + var text: RHTextPosition = .center + var image: RHImagePosition = .top + + public init(view: RHViewPosition? = nil, text: RHTextPosition? = nil, image: RHImagePosition? = nil) { + self.view = view ?? .center + self.text = text ?? .center + self.image = image ?? .top + } +} + +public enum RHViewPosition { + case top + case center + case bottom +} + +public enum RHTextPosition { + case left + case center + case right + case justify +} + +public enum RHImagePosition { + case top + case bottom + case cover(TopConstraint, BottomConstraint) +} diff --git a/Source/RHTitleConfiguration.swift b/Source/RHTitleConfiguration.swift new file mode 100644 index 0000000..82a1475 --- /dev/null +++ b/Source/RHTitleConfiguration.swift @@ -0,0 +1,18 @@ +// +// RHTitleConfiguration.swift +// Pods-RHViewStateKit_Example +// +// Created by Bagus andinata on 18/07/21. +// + +import UIKit + +public struct RHTitleConfiguration { + /// Title attributes + public var attributes: [NSAttributedString.Key: Any] = [.font: UIFont.boldSystemFont(ofSize: 24), .foregroundColor: UIColor.darkGray] + + /// Title top constraint when image in top, default = 26 + public var topConstraint: CGFloat = 26 + + public init() {} +} diff --git a/Source/RHViewCollectionState.swift b/Source/RHViewCollectionState.swift new file mode 100644 index 0000000..5448352 --- /dev/null +++ b/Source/RHViewCollectionState.swift @@ -0,0 +1,67 @@ +// +// RHViewCollectionState.swift +// Pods-RHViewStateKit_Example +// +// Created by Bagus andinata on 18/07/21. +// + +// copy from https://github.com/alberdev/EmptyStateKit, partially edited + +import UIKit + +public protocol RHViewCollectionState { + var image: UIImage? { get } + var title: String? { get } + var description: String? { get } + var titleButton: String? { get } + var viewConfiguration: RHViewConfiguration { get } + var buttonConfiguration: RHButtonConfiguration { get } + var titleConfiguration: RHTitleConfiguration { get } + var descriptionConfiguration: RHDescriptionConfiguration { get } + var imageConfiguration: RHImageConfiguration { get } + var positionConfiguration: RHPositionConfiguration { get } +} + +public extension RHViewCollectionState { + + var image: UIImage? { + get { return nil } + } + + var title: String? { + get { return nil } + } + + var description: String? { + get { return nil } + } + + var titleButton: String? { + get { return nil } + } + + var viewConfiguration: RHViewConfiguration { + get { return RHViewConfiguration() } + } + + var buttonConfiguration: RHButtonConfiguration { + get { return RHButtonConfiguration() } + } + + var titleConfiguration: RHTitleConfiguration { + get { return RHTitleConfiguration() } + } + + var descriptionConfiguration: RHDescriptionConfiguration { + get { return RHDescriptionConfiguration() } + } + + var imageConfiguration: RHImageConfiguration { + get { return RHImageConfiguration() } + } + + var positionConfiguration: RHPositionConfiguration { + get { return RHPositionConfiguration() } + } + +} diff --git a/Source/RHViewConfiguration.swift b/Source/RHViewConfiguration.swift new file mode 100644 index 0000000..51caa4c --- /dev/null +++ b/Source/RHViewConfiguration.swift @@ -0,0 +1,27 @@ +// +// RHViewConfiguration.swift +// Pods-RHViewStateKit_Example +// +// Created by Bagus andinata on 18/07/21. +// + +import UIKit + +public struct RHViewConfiguration { + /// Alpha container + public var alpha: CGFloat = 1.0 + + /// Background color + public var backgroundColor: UIColor = .white + + /// Background Gradient color + public var gradientColor: (UIColor, UIColor)? = nil + + /// Top or bottom Constraint + public var verticalConstraint: CGFloat = 40 + + /// Left & right Constraint + public var horizontalConstraint: CGFloat = 40 + + public init() {} +} diff --git a/Source/RHViewState+DataSource.swift b/Source/RHViewState+DataSource.swift new file mode 100644 index 0000000..2af747c --- /dev/null +++ b/Source/RHViewState+DataSource.swift @@ -0,0 +1,82 @@ +// +// RHViewState+DataSource.swift +// RHViewStateKit +// +// Created by Bagus andinata on 24/07/21. +// + +import Foundation + +public protocol RHViewStateDataSource: AnyObject { + /// Data source for content image + func imageForState(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> UIImage? + + /// Data source for content title + func titleForState(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> String? + + /// Data source for content description + func descriptionForState(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> String? + + /// Data source for content title + func titleButtonForState(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> String? + + /// Data source for view configuration + func rhViewConfiguration(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> RHViewConfiguration + + /// Data source for button configuration + func rhButtonConfiguration(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> RHButtonConfiguration + + /// Data source for title configuration + func rhTitleConfiguration(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> RHTitleConfiguration + + /// Data source for description configuration + func rhDescriptionConfiguration(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> RHDescriptionConfiguration + + /// Data source for image configuration + func rhImageConfiguration(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> RHImageConfiguration + + /// Data source for position configuration + func rhPositionConfiguration(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> RHPositionConfiguration +} + +public extension RHViewStateDataSource { + func imageForState(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> UIImage? { + return nil + } + + func titleForState(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> String? { + return nil + } + + func descriptionForState(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> String? { + return nil + } + + func titleButtonForState(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> String? { + return nil + } + + func rhViewConfiguration(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> RHViewConfiguration { + return RHViewConfiguration() + } + + func rhButtonConfiguration(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> RHButtonConfiguration { + return RHButtonConfiguration() + } + + func rhTitleConfiguration(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> RHTitleConfiguration { + return RHTitleConfiguration() + } + + func rhDescriptionConfiguration(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> RHDescriptionConfiguration { + return RHDescriptionConfiguration() + } + + func rhImageConfiguration(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> RHImageConfiguration { + return RHImageConfiguration() + } + + func rhPositionConfiguration(_ state: RHViewCollectionState, inViewState viewState: RHViewState) -> RHPositionConfiguration { + return RHPositionConfiguration(view: .center, text: .center, image: .top) + } +} diff --git a/Source/RHViewState+Delegate.swift b/Source/RHViewState+Delegate.swift new file mode 100644 index 0000000..efc50f7 --- /dev/null +++ b/Source/RHViewState+Delegate.swift @@ -0,0 +1,13 @@ +// +// RHViewState+DataSource.swift +// RHViewStateKit +// +// Created by Bagus andinata on 24/07/21. +// + +import Foundation + +public protocol RHViewStateDelegate: AnyObject { + /// Delegate tap button + func viewState(_ viewState: RHViewState, didTapButton button: UIButton) +} diff --git a/Source/RHViewState.swift b/Source/RHViewState.swift new file mode 100644 index 0000000..68f8cc0 --- /dev/null +++ b/Source/RHViewState.swift @@ -0,0 +1,133 @@ +// +// RHViewState.swift +// Pods-RHViewStateKit_Example +// +// Created by Bagus andinata on 18/07/21. +// + +// copy from https://github.com/alberdev/EmptyStateKit, partially edited and added + +import UIKit + +public class RHViewState { + + public weak var delegate: RHViewStateDelegate? + public weak var dataSource: RHViewStateDataSource? + + private var defaultViewState: RHDefaultViewState! + + /// Show or hide view + private var hidden = true { + didSet { + defaultViewState?.isHidden = hidden + } + } + + /// State mode + private var state: RHViewCollectionState? { + didSet { + guard let state = state else { return } + + if let dataSource = dataSource { + let content = RHDefaultViewState.RHContent( + image: dataSource.imageForState(state, inViewState: self), + title: dataSource.titleForState(state, inViewState: self), + description: dataSource.descriptionForState(state, inViewState: self), + titleButton: dataSource.titleButtonForState(state, inViewState: self)) + + defaultViewState.configureDataSource(content: content, + configView: dataSource.rhViewConfiguration(state, inViewState: self), + configButton: dataSource.rhButtonConfiguration(state, inViewState: self), + configTitle: dataSource.rhTitleConfiguration(state, inViewState: self), + configDescription: dataSource.rhDescriptionConfiguration(state, inViewState: self), + configImage: dataSource.rhImageConfiguration(state, inViewState: self), + configPosition: dataSource.rhPositionConfiguration(state, inViewState: self)) + } else { + let content = RHDefaultViewState.RHContent(image: state.image, title: state.title, description: state.description, titleButton: state.titleButton) + + defaultViewState.configureDataSource(content: content, + configView: state.viewConfiguration, + configButton: state.buttonConfiguration, + configTitle: state.titleConfiguration, + configDescription: state.descriptionConfiguration, + configImage: state.imageConfiguration, + configPosition: state.positionConfiguration) + } + } + } + + /// Loading configuration + public var loading = RHLoadingConfiguration() { + didSet { + defaultViewState.loadingConfiguration = loading + } + } + + init(inView view: UIView?) { + + // Create empty state view + defaultViewState = RHDefaultViewState() + defaultViewState.isHidden = true + defaultViewState.actionButton = { [weak self] (button) in + self?.didTapButton(button) + } + + // Add it to your view + if let view = view as? UIScrollView { + configureViewStateConstraint(with: view.superview) + } else { + configureViewStateConstraint(with: view) + } + } + + deinit { + delegate = nil + dataSource = nil + defaultViewState = nil + state = nil + } +} + +extension RHViewState { + /// Show view state + public func show(_ state: RHViewCollectionState? = nil) { + self.state = state + hidden = false + defaultViewState.play() + } + + public func hide() { + hidden = true + } + + /// Show loading in viewstate + public func showLoader() { + defaultViewState.showLoader() + hidden = false + } + + /// Hide loading in viewstate + public func hideLoader() { + defaultViewState.hideLoader() + hidden = true + } +} + +extension RHViewState { + /// Handle tap button + private func didTapButton(_ button: UIButton) { + delegate?.viewState(self, didTapButton: button) + } +} + +extension RHViewState { + fileprivate func configureViewStateConstraint(with containerView: UIView!) { + defaultViewState.frame = containerView.frame + + containerView.addSubview(defaultViewState) + + defaultViewState.snp.makeConstraints { make in + make.edges.equalTo(containerView) + } + } +} diff --git a/Source/RHViewStateAnimation.swift b/Source/RHViewStateAnimation.swift new file mode 100644 index 0000000..2dee273 --- /dev/null +++ b/Source/RHViewStateAnimation.swift @@ -0,0 +1,30 @@ +// +// RHViewStateAnimation.swift +// Pods-RHViewStateKit_Example +// +// Created by Bagus andinata on 18/07/21. +// + +// copy from https://github.com/alberdev/EmptyStateKit + +import UIKit + +public typealias FadeTimeInterval = TimeInterval +public typealias ScaleTimeInterval = TimeInterval + +public enum RHViewStateAnimation { + + case fade(FadeTimeInterval, FadeTimeInterval) + case scale(ScaleTimeInterval, ScaleTimeInterval) + case noAnimation + + var play: ((RHDefaultViewState) -> ())? { + switch self { + case .fade(let duration1, let duration2): + return { $0.fade(duration1, duration2) } + case .scale(let duration1, let duration2): + return { $0.scale(duration1, duration2) } + case .noAnimation: return nil + } + } +} diff --git a/Source/UILabel+TextWidth.swift b/Source/UILabel+TextWidth.swift new file mode 100644 index 0000000..adf7181 --- /dev/null +++ b/Source/UILabel+TextWidth.swift @@ -0,0 +1,19 @@ +// +// UILabel+TextWidth.swift +// Pods-RHViewStateKit_Example +// +// Created by Bagus andinata on 18/07/21. +// + +import Foundation + +public extension UILabel { + var textWidth: CGFloat? { + guard let myText = self.text else { return nil } + guard let myFont = self.font else { return nil } + + let rect = CGSize(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude) + let labelSize = myText.boundingRect(with: rect, options: .usesLineFragmentOrigin, attributes: [NSAttributedString.Key.font: myFont], context: nil) + return ceil(labelSize.width) + } +} diff --git a/Source/UIView.swift b/Source/UIView.swift new file mode 100644 index 0000000..05350f7 --- /dev/null +++ b/Source/UIView.swift @@ -0,0 +1,30 @@ +// +// UIView.swift +// Pods-RHViewStateKit_Example +// +// Created by Bagus andinata on 18/07/21. +// + +import UIKit + +private var viewStatekey = "viewState" + +public extension UIView { + var viewState: RHViewState! { + get { + guard let saved = ao_get(pkey: &viewStatekey) as? RHViewState else { + self.viewState = RHViewState(inView: self) + return self.viewState + } + return saved + } + set { ao_set(newValue ?? RHViewState(inView: self), pkey: &viewStatekey) } + } + + func addSubviews(with views: [UIView]) { + views.forEach { view in + addSubview(view) + } + } +} + diff --git a/_Pods.xcodeproj b/_Pods.xcodeproj new file mode 120000 index 0000000..3c5a8e7 --- /dev/null +++ b/_Pods.xcodeproj @@ -0,0 +1 @@ +Example/Pods/Pods.xcodeproj \ No newline at end of file