├── .DS_Store ├── Pods ├── .DS_Store ├── Target Support Files │ ├── .DS_Store │ ├── Pods-RMShapesPageControl │ │ ├── Pods-RMShapesPageControl-frameworks-Debug-output-files.xcfilelist │ │ ├── Pods-RMShapesPageControl-frameworks-Release-output-files.xcfilelist │ │ ├── Pods-RMShapesPageControl.modulemap │ │ ├── Pods-RMShapesPageControl-dummy.m │ │ ├── Pods-RMShapesPageControl-frameworks-Debug-input-files.xcfilelist │ │ ├── Pods-RMShapesPageControl-frameworks-Release-input-files.xcfilelist │ │ ├── Pods-RMShapesPageControl-umbrella.h │ │ ├── Pods-RMShapesPageControl-Info.plist │ │ ├── Pods-RMShapesPageControl.debug.xcconfig │ │ ├── Pods-RMShapesPageControl.release.xcconfig │ │ ├── Pods-RMShapesPageControl-acknowledgements.markdown │ │ ├── Pods-RMShapesPageControl-acknowledgements.plist │ │ └── Pods-RMShapesPageControl-frameworks.sh │ └── SnapKit │ │ ├── SnapKit.modulemap │ │ ├── SnapKit-dummy.m │ │ ├── SnapKit-prefix.pch │ │ ├── SnapKit-umbrella.h │ │ ├── ResourceBundle-SnapKit_Privacy-SnapKit-Info.plist │ │ ├── SnapKit.debug.xcconfig │ │ ├── SnapKit.release.xcconfig │ │ └── SnapKit-Info.plist ├── Manifest.lock ├── SnapKit │ ├── Sources │ │ ├── PrivacyInfo.xcprivacy │ │ ├── ConstraintView.swift │ │ ├── ConstraintInsets.swift │ │ ├── ConstraintDirectionalInsets.swift │ │ ├── ConstraintLayoutSupport.swift │ │ ├── UILayoutSupport+Extensions.swift │ │ ├── ConstraintLayoutGuide+Extensions.swift │ │ ├── ConstraintLayoutGuide.swift │ │ ├── ConstraintConfig.swift │ │ ├── ConstraintRelation.swift │ │ ├── Typealiases.swift │ │ ├── ConstraintMakerFinalizable.swift │ │ ├── ConstraintDirectionalInsetTarget.swift │ │ ├── ConstraintLayoutSupportDSL.swift │ │ ├── ConstraintItem.swift │ │ ├── ConstraintRelatableTarget.swift │ │ ├── ConstraintMultiplierTarget.swift │ │ ├── ConstraintOffsetTarget.swift │ │ ├── LayoutConstraint.swift │ │ ├── ConstraintPriorityTarget.swift │ │ ├── ConstraintLayoutGuideDSL.swift │ │ ├── ConstraintMakerEditable.swift │ │ ├── ConstraintPriority.swift │ │ ├── ConstraintDescription.swift │ │ ├── ConstraintMakerPrioritizable.swift │ │ ├── ConstraintMakerRelatable+Extensions.swift │ │ ├── ConstraintInsetTarget.swift │ │ ├── LayoutConstraintItem.swift │ │ ├── ConstraintViewDSL.swift │ │ ├── ConstraintMakerRelatable.swift │ │ ├── ConstraintView+Extensions.swift │ │ ├── ConstraintMakerExtendable.swift │ │ ├── Debugging.swift │ │ ├── ConstraintDSL.swift │ │ ├── ConstraintConstantTarget.swift │ │ ├── ConstraintMaker.swift │ │ ├── ConstraintAttributes.swift │ │ └── Constraint.swift │ ├── LICENSE │ └── README.md └── Pods.xcodeproj │ └── xcuserdata │ └── rupammitra.xcuserdatad │ └── xcschemes │ ├── xcschememanagement.plist │ ├── SnapKit.xcscheme │ ├── SnapKit-SnapKit_Privacy.xcscheme │ └── Pods-RMShapesPageControl.xcscheme ├── Screenshots ├── .DS_Store ├── RMShapesPageControl.gif └── RMShapesPageControl.png ├── RMShapesPageControl ├── .DS_Store ├── Assets.xcassets │ ├── Contents.json │ ├── .DS_Store │ ├── AppIcon.appiconset │ │ ├── AppIcon1024x1024.png │ │ ├── AppIcon1024x1024 1.png │ │ ├── AppIcon1024x1024 2.png │ │ └── Contents.json │ └── AccentColor.colorset │ │ └── Contents.json ├── Info.plist ├── AppDelegate.swift ├── Base.lproj │ └── LaunchScreen.storyboard ├── SceneDelegate.swift └── ViewController.swift ├── Podfile ├── RMShapesPageControl.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── rupammitra.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── rupammitra.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── RMShapesPageControl.xcworkspace ├── xcuserdata │ └── rupammitra.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── contents.xcworkspacedata ├── Podfile.lock ├── README.md └── RMShapesPageControl.swift /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rupammitra/RMShapesPageControl/HEAD/.DS_Store -------------------------------------------------------------------------------- /Pods/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rupammitra/RMShapesPageControl/HEAD/Pods/.DS_Store -------------------------------------------------------------------------------- /Screenshots/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rupammitra/RMShapesPageControl/HEAD/Screenshots/.DS_Store -------------------------------------------------------------------------------- /RMShapesPageControl/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rupammitra/RMShapesPageControl/HEAD/RMShapesPageControl/.DS_Store -------------------------------------------------------------------------------- /Pods/Target Support Files/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rupammitra/RMShapesPageControl/HEAD/Pods/Target Support Files/.DS_Store -------------------------------------------------------------------------------- /RMShapesPageControl/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Screenshots/RMShapesPageControl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rupammitra/RMShapesPageControl/HEAD/Screenshots/RMShapesPageControl.gif -------------------------------------------------------------------------------- /Screenshots/RMShapesPageControl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rupammitra/RMShapesPageControl/HEAD/Screenshots/RMShapesPageControl.png -------------------------------------------------------------------------------- /RMShapesPageControl/Assets.xcassets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rupammitra/RMShapesPageControl/HEAD/RMShapesPageControl/Assets.xcassets/.DS_Store -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | #source 'https://github.com/CocoaPods/Specs.git' 2 | #platform :ios, '15.0' 3 | use_frameworks! 4 | 5 | target 'RMShapesPageControl' do 6 | pod 'SnapKit' 7 | end -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RMShapesPageControl/Pods-RMShapesPageControl-frameworks-Debug-output-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RMShapesPageControl/Pods-RMShapesPageControl-frameworks-Release-output-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework -------------------------------------------------------------------------------- /Pods/Target Support Files/SnapKit/SnapKit.modulemap: -------------------------------------------------------------------------------- 1 | framework module SnapKit { 2 | umbrella header "SnapKit-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SnapKit/SnapKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SnapKit : NSObject 3 | @end 4 | @implementation PodsDummy_SnapKit 5 | @end 6 | -------------------------------------------------------------------------------- /RMShapesPageControl/Assets.xcassets/AppIcon.appiconset/AppIcon1024x1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rupammitra/RMShapesPageControl/HEAD/RMShapesPageControl/Assets.xcassets/AppIcon.appiconset/AppIcon1024x1024.png -------------------------------------------------------------------------------- /RMShapesPageControl/Assets.xcassets/AppIcon.appiconset/AppIcon1024x1024 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rupammitra/RMShapesPageControl/HEAD/RMShapesPageControl/Assets.xcassets/AppIcon.appiconset/AppIcon1024x1024 1.png -------------------------------------------------------------------------------- /RMShapesPageControl/Assets.xcassets/AppIcon.appiconset/AppIcon1024x1024 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rupammitra/RMShapesPageControl/HEAD/RMShapesPageControl/Assets.xcassets/AppIcon.appiconset/AppIcon1024x1024 2.png -------------------------------------------------------------------------------- /RMShapesPageControl.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RMShapesPageControl/Pods-RMShapesPageControl.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_RMShapesPageControl { 2 | umbrella header "Pods-RMShapesPageControl-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /RMShapesPageControl/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RMShapesPageControl/Pods-RMShapesPageControl-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_RMShapesPageControl : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_RMShapesPageControl 5 | @end 6 | -------------------------------------------------------------------------------- /RMShapesPageControl.xcworkspace/xcuserdata/rupammitra.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rupammitra/RMShapesPageControl/HEAD/RMShapesPageControl.xcworkspace/xcuserdata/rupammitra.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RMShapesPageControl/Pods-RMShapesPageControl-frameworks-Debug-input-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${PODS_ROOT}/Target Support Files/Pods-RMShapesPageControl/Pods-RMShapesPageControl-frameworks.sh 2 | ${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RMShapesPageControl/Pods-RMShapesPageControl-frameworks-Release-input-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${PODS_ROOT}/Target Support Files/Pods-RMShapesPageControl/Pods-RMShapesPageControl-frameworks.sh 2 | ${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework -------------------------------------------------------------------------------- /RMShapesPageControl.xcodeproj/project.xcworkspace/xcuserdata/rupammitra.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rupammitra/RMShapesPageControl/HEAD/RMShapesPageControl.xcodeproj/project.xcworkspace/xcuserdata/rupammitra.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Pods/Target Support Files/SnapKit/SnapKit-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SnapKit (5.7.1) 3 | 4 | DEPENDENCIES: 5 | - SnapKit 6 | 7 | SPEC REPOS: 8 | trunk: 9 | - SnapKit 10 | 11 | SPEC CHECKSUMS: 12 | SnapKit: d612e99e678a2d3b95bf60b0705ed0a35c03484a 13 | 14 | PODFILE CHECKSUM: 2f453b633e5af78ba68ce1e89fbca6b62d3e6ff4 15 | 16 | COCOAPODS: 1.16.2 17 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SnapKit (5.7.1) 3 | 4 | DEPENDENCIES: 5 | - SnapKit 6 | 7 | SPEC REPOS: 8 | trunk: 9 | - SnapKit 10 | 11 | SPEC CHECKSUMS: 12 | SnapKit: d612e99e678a2d3b95bf60b0705ed0a35c03484a 13 | 14 | PODFILE CHECKSUM: 2f453b633e5af78ba68ce1e89fbca6b62d3e6ff4 15 | 16 | COCOAPODS: 1.16.2 17 | -------------------------------------------------------------------------------- /RMShapesPageControl.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SnapKit/SnapKit-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double SnapKitVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char SnapKitVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/PrivacyInfo.xcprivacy: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSPrivacyTracking 6 | 7 | NSPrivacyAccessedAPITypes 8 | 9 | NSPrivacyCollectedDataTypes 10 | 11 | NSPrivacyTrackingDomains 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RMShapesPageControl/Pods-RMShapesPageControl-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_RMShapesPageControlVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_RMShapesPageControlVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /RMShapesPageControl.xcodeproj/xcuserdata/rupammitra.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | RMShapesPageControl.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 3 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RMShapesPageControl 2 | 3 | ![alt tag](https://github.com/rupammitra/RMShapesPageControl/blob/master/Screenshots/RMShapesPageControl.png)![alt tag](https://github.com/rupammitra/RMSquarePageControl/blob/master/Screenshots/RMShapesPageControl.gif) 4 | 5 | ## Usage 6 | 7 | Easy peasy, just drag and drop RMShapesPageControl.swift in your project and use it, don't forget the credits 😉 8 | 9 | ### Indicator Configuration 10 | 1. Circle 11 | 2. Square 12 | 3. Rectangle (Horizontal & Vertical) 13 | 4. Triangle (Up & Down) 14 | 5. Pentagon 15 | 6. Hexagon 16 | -------------------------------------------------------------------------------- /RMShapesPageControl/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIApplicationSceneManifest 6 | 7 | UIApplicationSupportsMultipleScenes 8 | 9 | UISceneConfigurations 10 | 11 | UIWindowSceneSessionRoleApplication 12 | 13 | 14 | UISceneConfigurationName 15 | Default Configuration 16 | UISceneDelegateClassName 17 | $(PRODUCT_MODULE_NAME).SceneDelegate 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/rupammitra.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Pods-RMShapesPageControl.xcscheme 8 | 9 | isShown 10 | 11 | orderHint 12 | 0 13 | 14 | SnapKit-SnapKit_Privacy.xcscheme 15 | 16 | isShown 17 | 18 | orderHint 19 | 2 20 | 21 | SnapKit.xcscheme 22 | 23 | isShown 24 | 25 | orderHint 26 | 1 27 | 28 | 29 | SuppressBuildableAutocreation 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SnapKit/ResourceBundle-SnapKit_Privacy-SnapKit-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | ${PODS_DEVELOPMENT_LANGUAGE} 7 | CFBundleIdentifier 8 | ${PRODUCT_BUNDLE_IDENTIFIER} 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | ${PRODUCT_NAME} 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 5.7.1 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SnapKit/SnapKit.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapKit 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift $(SDKROOT)/usr/lib/swift 5 | OTHER_LDFLAGS = $(inherited) -l"swiftCoreGraphics" 6 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 10 | PODS_ROOT = ${SRCROOT} 11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SnapKit 12 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 13 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 14 | SKIP_INSTALL = YES 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SnapKit/SnapKit.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapKit 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift $(SDKROOT)/usr/lib/swift 5 | OTHER_LDFLAGS = $(inherited) -l"swiftCoreGraphics" 6 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 10 | PODS_ROOT = ${SRCROOT} 11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SnapKit 12 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 13 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 14 | SKIP_INSTALL = YES 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /RMShapesPageControl/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "AppIcon1024x1024 1.png", 5 | "idiom" : "universal", 6 | "platform" : "ios", 7 | "size" : "1024x1024" 8 | }, 9 | { 10 | "appearances" : [ 11 | { 12 | "appearance" : "luminosity", 13 | "value" : "dark" 14 | } 15 | ], 16 | "filename" : "AppIcon1024x1024.png", 17 | "idiom" : "universal", 18 | "platform" : "ios", 19 | "size" : "1024x1024" 20 | }, 21 | { 22 | "appearances" : [ 23 | { 24 | "appearance" : "luminosity", 25 | "value" : "tinted" 26 | } 27 | ], 28 | "filename" : "AppIcon1024x1024 2.png", 29 | "idiom" : "universal", 30 | "platform" : "ios", 31 | "size" : "1024x1024" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SnapKit/SnapKit-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | ${PODS_DEVELOPMENT_LANGUAGE} 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 5.7.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RMShapesPageControl/Pods-RMShapesPageControl-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | ${PODS_DEVELOPMENT_LANGUAGE} 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/SnapKit/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RMShapesPageControl/Pods-RMShapesPageControl.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" 6 | LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' 7 | LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift $(SDKROOT)/usr/lib/swift 8 | OTHER_LDFLAGS = $(inherited) -l"swiftCoreGraphics" -framework "SnapKit" 9 | OTHER_MODULE_VERIFIER_FLAGS = $(inherited) "-F${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 10 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 11 | PODS_BUILD_DIR = ${BUILD_DIR} 12 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 13 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 14 | PODS_ROOT = ${SRCROOT}/Pods 15 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 16 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RMShapesPageControl/Pods-RMShapesPageControl.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" 6 | LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' 7 | LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift $(SDKROOT)/usr/lib/swift 8 | OTHER_LDFLAGS = $(inherited) -l"swiftCoreGraphics" -framework "SnapKit" 9 | OTHER_MODULE_VERIFIER_FLAGS = $(inherited) "-F${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 10 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 11 | PODS_BUILD_DIR = ${BUILD_DIR} 12 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 13 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 14 | PODS_ROOT = ${SRCROOT}/Pods 15 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 16 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RMShapesPageControl/Pods-RMShapesPageControl-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## SnapKit 5 | 6 | Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /RMShapesPageControl/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // RMShapesPageControl 4 | // 5 | // Created by Rupam Mitra on 20/06/25. 6 | // 7 | 8 | import UIKit 9 | 10 | @main 11 | class AppDelegate: UIResponder, UIApplicationDelegate { 12 | 13 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 14 | // Override point for customization after application launch. 15 | return true 16 | } 17 | 18 | // MARK: UISceneSession Lifecycle 19 | 20 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 21 | // Called when a new scene session is being created. 22 | // Use this method to select a configuration to create the new scene with. 23 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 24 | } 25 | 26 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 27 | // Called when the user discards a scene session. 28 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 29 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if canImport(UIKit) 32 | public typealias ConstraintView = UIView 33 | #else 34 | public typealias ConstraintView = NSView 35 | #endif 36 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintInsets.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if canImport(UIKit) 32 | public typealias ConstraintInsets = UIEdgeInsets 33 | #else 34 | public typealias ConstraintInsets = NSEdgeInsets 35 | #endif 36 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintDirectionalInsets.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if canImport(UIKit) 32 | @available(iOS 11.0, tvOS 11.0, *) 33 | public typealias ConstraintDirectionalInsets = NSDirectionalEdgeInsets 34 | #endif 35 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintLayoutSupport.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if canImport(UIKit) 32 | @available(iOS 8.0, *) 33 | public typealias ConstraintLayoutSupport = UILayoutSupport 34 | #else 35 | public class ConstraintLayoutSupport {} 36 | #endif 37 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/UILayoutSupport+Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #endif 27 | 28 | 29 | @available(iOS 8.0, *) 30 | public extension ConstraintLayoutSupport { 31 | 32 | var snp: ConstraintLayoutSupportDSL { 33 | return ConstraintLayoutSupportDSL(support: self) 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintLayoutGuide+Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #endif 27 | 28 | 29 | @available(iOS 9.0, OSX 10.11, *) 30 | public extension ConstraintLayoutGuide { 31 | 32 | var snp: ConstraintLayoutGuideDSL { 33 | return ConstraintLayoutGuideDSL(guide: self) 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintLayoutGuide.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if canImport(UIKit) 32 | @available(iOS 9.0, *) 33 | public typealias ConstraintLayoutGuide = UILayoutGuide 34 | #else 35 | @available(OSX 10.11, *) 36 | public typealias ConstraintLayoutGuide = NSLayoutGuide 37 | #endif 38 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintConfig.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | public typealias ConstraintInterfaceLayoutDirection = UIUserInterfaceLayoutDirection 27 | #else 28 | import AppKit 29 | public typealias ConstraintInterfaceLayoutDirection = NSUserInterfaceLayoutDirection 30 | #endif 31 | 32 | 33 | public struct ConstraintConfig { 34 | 35 | public static var interfaceLayoutDirection: ConstraintInterfaceLayoutDirection = .leftToRight 36 | 37 | } 38 | -------------------------------------------------------------------------------- /RMShapesPageControl/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintRelation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | internal enum ConstraintRelation : Int { 32 | case equal = 1 33 | case lessThanOrEqual 34 | case greaterThanOrEqual 35 | 36 | internal var layoutRelation: LayoutRelation { 37 | get { 38 | switch(self) { 39 | case .equal: 40 | return .equal 41 | case .lessThanOrEqual: 42 | return .lessThanOrEqual 43 | case .greaterThanOrEqual: 44 | return .greaterThanOrEqual 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/Typealiases.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | import Foundation 25 | 26 | #if canImport(UIKit) 27 | import UIKit 28 | #if swift(>=4.2) 29 | typealias LayoutRelation = NSLayoutConstraint.Relation 30 | typealias LayoutAttribute = NSLayoutConstraint.Attribute 31 | #else 32 | typealias LayoutRelation = NSLayoutRelation 33 | typealias LayoutAttribute = NSLayoutAttribute 34 | #endif 35 | typealias LayoutPriority = UILayoutPriority 36 | #else 37 | import AppKit 38 | typealias LayoutRelation = NSLayoutConstraint.Relation 39 | typealias LayoutAttribute = NSLayoutConstraint.Attribute 40 | typealias LayoutPriority = NSLayoutConstraint.Priority 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintMakerFinalizable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintMakerFinalizable { 32 | 33 | internal let description: ConstraintDescription 34 | 35 | internal init(_ description: ConstraintDescription) { 36 | self.description = description 37 | } 38 | 39 | @discardableResult 40 | public func labeled(_ label: String) -> ConstraintMakerFinalizable { 41 | self.description.label = label 42 | return self 43 | } 44 | 45 | public var constraint: Constraint { 46 | return self.description.constraint! 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintDirectionalInsetTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | #if canImport(UIKit) 31 | public protocol ConstraintDirectionalInsetTarget: ConstraintConstantTarget { 32 | } 33 | 34 | @available(iOS 11.0, tvOS 11.0, *) 35 | extension ConstraintDirectionalInsets: ConstraintDirectionalInsetTarget { 36 | } 37 | 38 | extension ConstraintDirectionalInsetTarget { 39 | 40 | @available(iOS 11.0, tvOS 11.0, *) 41 | internal var constraintDirectionalInsetTargetValue: ConstraintDirectionalInsets { 42 | if let amount = self as? ConstraintDirectionalInsets { 43 | return amount 44 | } else { 45 | return ConstraintDirectionalInsets(top: 0, leading: 0, bottom: 0, trailing: 0) 46 | } 47 | } 48 | } 49 | #endif 50 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintLayoutSupportDSL.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | @available(iOS 8.0, *) 32 | public struct ConstraintLayoutSupportDSL: ConstraintDSL { 33 | 34 | public var target: AnyObject? { 35 | return self.support 36 | } 37 | 38 | internal let support: ConstraintLayoutSupport 39 | 40 | internal init(support: ConstraintLayoutSupport) { 41 | self.support = support 42 | 43 | } 44 | 45 | public var top: ConstraintItem { 46 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.top) 47 | } 48 | 49 | public var bottom: ConstraintItem { 50 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.bottom) 51 | } 52 | 53 | public var height: ConstraintItem { 54 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.height) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/rupammitra.xcuserdatad/xcschemes/SnapKit.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public final class ConstraintItem { 32 | 33 | internal weak var target: AnyObject? 34 | internal let attributes: ConstraintAttributes 35 | 36 | internal init(target: AnyObject?, attributes: ConstraintAttributes) { 37 | self.target = target 38 | self.attributes = attributes 39 | } 40 | 41 | internal var layoutConstraintItem: LayoutConstraintItem? { 42 | return self.target as? LayoutConstraintItem 43 | } 44 | 45 | } 46 | 47 | public func ==(lhs: ConstraintItem, rhs: ConstraintItem) -> Bool { 48 | // pointer equality 49 | guard lhs !== rhs else { 50 | return true 51 | } 52 | 53 | // must both have valid targets and identical attributes 54 | guard let target1 = lhs.target, 55 | let target2 = rhs.target, 56 | target1 === target2 && lhs.attributes == rhs.attributes else { 57 | return false 58 | } 59 | 60 | return true 61 | } 62 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/rupammitra.xcuserdatad/xcschemes/SnapKit-SnapKit_Privacy.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/rupammitra.xcuserdatad/xcschemes/Pods-RMShapesPageControl.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintRelatableTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintRelatableTarget { 32 | } 33 | 34 | extension Int: ConstraintRelatableTarget { 35 | } 36 | 37 | extension UInt: ConstraintRelatableTarget { 38 | } 39 | 40 | extension Float: ConstraintRelatableTarget { 41 | } 42 | 43 | extension Double: ConstraintRelatableTarget { 44 | } 45 | 46 | extension CGFloat: ConstraintRelatableTarget { 47 | } 48 | 49 | extension CGSize: ConstraintRelatableTarget { 50 | } 51 | 52 | extension CGPoint: ConstraintRelatableTarget { 53 | } 54 | 55 | extension ConstraintInsets: ConstraintRelatableTarget { 56 | } 57 | 58 | #if canImport(UIKit) 59 | @available(iOS 11.0, tvOS 11.0, *) 60 | extension ConstraintDirectionalInsets: ConstraintRelatableTarget { 61 | } 62 | #endif 63 | 64 | extension ConstraintItem: ConstraintRelatableTarget { 65 | } 66 | 67 | extension ConstraintView: ConstraintRelatableTarget { 68 | } 69 | 70 | @available(iOS 9.0, OSX 10.11, *) 71 | extension ConstraintLayoutGuide: ConstraintRelatableTarget { 72 | } 73 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RMShapesPageControl/Pods-RMShapesPageControl-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | SnapKit 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - https://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintMultiplierTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintMultiplierTarget { 32 | 33 | var constraintMultiplierTargetValue: CGFloat { get } 34 | 35 | } 36 | 37 | extension Int: ConstraintMultiplierTarget { 38 | 39 | public var constraintMultiplierTargetValue: CGFloat { 40 | return CGFloat(self) 41 | } 42 | 43 | } 44 | 45 | extension UInt: ConstraintMultiplierTarget { 46 | 47 | public var constraintMultiplierTargetValue: CGFloat { 48 | return CGFloat(self) 49 | } 50 | 51 | } 52 | 53 | extension Float: ConstraintMultiplierTarget { 54 | 55 | public var constraintMultiplierTargetValue: CGFloat { 56 | return CGFloat(self) 57 | } 58 | 59 | } 60 | 61 | extension Double: ConstraintMultiplierTarget { 62 | 63 | public var constraintMultiplierTargetValue: CGFloat { 64 | return CGFloat(self) 65 | } 66 | 67 | } 68 | 69 | extension CGFloat: ConstraintMultiplierTarget { 70 | 71 | public var constraintMultiplierTargetValue: CGFloat { 72 | return self 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintOffsetTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintOffsetTarget: ConstraintConstantTarget { 32 | } 33 | 34 | extension Int: ConstraintOffsetTarget { 35 | } 36 | 37 | extension UInt: ConstraintOffsetTarget { 38 | } 39 | 40 | extension Float: ConstraintOffsetTarget { 41 | } 42 | 43 | extension Double: ConstraintOffsetTarget { 44 | } 45 | 46 | extension CGFloat: ConstraintOffsetTarget { 47 | } 48 | 49 | extension ConstraintOffsetTarget { 50 | 51 | internal var constraintOffsetTargetValue: CGFloat { 52 | let offset: CGFloat 53 | if let amount = self as? Float { 54 | offset = CGFloat(amount) 55 | } else if let amount = self as? Double { 56 | offset = CGFloat(amount) 57 | } else if let amount = self as? CGFloat { 58 | offset = CGFloat(amount) 59 | } else if let amount = self as? Int { 60 | offset = CGFloat(amount) 61 | } else if let amount = self as? UInt { 62 | offset = CGFloat(amount) 63 | } else { 64 | offset = 0.0 65 | } 66 | return offset 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/LayoutConstraint.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class LayoutConstraint : NSLayoutConstraint { 32 | 33 | public var label: String? { 34 | get { 35 | return self.identifier 36 | } 37 | set { 38 | self.identifier = newValue 39 | } 40 | } 41 | 42 | internal weak var constraint: Constraint? = nil 43 | 44 | } 45 | 46 | internal func ==(lhs: LayoutConstraint, rhs: LayoutConstraint) -> Bool { 47 | // If firstItem or secondItem on either constraint has a dangling pointer 48 | // this comparison can cause a crash. The solution for this is to ensure 49 | // your layout code hold strong references to things like Views, LayoutGuides 50 | // and LayoutAnchors as SnapKit will not keep strong references to any of these. 51 | guard lhs.firstAttribute == rhs.firstAttribute && 52 | lhs.secondAttribute == rhs.secondAttribute && 53 | lhs.relation == rhs.relation && 54 | lhs.priority == rhs.priority && 55 | lhs.multiplier == rhs.multiplier && 56 | lhs.secondItem === rhs.secondItem && 57 | lhs.firstItem === rhs.firstItem else { 58 | return false 59 | } 60 | return true 61 | } 62 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintPriorityTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintPriorityTarget { 32 | 33 | var constraintPriorityTargetValue: Float { get } 34 | 35 | } 36 | 37 | extension Int: ConstraintPriorityTarget { 38 | 39 | public var constraintPriorityTargetValue: Float { 40 | return Float(self) 41 | } 42 | 43 | } 44 | 45 | extension UInt: ConstraintPriorityTarget { 46 | 47 | public var constraintPriorityTargetValue: Float { 48 | return Float(self) 49 | } 50 | 51 | } 52 | 53 | extension Float: ConstraintPriorityTarget { 54 | 55 | public var constraintPriorityTargetValue: Float { 56 | return self 57 | } 58 | 59 | } 60 | 61 | extension Double: ConstraintPriorityTarget { 62 | 63 | public var constraintPriorityTargetValue: Float { 64 | return Float(self) 65 | } 66 | 67 | } 68 | 69 | extension CGFloat: ConstraintPriorityTarget { 70 | 71 | public var constraintPriorityTargetValue: Float { 72 | return Float(self) 73 | } 74 | 75 | } 76 | 77 | #if canImport(UIKit) 78 | extension UILayoutPriority: ConstraintPriorityTarget { 79 | 80 | public var constraintPriorityTargetValue: Float { 81 | return self.rawValue 82 | } 83 | 84 | } 85 | #endif 86 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintLayoutGuideDSL.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | @available(iOS 9.0, OSX 10.11, *) 32 | public struct ConstraintLayoutGuideDSL: ConstraintAttributesDSL { 33 | 34 | @discardableResult 35 | public func prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { 36 | return ConstraintMaker.prepareConstraints(item: self.guide, closure: closure) 37 | } 38 | 39 | public func makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 40 | ConstraintMaker.makeConstraints(item: self.guide, closure: closure) 41 | } 42 | 43 | public func remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 44 | ConstraintMaker.remakeConstraints(item: self.guide, closure: closure) 45 | } 46 | 47 | public func updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 48 | ConstraintMaker.updateConstraints(item: self.guide, closure: closure) 49 | } 50 | 51 | public func removeConstraints() { 52 | ConstraintMaker.removeConstraints(item: self.guide) 53 | } 54 | 55 | public var target: AnyObject? { 56 | return self.guide 57 | } 58 | 59 | internal let guide: ConstraintLayoutGuide 60 | 61 | internal init(guide: ConstraintLayoutGuide) { 62 | self.guide = guide 63 | 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintMakerEditable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintMakerEditable: ConstraintMakerPrioritizable { 32 | 33 | @discardableResult 34 | public func multipliedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable { 35 | self.description.multiplier = amount 36 | return self 37 | } 38 | 39 | @discardableResult 40 | public func dividedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable { 41 | return self.multipliedBy(1.0 / amount.constraintMultiplierTargetValue) 42 | } 43 | 44 | @discardableResult 45 | public func offset(_ amount: ConstraintOffsetTarget) -> ConstraintMakerEditable { 46 | self.description.constant = amount.constraintOffsetTargetValue 47 | return self 48 | } 49 | 50 | @discardableResult 51 | public func inset(_ amount: ConstraintInsetTarget) -> ConstraintMakerEditable { 52 | self.description.constant = amount.constraintInsetTargetValue 53 | return self 54 | } 55 | 56 | #if canImport(UIKit) 57 | @discardableResult 58 | @available(iOS 11.0, tvOS 11.0, *) 59 | public func inset(_ amount: ConstraintDirectionalInsetTarget) -> ConstraintMakerEditable { 60 | self.description.constant = amount.constraintDirectionalInsetTargetValue 61 | return self 62 | } 63 | #endif 64 | } 65 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintPriority.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | public struct ConstraintPriority : ExpressibleByFloatLiteral, Equatable, Strideable { 31 | public typealias FloatLiteralType = Float 32 | 33 | public let value: Float 34 | 35 | public init(floatLiteral value: Float) { 36 | self.value = value 37 | } 38 | 39 | public init(_ value: Float) { 40 | self.value = value 41 | } 42 | 43 | public static var required: ConstraintPriority { 44 | return 1000.0 45 | } 46 | 47 | public static var high: ConstraintPriority { 48 | return 750.0 49 | } 50 | 51 | public static var medium: ConstraintPriority { 52 | #if os(OSX) 53 | return 501.0 54 | #else 55 | return 500.0 56 | #endif 57 | 58 | } 59 | 60 | public static var low: ConstraintPriority { 61 | return 250.0 62 | } 63 | 64 | public static func ==(lhs: ConstraintPriority, rhs: ConstraintPriority) -> Bool { 65 | return lhs.value == rhs.value 66 | } 67 | 68 | // MARK: Strideable 69 | 70 | public func advanced(by n: FloatLiteralType) -> ConstraintPriority { 71 | return ConstraintPriority(floatLiteral: value + n) 72 | } 73 | 74 | public func distance(to other: ConstraintPriority) -> FloatLiteralType { 75 | return other.value - value 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /RMShapesPageControl/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // RMShapesPageControl 4 | // 5 | // Created by Rupam Mitra on 20/06/25. 6 | // 7 | 8 | import UIKit 9 | 10 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 11 | 12 | var window: UIWindow? 13 | 14 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 15 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 16 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 17 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 18 | guard let windowScene = (scene as? UIWindowScene) else { return } 19 | 20 | let window = UIWindow(windowScene: windowScene) 21 | let rootVC = ViewController() 22 | window.rootViewController = rootVC 23 | self.window = window 24 | window.makeKeyAndVisible() 25 | } 26 | 27 | func sceneDidDisconnect(_ scene: UIScene) { 28 | // Called as the scene is being released by the system. 29 | // This occurs shortly after the scene enters the background, or when its session is discarded. 30 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 31 | // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). 32 | } 33 | 34 | func sceneDidBecomeActive(_ scene: UIScene) { 35 | // Called when the scene has moved from an inactive state to an active state. 36 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 37 | } 38 | 39 | func sceneWillResignActive(_ scene: UIScene) { 40 | // Called when the scene will move from an active state to an inactive state. 41 | // This may occur due to temporary interruptions (ex. an incoming phone call). 42 | } 43 | 44 | func sceneWillEnterForeground(_ scene: UIScene) { 45 | // Called as the scene transitions from the background to the foreground. 46 | // Use this method to undo the changes made on entering the background. 47 | } 48 | 49 | func sceneDidEnterBackground(_ scene: UIScene) { 50 | // Called as the scene transitions from the foreground to the background. 51 | // Use this method to save data, release shared resources, and store enough scene-specific state information 52 | // to restore the scene back to its current state. 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintDescription.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintDescription { 32 | 33 | internal let item: LayoutConstraintItem 34 | internal var attributes: ConstraintAttributes 35 | internal var relation: ConstraintRelation? = nil 36 | internal var sourceLocation: (String, UInt)? = nil 37 | internal var label: String? = nil 38 | internal var related: ConstraintItem? = nil 39 | internal var multiplier: ConstraintMultiplierTarget = 1.0 40 | internal var constant: ConstraintConstantTarget = 0.0 41 | internal var priority: ConstraintPriorityTarget = 1000.0 42 | internal lazy var constraint: Constraint? = { 43 | guard let relation = self.relation, 44 | let related = self.related, 45 | let sourceLocation = self.sourceLocation else { 46 | return nil 47 | } 48 | let from = ConstraintItem(target: self.item, attributes: self.attributes) 49 | 50 | return Constraint( 51 | from: from, 52 | to: related, 53 | relation: relation, 54 | sourceLocation: sourceLocation, 55 | label: self.label, 56 | multiplier: self.multiplier, 57 | constant: self.constant, 58 | priority: self.priority 59 | ) 60 | }() 61 | 62 | // MARK: Initialization 63 | 64 | internal init(item: LayoutConstraintItem, attributes: ConstraintAttributes) { 65 | self.item = item 66 | self.attributes = attributes 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintMakerPrioritizable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | @available(*, deprecated, message:"Use ConstraintMakerPrioritizable instead.") 31 | public typealias ConstraintMakerPriortizable = ConstraintMakerPrioritizable 32 | 33 | public class ConstraintMakerPrioritizable: ConstraintMakerFinalizable { 34 | 35 | @discardableResult 36 | public func priority(_ amount: ConstraintPriority) -> ConstraintMakerFinalizable { 37 | self.description.priority = amount.value 38 | return self 39 | } 40 | 41 | @discardableResult 42 | public func priority(_ amount: ConstraintPriorityTarget) -> ConstraintMakerFinalizable { 43 | self.description.priority = amount 44 | return self 45 | } 46 | 47 | @available(*, deprecated, message:"Use priority(.required) instead.") 48 | @discardableResult 49 | public func priorityRequired() -> ConstraintMakerFinalizable { 50 | return self.priority(.required) 51 | } 52 | 53 | @available(*, deprecated, message:"Use priority(.high) instead.") 54 | @discardableResult 55 | public func priorityHigh() -> ConstraintMakerFinalizable { 56 | return self.priority(.high) 57 | } 58 | 59 | @available(*, deprecated, message:"Use priority(.medium) instead.") 60 | @discardableResult 61 | public func priorityMedium() -> ConstraintMakerFinalizable { 62 | return self.priority(.medium) 63 | } 64 | 65 | @available(*, deprecated, message:"Use priority(.low) instead.") 66 | @discardableResult 67 | public func priorityLow() -> ConstraintMakerFinalizable { 68 | return self.priority(.low) 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintMakerRelatable+Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | extension ConstraintMakerRelatable { 32 | 33 | @discardableResult 34 | public func equalToSuperview(_ closure: (ConstraintView) -> T, _ file: String = #file, line: UInt = #line) -> ConstraintMakerEditable { 35 | guard let other = self.description.item.superview else { 36 | fatalError("Expected superview but found nil when attempting make constraint `equalToSuperview`.") 37 | } 38 | return self.relatedTo(closure(other), relation: .equal, file: file, line: line) 39 | } 40 | 41 | @discardableResult 42 | public func lessThanOrEqualToSuperview(_ closure: (ConstraintView) -> T, _ file: String = #file, line: UInt = #line) -> ConstraintMakerEditable { 43 | guard let other = self.description.item.superview else { 44 | fatalError("Expected superview but found nil when attempting make constraint `lessThanOrEqualToSuperview`.") 45 | } 46 | return self.relatedTo(closure(other), relation: .lessThanOrEqual, file: file, line: line) 47 | } 48 | 49 | @discardableResult 50 | public func greaterThanOrEqualToSuperview(_ closure: (ConstraintView) -> T, _ file: String = #file, line: UInt = #line) -> ConstraintMakerEditable { 51 | guard let other = self.description.item.superview else { 52 | fatalError("Expected superview but found nil when attempting make constraint `greaterThanOrEqualToSuperview`.") 53 | } 54 | return self.relatedTo(closure(other), relation: .greaterThanOrEqual, file: file, line: line) 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintInsetTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintInsetTarget: ConstraintConstantTarget { 32 | } 33 | 34 | extension Int: ConstraintInsetTarget { 35 | } 36 | 37 | extension UInt: ConstraintInsetTarget { 38 | } 39 | 40 | extension Float: ConstraintInsetTarget { 41 | } 42 | 43 | extension Double: ConstraintInsetTarget { 44 | } 45 | 46 | extension CGFloat: ConstraintInsetTarget { 47 | } 48 | 49 | extension ConstraintInsets: ConstraintInsetTarget { 50 | } 51 | 52 | extension ConstraintInsetTarget { 53 | 54 | internal var constraintInsetTargetValue: ConstraintInsets { 55 | if let amount = self as? ConstraintInsets { 56 | return amount 57 | } else if let amount = self as? Float { 58 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) 59 | } else if let amount = self as? Double { 60 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) 61 | } else if let amount = self as? CGFloat { 62 | return ConstraintInsets(top: amount, left: amount, bottom: amount, right: amount) 63 | } else if let amount = self as? Int { 64 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) 65 | } else if let amount = self as? UInt { 66 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) 67 | } else { 68 | return ConstraintInsets(top: 0, left: 0, bottom: 0, right: 0) 69 | } 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/LayoutConstraintItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol LayoutConstraintItem: AnyObject { 32 | } 33 | 34 | @available(iOS 9.0, OSX 10.11, *) 35 | extension ConstraintLayoutGuide : LayoutConstraintItem { 36 | } 37 | 38 | extension ConstraintView : LayoutConstraintItem { 39 | } 40 | 41 | 42 | extension LayoutConstraintItem { 43 | 44 | internal func prepare() { 45 | if let view = self as? ConstraintView { 46 | view.translatesAutoresizingMaskIntoConstraints = false 47 | } 48 | } 49 | 50 | internal var superview: ConstraintView? { 51 | if let view = self as? ConstraintView { 52 | return view.superview 53 | } 54 | 55 | if #available(iOS 9.0, OSX 10.11, *), let guide = self as? ConstraintLayoutGuide { 56 | return guide.owningView 57 | } 58 | 59 | return nil 60 | } 61 | internal var constraints: [Constraint] { 62 | return self.constraintsSet.allObjects as! [Constraint] 63 | } 64 | 65 | internal func add(constraints: [Constraint]) { 66 | let constraintsSet = self.constraintsSet 67 | for constraint in constraints { 68 | constraintsSet.add(constraint) 69 | } 70 | } 71 | 72 | internal func remove(constraints: [Constraint]) { 73 | let constraintsSet = self.constraintsSet 74 | for constraint in constraints { 75 | constraintsSet.remove(constraint) 76 | } 77 | } 78 | 79 | private var constraintsSet: NSMutableSet { 80 | let constraintsSet: NSMutableSet 81 | 82 | if let existing = objc_getAssociatedObject(self, &constraintsKey) as? NSMutableSet { 83 | constraintsSet = existing 84 | } else { 85 | constraintsSet = NSMutableSet() 86 | objc_setAssociatedObject(self, &constraintsKey, constraintsSet, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) 87 | } 88 | return constraintsSet 89 | 90 | } 91 | 92 | } 93 | private var constraintsKey: UInt8 = 0 94 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintViewDSL.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public struct ConstraintViewDSL: ConstraintAttributesDSL { 32 | 33 | @discardableResult 34 | public func prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { 35 | return ConstraintMaker.prepareConstraints(item: self.view, closure: closure) 36 | } 37 | 38 | public func makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 39 | ConstraintMaker.makeConstraints(item: self.view, closure: closure) 40 | } 41 | 42 | public func remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 43 | ConstraintMaker.remakeConstraints(item: self.view, closure: closure) 44 | } 45 | 46 | public func updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 47 | ConstraintMaker.updateConstraints(item: self.view, closure: closure) 48 | } 49 | 50 | public func removeConstraints() { 51 | ConstraintMaker.removeConstraints(item: self.view) 52 | } 53 | 54 | public var contentHuggingHorizontalPriority: Float { 55 | get { 56 | return self.view.contentHuggingPriority(for: .horizontal).rawValue 57 | } 58 | nonmutating set { 59 | self.view.setContentHuggingPriority(LayoutPriority(rawValue: newValue), for: .horizontal) 60 | } 61 | } 62 | 63 | public var contentHuggingVerticalPriority: Float { 64 | get { 65 | return self.view.contentHuggingPriority(for: .vertical).rawValue 66 | } 67 | nonmutating set { 68 | self.view.setContentHuggingPriority(LayoutPriority(rawValue: newValue), for: .vertical) 69 | } 70 | } 71 | 72 | public var contentCompressionResistanceHorizontalPriority: Float { 73 | get { 74 | return self.view.contentCompressionResistancePriority(for: .horizontal).rawValue 75 | } 76 | nonmutating set { 77 | self.view.setContentCompressionResistancePriority(LayoutPriority(rawValue: newValue), for: .horizontal) 78 | } 79 | } 80 | 81 | public var contentCompressionResistanceVerticalPriority: Float { 82 | get { 83 | return self.view.contentCompressionResistancePriority(for: .vertical).rawValue 84 | } 85 | nonmutating set { 86 | self.view.setContentCompressionResistancePriority(LayoutPriority(rawValue: newValue), for: .vertical) 87 | } 88 | } 89 | 90 | public var target: AnyObject? { 91 | return self.view 92 | } 93 | 94 | internal let view: ConstraintView 95 | 96 | internal init(view: ConstraintView) { 97 | self.view = view 98 | 99 | } 100 | 101 | } 102 | -------------------------------------------------------------------------------- /Pods/SnapKit/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | SnapKit is a DSL to make Auto Layout easy on both iOS and OS X. 4 | 5 | [![Build Status](https://travis-ci.org/SnapKit/SnapKit.svg)](https://travis-ci.org/SnapKit/SnapKit) 6 | [![Platform](https://img.shields.io/cocoapods/p/SnapKit.svg?style=flat)](https://github.com/SnapKit/SnapKit) 7 | [![Cocoapods Compatible](https://img.shields.io/cocoapods/v/SnapKit.svg)](https://cocoapods.org/pods/SnapKit) 8 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 9 | 10 | #### ⚠️ **To use with Swift 4.x please ensure you are using >= 4.0.0** ⚠️ 11 | #### ⚠️ **To use with Swift 5.x please ensure you are using >= 5.0.0** ⚠️ 12 | 13 | ## Contents 14 | 15 | - [Requirements](#requirements) 16 | - [Migration Guides](#migration-guides) 17 | - [Communication](#communication) 18 | - [Installation](#installation) 19 | - [Usage](#usage) 20 | - [Credits](#credits) 21 | - [License](#license) 22 | 23 | ## Requirements 24 | 25 | - iOS 12.0+ / Mac OS X 10.13+ / tvOS 10.0+ 26 | - Xcode 10.0+ 27 | - Swift 4.0+ 28 | 29 | ## Migration Guides 30 | 31 | - [SnapKit 3.0 Migration Guide](Documentation/SnapKit%203.0%20Migration%20Guide.md) 32 | 33 | ## Communication 34 | 35 | - If you **need help**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/snapkit). (Tag 'snapkit') 36 | - If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/snapkit). 37 | - If you **found a bug**, open an issue. 38 | - If you **have a feature request**, open an issue. 39 | - If you **want to contribute**, submit a pull request. 40 | 41 | 42 | ## Installation 43 | 44 | ### CocoaPods 45 | 46 | [CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: 47 | 48 | ```bash 49 | $ gem install cocoapods 50 | ``` 51 | 52 | > CocoaPods 1.1.0+ is required to build SnapKit 4.0.0+. 53 | 54 | To integrate SnapKit into your Xcode project using CocoaPods, specify it in your `Podfile`: 55 | 56 | ```ruby 57 | source 'https://github.com/CocoaPods/Specs.git' 58 | platform :ios, '10.0' 59 | use_frameworks! 60 | 61 | target '' do 62 | pod 'SnapKit', '~> 5.7.0' 63 | end 64 | ``` 65 | 66 | Then, run the following command: 67 | 68 | ```bash 69 | $ pod install 70 | ``` 71 | 72 | ### Carthage 73 | 74 | [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. 75 | 76 | You can install Carthage with [Homebrew](http://brew.sh/) using the following command: 77 | 78 | ```bash 79 | $ brew update 80 | $ brew install carthage 81 | ``` 82 | 83 | To integrate SnapKit into your Xcode project using Carthage, specify it in your `Cartfile`: 84 | 85 | ```ogdl 86 | github "SnapKit/SnapKit" ~> 5.0.0 87 | ``` 88 | 89 | Run `carthage update` to build the framework and drag the built `SnapKit.framework` into your Xcode project. 90 | 91 | ### Swift Package Manager 92 | 93 | [Swift Package Manager](https://swift.org/package-manager/) is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies. 94 | 95 | > Xcode 11+ is required to build SnapKit using Swift Package Manager. 96 | 97 | To integrate SnapKit into your Xcode project using Swift Package Manager, add it to the dependencies value of your `Package.swift`: 98 | 99 | ```swift 100 | dependencies: [ 101 | .package(url: "https://github.com/SnapKit/SnapKit.git", .upToNextMajor(from: "5.0.1")) 102 | ] 103 | ``` 104 | 105 | ### Manually 106 | 107 | If you prefer not to use either of the aforementioned dependency managers, you can integrate SnapKit into your project manually. 108 | 109 | --- 110 | 111 | ## Usage 112 | 113 | ### Quick Start 114 | 115 | ```swift 116 | import SnapKit 117 | 118 | class MyViewController: UIViewController { 119 | 120 | lazy var box = UIView() 121 | 122 | override func viewDidLoad() { 123 | super.viewDidLoad() 124 | 125 | self.view.addSubview(box) 126 | box.backgroundColor = .green 127 | box.snp.makeConstraints { (make) -> Void in 128 | make.width.height.equalTo(50) 129 | make.center.equalTo(self.view) 130 | } 131 | } 132 | 133 | } 134 | ``` 135 | 136 | ### Playground 137 | You can try SnapKit in Playground. 138 | 139 | **Note:** 140 | 141 | > To try SnapKit in playground, open `SnapKit.xcworkspace` and build SnapKit.framework for any simulator first. 142 | 143 | ### Resources 144 | 145 | - [Documentation](https://snapkit.github.io/SnapKit/docs/) 146 | - [F.A.Q.](https://snapkit.github.io/SnapKit/faq/) 147 | 148 | ## Credits 149 | 150 | - Robert Payne ([@robertjpayne](https://twitter.com/robertjpayne)) 151 | - Many other contributors 152 | 153 | ## License 154 | 155 | SnapKit is released under the MIT license. See LICENSE for details. 156 | -------------------------------------------------------------------------------- /RMShapesPageControl/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // RMShapesPageControl 4 | // 5 | // Created by Rupam Mitra on 20/06/25. 6 | // 7 | 8 | import UIKit 9 | import SnapKit 10 | 11 | class ViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate { 12 | 13 | private lazy var collectionView: UICollectionView = { 14 | let layout = UICollectionViewFlowLayout() 15 | layout.scrollDirection = .horizontal 16 | layout.itemSize = CGSize(width: 200, height: 200) 17 | layout.minimumLineSpacing = 0 18 | 19 | let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout) 20 | collectionView.isPagingEnabled = true 21 | collectionView.showsHorizontalScrollIndicator = false 22 | collectionView.backgroundColor = .clear 23 | collectionView.dataSource = self 24 | collectionView.delegate = self 25 | collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "Cell") 26 | return collectionView 27 | }() 28 | 29 | private lazy var bottomPageControl: RMShapesPageControl = { 30 | let control = RMShapesPageControl() 31 | control.shape = .triangleUp 32 | control.indicatorSpacing = 16 33 | control.currentPageTintColor = .red 34 | control.pageIndicatorTintColor = .gray 35 | control.numberOfPages = 5 36 | control.currentPage = 0 37 | return control 38 | }() 39 | 40 | private lazy var leftPageControl: RMShapesPageControl = { 41 | let control = RMShapesPageControl() 42 | control.isVertical = true 43 | control.shape = .rectangleHorizontal 44 | control.indicatorSpacing = 16 45 | control.currentPageTintColor = .blue 46 | control.pageIndicatorTintColor = .gray 47 | control.numberOfPages = 5 48 | control.currentPage = 0 49 | return control 50 | }() 51 | 52 | private lazy var topPageControl: RMShapesPageControl = { 53 | let control = RMShapesPageControl() 54 | control.shape = .pentagon 55 | control.indicatorSpacing = 16 56 | control.currentPageTintColor = .green 57 | control.pageIndicatorTintColor = .gray 58 | control.numberOfPages = 5 59 | control.currentPage = 0 60 | return control 61 | }() 62 | 63 | private lazy var rightPageControl: RMShapesPageControl = { 64 | let control = RMShapesPageControl() 65 | control.isVertical = true 66 | control.shape = .hexagon 67 | control.indicatorSpacing = 16 68 | control.currentPageTintColor = .purple 69 | control.pageIndicatorTintColor = .gray 70 | control.numberOfPages = 5 71 | control.currentPage = 0 72 | return control 73 | }() 74 | 75 | override func viewDidLoad() { 76 | super.viewDidLoad() 77 | // Do any additional setup after loading the view. 78 | setupViews() 79 | setupLayout() 80 | } 81 | 82 | private func setupViews() { 83 | view.backgroundColor = .systemBackground 84 | view.addSubview(collectionView) 85 | view.addSubview(bottomPageControl) 86 | view.addSubview(leftPageControl) 87 | view.addSubview(topPageControl) 88 | view.addSubview(rightPageControl) 89 | setupLayout() 90 | } 91 | 92 | private func setupLayout() { 93 | collectionView.snp.makeConstraints { make in 94 | make.center.equalToSuperview() 95 | make.width.height.equalTo(200) 96 | } 97 | bottomPageControl.snp.makeConstraints { make in 98 | make.centerX.equalToSuperview() 99 | make.bottom.equalToSuperview().inset(40) 100 | make.height.equalTo(30) 101 | make.width.equalTo(150) 102 | } 103 | leftPageControl.snp.makeConstraints { make in 104 | make.centerY.equalToSuperview() 105 | make.leading.equalToSuperview().inset(20) 106 | make.width.equalTo(30) 107 | make.height.equalTo(200) 108 | } 109 | topPageControl.snp.makeConstraints { make in 110 | make.centerX.equalToSuperview() 111 | make.top.equalToSuperview().inset(80) 112 | make.height.equalTo(30) 113 | make.width.equalTo(150) 114 | } 115 | rightPageControl.snp.makeConstraints { make in 116 | make.centerY.equalToSuperview() 117 | make.trailing.equalToSuperview().inset(20) 118 | make.width.equalTo(30) 119 | make.height.equalTo(200) 120 | } 121 | } 122 | 123 | func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { 124 | return bottomPageControl.numberOfPages 125 | } 126 | 127 | func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { 128 | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "Cell", for: indexPath) 129 | cell.backgroundColor = UIColor(hue: CGFloat(indexPath.item) / CGFloat(bottomPageControl.numberOfPages), 130 | saturation: 0.5, 131 | brightness: 0.9, 132 | alpha: 1) 133 | return cell 134 | } 135 | 136 | func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) { 137 | let pageIndex = Int(round(scrollView.contentOffset.x / scrollView.frame.width)) 138 | bottomPageControl.currentPage = pageIndex 139 | leftPageControl.currentPage = pageIndex 140 | topPageControl.currentPage = pageIndex 141 | rightPageControl.currentPage = pageIndex 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintMakerRelatable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintMakerRelatable { 32 | 33 | internal let description: ConstraintDescription 34 | 35 | internal init(_ description: ConstraintDescription) { 36 | self.description = description 37 | } 38 | 39 | internal func relatedTo(_ other: ConstraintRelatableTarget, relation: ConstraintRelation, file: String, line: UInt) -> ConstraintMakerEditable { 40 | let related: ConstraintItem 41 | let constant: ConstraintConstantTarget 42 | 43 | if let other = other as? ConstraintItem { 44 | guard other.attributes == ConstraintAttributes.none || 45 | other.attributes.layoutAttributes.count <= 1 || 46 | other.attributes.layoutAttributes == self.description.attributes.layoutAttributes || 47 | other.attributes == .edges && self.description.attributes == .margins || 48 | other.attributes == .margins && self.description.attributes == .edges || 49 | other.attributes == .directionalEdges && self.description.attributes == .directionalMargins || 50 | other.attributes == .directionalMargins && self.description.attributes == .directionalEdges else { 51 | fatalError("Cannot constraint to multiple non identical attributes. (\(file), \(line))"); 52 | } 53 | 54 | related = other 55 | constant = 0.0 56 | } else if let other = other as? ConstraintView { 57 | related = ConstraintItem(target: other, attributes: ConstraintAttributes.none) 58 | constant = 0.0 59 | } else if let other = other as? ConstraintConstantTarget { 60 | related = ConstraintItem(target: nil, attributes: ConstraintAttributes.none) 61 | constant = other 62 | } else if #available(iOS 9.0, OSX 10.11, *), let other = other as? ConstraintLayoutGuide { 63 | related = ConstraintItem(target: other, attributes: ConstraintAttributes.none) 64 | constant = 0.0 65 | } else { 66 | fatalError("Invalid constraint. (\(file), \(line))") 67 | } 68 | 69 | let editable = ConstraintMakerEditable(self.description) 70 | editable.description.sourceLocation = (file, line) 71 | editable.description.relation = relation 72 | editable.description.related = related 73 | editable.description.constant = constant 74 | return editable 75 | } 76 | 77 | @discardableResult 78 | public func equalTo(_ other: ConstraintRelatableTarget, _ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable { 79 | return self.relatedTo(other, relation: .equal, file: file, line: line) 80 | } 81 | 82 | @discardableResult 83 | public func equalToSuperview(_ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable { 84 | guard let other = self.description.item.superview else { 85 | fatalError("Expected superview but found nil when attempting make constraint `equalToSuperview`.") 86 | } 87 | return self.relatedTo(other, relation: .equal, file: file, line: line) 88 | } 89 | 90 | @discardableResult 91 | public func lessThanOrEqualTo(_ other: ConstraintRelatableTarget, _ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable { 92 | return self.relatedTo(other, relation: .lessThanOrEqual, file: file, line: line) 93 | } 94 | 95 | @discardableResult 96 | public func lessThanOrEqualToSuperview(_ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable { 97 | guard let other = self.description.item.superview else { 98 | fatalError("Expected superview but found nil when attempting make constraint `lessThanOrEqualToSuperview`.") 99 | } 100 | return self.relatedTo(other, relation: .lessThanOrEqual, file: file, line: line) 101 | } 102 | 103 | @discardableResult 104 | public func greaterThanOrEqualTo(_ other: ConstraintRelatableTarget, _ file: String = #file, line: UInt = #line) -> ConstraintMakerEditable { 105 | return self.relatedTo(other, relation: .greaterThanOrEqual, file: file, line: line) 106 | } 107 | 108 | @discardableResult 109 | public func greaterThanOrEqualToSuperview(_ file: String = #file, line: UInt = #line) -> ConstraintMakerEditable { 110 | guard let other = self.description.item.superview else { 111 | fatalError("Expected superview but found nil when attempting make constraint `greaterThanOrEqualToSuperview`.") 112 | } 113 | return self.relatedTo(other, relation: .greaterThanOrEqual, file: file, line: line) 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintView+Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public extension ConstraintView { 32 | 33 | @available(*, deprecated, renamed:"snp.left") 34 | var snp_left: ConstraintItem { return self.snp.left } 35 | 36 | @available(*, deprecated, renamed:"snp.top") 37 | var snp_top: ConstraintItem { return self.snp.top } 38 | 39 | @available(*, deprecated, renamed:"snp.right") 40 | var snp_right: ConstraintItem { return self.snp.right } 41 | 42 | @available(*, deprecated, renamed:"snp.bottom") 43 | var snp_bottom: ConstraintItem { return self.snp.bottom } 44 | 45 | @available(*, deprecated, renamed:"snp.leading") 46 | var snp_leading: ConstraintItem { return self.snp.leading } 47 | 48 | @available(*, deprecated, renamed:"snp.trailing") 49 | var snp_trailing: ConstraintItem { return self.snp.trailing } 50 | 51 | @available(*, deprecated, renamed:"snp.width") 52 | var snp_width: ConstraintItem { return self.snp.width } 53 | 54 | @available(*, deprecated, renamed:"snp.height") 55 | var snp_height: ConstraintItem { return self.snp.height } 56 | 57 | @available(*, deprecated, renamed:"snp.centerX") 58 | var snp_centerX: ConstraintItem { return self.snp.centerX } 59 | 60 | @available(*, deprecated, renamed:"snp.centerY") 61 | var snp_centerY: ConstraintItem { return self.snp.centerY } 62 | 63 | @available(*, deprecated, renamed:"snp.baseline") 64 | var snp_baseline: ConstraintItem { return self.snp.baseline } 65 | 66 | @available(*, deprecated, renamed:"snp.lastBaseline") 67 | @available(iOS 8.0, OSX 10.11, *) 68 | var snp_lastBaseline: ConstraintItem { return self.snp.lastBaseline } 69 | 70 | @available(iOS, deprecated, renamed:"snp.firstBaseline") 71 | @available(iOS 8.0, OSX 10.11, *) 72 | var snp_firstBaseline: ConstraintItem { return self.snp.firstBaseline } 73 | 74 | @available(iOS, deprecated, renamed:"snp.leftMargin") 75 | @available(iOS 8.0, *) 76 | var snp_leftMargin: ConstraintItem { return self.snp.leftMargin } 77 | 78 | @available(iOS, deprecated, renamed:"snp.topMargin") 79 | @available(iOS 8.0, *) 80 | var snp_topMargin: ConstraintItem { return self.snp.topMargin } 81 | 82 | @available(iOS, deprecated, renamed:"snp.rightMargin") 83 | @available(iOS 8.0, *) 84 | var snp_rightMargin: ConstraintItem { return self.snp.rightMargin } 85 | 86 | @available(iOS, deprecated, renamed:"snp.bottomMargin") 87 | @available(iOS 8.0, *) 88 | var snp_bottomMargin: ConstraintItem { return self.snp.bottomMargin } 89 | 90 | @available(iOS, deprecated, renamed:"snp.leadingMargin") 91 | @available(iOS 8.0, *) 92 | var snp_leadingMargin: ConstraintItem { return self.snp.leadingMargin } 93 | 94 | @available(iOS, deprecated, renamed:"snp.trailingMargin") 95 | @available(iOS 8.0, *) 96 | var snp_trailingMargin: ConstraintItem { return self.snp.trailingMargin } 97 | 98 | @available(iOS, deprecated, renamed:"snp.centerXWithinMargins") 99 | @available(iOS 8.0, *) 100 | var snp_centerXWithinMargins: ConstraintItem { return self.snp.centerXWithinMargins } 101 | 102 | @available(iOS, deprecated, renamed:"snp.centerYWithinMargins") 103 | @available(iOS 8.0, *) 104 | var snp_centerYWithinMargins: ConstraintItem { return self.snp.centerYWithinMargins } 105 | 106 | @available(*, deprecated, renamed:"snp.edges") 107 | var snp_edges: ConstraintItem { return self.snp.edges } 108 | 109 | @available(*, deprecated, renamed:"snp.size") 110 | var snp_size: ConstraintItem { return self.snp.size } 111 | 112 | @available(*, deprecated, renamed:"snp.center") 113 | var snp_center: ConstraintItem { return self.snp.center } 114 | 115 | @available(iOS, deprecated, renamed:"snp.margins") 116 | @available(iOS 8.0, *) 117 | var snp_margins: ConstraintItem { return self.snp.margins } 118 | 119 | @available(iOS, deprecated, renamed:"snp.centerWithinMargins") 120 | @available(iOS 8.0, *) 121 | var snp_centerWithinMargins: ConstraintItem { return self.snp.centerWithinMargins } 122 | 123 | @available(*, deprecated, renamed:"snp.prepareConstraints(_:)") 124 | func snp_prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { 125 | return self.snp.prepareConstraints(closure) 126 | } 127 | 128 | @available(*, deprecated, renamed:"snp.makeConstraints(_:)") 129 | func snp_makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 130 | self.snp.makeConstraints(closure) 131 | } 132 | 133 | @available(*, deprecated, renamed:"snp.remakeConstraints(_:)") 134 | func snp_remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 135 | self.snp.remakeConstraints(closure) 136 | } 137 | 138 | @available(*, deprecated, renamed:"snp.updateConstraints(_:)") 139 | func snp_updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 140 | self.snp.updateConstraints(closure) 141 | } 142 | 143 | @available(*, deprecated, renamed:"snp.removeConstraints()") 144 | func snp_removeConstraints() { 145 | self.snp.removeConstraints() 146 | } 147 | 148 | var snp: ConstraintViewDSL { 149 | return ConstraintViewDSL(view: self) 150 | } 151 | 152 | } 153 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintMakerExtendable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintMakerExtendable: ConstraintMakerRelatable { 32 | 33 | public var left: ConstraintMakerExtendable { 34 | self.description.attributes += .left 35 | return self 36 | } 37 | 38 | public var top: ConstraintMakerExtendable { 39 | self.description.attributes += .top 40 | return self 41 | } 42 | 43 | public var bottom: ConstraintMakerExtendable { 44 | self.description.attributes += .bottom 45 | return self 46 | } 47 | 48 | public var right: ConstraintMakerExtendable { 49 | self.description.attributes += .right 50 | return self 51 | } 52 | 53 | public var leading: ConstraintMakerExtendable { 54 | self.description.attributes += .leading 55 | return self 56 | } 57 | 58 | public var trailing: ConstraintMakerExtendable { 59 | self.description.attributes += .trailing 60 | return self 61 | } 62 | 63 | public var width: ConstraintMakerExtendable { 64 | self.description.attributes += .width 65 | return self 66 | } 67 | 68 | public var height: ConstraintMakerExtendable { 69 | self.description.attributes += .height 70 | return self 71 | } 72 | 73 | public var centerX: ConstraintMakerExtendable { 74 | self.description.attributes += .centerX 75 | return self 76 | } 77 | 78 | public var centerY: ConstraintMakerExtendable { 79 | self.description.attributes += .centerY 80 | return self 81 | } 82 | 83 | @available(*, deprecated, renamed:"lastBaseline") 84 | public var baseline: ConstraintMakerExtendable { 85 | self.description.attributes += .lastBaseline 86 | return self 87 | } 88 | 89 | public var lastBaseline: ConstraintMakerExtendable { 90 | self.description.attributes += .lastBaseline 91 | return self 92 | } 93 | 94 | @available(iOS 8.0, OSX 10.11, *) 95 | public var firstBaseline: ConstraintMakerExtendable { 96 | self.description.attributes += .firstBaseline 97 | return self 98 | } 99 | 100 | @available(iOS 8.0, *) 101 | public var leftMargin: ConstraintMakerExtendable { 102 | self.description.attributes += .leftMargin 103 | return self 104 | } 105 | 106 | @available(iOS 8.0, *) 107 | public var rightMargin: ConstraintMakerExtendable { 108 | self.description.attributes += .rightMargin 109 | return self 110 | } 111 | 112 | @available(iOS 8.0, *) 113 | public var topMargin: ConstraintMakerExtendable { 114 | self.description.attributes += .topMargin 115 | return self 116 | } 117 | 118 | @available(iOS 8.0, *) 119 | public var bottomMargin: ConstraintMakerExtendable { 120 | self.description.attributes += .bottomMargin 121 | return self 122 | } 123 | 124 | @available(iOS 8.0, *) 125 | public var leadingMargin: ConstraintMakerExtendable { 126 | self.description.attributes += .leadingMargin 127 | return self 128 | } 129 | 130 | @available(iOS 8.0, *) 131 | public var trailingMargin: ConstraintMakerExtendable { 132 | self.description.attributes += .trailingMargin 133 | return self 134 | } 135 | 136 | @available(iOS 8.0, *) 137 | public var centerXWithinMargins: ConstraintMakerExtendable { 138 | self.description.attributes += .centerXWithinMargins 139 | return self 140 | } 141 | 142 | @available(iOS 8.0, *) 143 | public var centerYWithinMargins: ConstraintMakerExtendable { 144 | self.description.attributes += .centerYWithinMargins 145 | return self 146 | } 147 | 148 | public var edges: ConstraintMakerExtendable { 149 | self.description.attributes += .edges 150 | return self 151 | } 152 | public var horizontalEdges: ConstraintMakerExtendable { 153 | self.description.attributes += .horizontalEdges 154 | return self 155 | } 156 | public var verticalEdges: ConstraintMakerExtendable { 157 | self.description.attributes += .verticalEdges 158 | return self 159 | } 160 | public var directionalEdges: ConstraintMakerExtendable { 161 | self.description.attributes += .directionalEdges 162 | return self 163 | } 164 | public var directionalHorizontalEdges: ConstraintMakerExtendable { 165 | self.description.attributes += .directionalHorizontalEdges 166 | return self 167 | } 168 | public var directionalVerticalEdges: ConstraintMakerExtendable { 169 | self.description.attributes += .directionalVerticalEdges 170 | return self 171 | } 172 | public var size: ConstraintMakerExtendable { 173 | self.description.attributes += .size 174 | return self 175 | } 176 | 177 | @available(iOS 8.0, *) 178 | public var margins: ConstraintMakerExtendable { 179 | self.description.attributes += .margins 180 | return self 181 | } 182 | 183 | @available(iOS 8.0, *) 184 | public var directionalMargins: ConstraintMakerExtendable { 185 | self.description.attributes += .directionalMargins 186 | return self 187 | } 188 | 189 | @available(iOS 8.0, *) 190 | public var centerWithinMargins: ConstraintMakerExtendable { 191 | self.description.attributes += .centerWithinMargins 192 | return self 193 | } 194 | 195 | } 196 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/Debugging.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | public extension LayoutConstraint { 31 | 32 | override var description: String { 33 | var description = "<" 34 | 35 | description += descriptionForObject(self) 36 | 37 | if let firstItem = conditionalOptional(from: self.firstItem) { 38 | description += " \(descriptionForObject(firstItem))" 39 | } 40 | 41 | if self.firstAttribute != .notAnAttribute { 42 | description += ".\(descriptionForAttribute(self.firstAttribute))" 43 | } 44 | 45 | description += " \(descriptionForRelation(self.relation))" 46 | 47 | if let secondItem = self.secondItem { 48 | description += " \(descriptionForObject(secondItem))" 49 | } 50 | 51 | if self.secondAttribute != .notAnAttribute { 52 | description += ".\(descriptionForAttribute(self.secondAttribute))" 53 | } 54 | 55 | if self.multiplier != 1.0 { 56 | description += " * \(self.multiplier)" 57 | } 58 | 59 | if self.secondAttribute == .notAnAttribute { 60 | description += " \(self.constant)" 61 | } else { 62 | if self.constant > 0.0 { 63 | description += " + \(self.constant)" 64 | } else if self.constant < 0.0 { 65 | description += " - \(abs(self.constant))" 66 | } 67 | } 68 | 69 | if self.priority.rawValue != 1000.0 { 70 | description += " ^\(self.priority)" 71 | } 72 | 73 | description += ">" 74 | 75 | return description 76 | } 77 | 78 | } 79 | 80 | private func descriptionForRelation(_ relation: LayoutRelation) -> String { 81 | switch relation { 82 | case .equal: return "==" 83 | case .greaterThanOrEqual: return ">=" 84 | case .lessThanOrEqual: return "<=" 85 | #if swift(>=5.0) 86 | @unknown default: return "unknown" 87 | #endif 88 | } 89 | } 90 | 91 | private func descriptionForAttribute(_ attribute: LayoutAttribute) -> String { 92 | #if canImport(UIKit) 93 | switch attribute { 94 | case .notAnAttribute: return "notAnAttribute" 95 | case .top: return "top" 96 | case .left: return "left" 97 | case .bottom: return "bottom" 98 | case .right: return "right" 99 | case .leading: return "leading" 100 | case .trailing: return "trailing" 101 | case .width: return "width" 102 | case .height: return "height" 103 | case .centerX: return "centerX" 104 | case .centerY: return "centerY" 105 | case .lastBaseline: return "lastBaseline" 106 | case .firstBaseline: return "firstBaseline" 107 | case .topMargin: return "topMargin" 108 | case .leftMargin: return "leftMargin" 109 | case .bottomMargin: return "bottomMargin" 110 | case .rightMargin: return "rightMargin" 111 | case .leadingMargin: return "leadingMargin" 112 | case .trailingMargin: return "trailingMargin" 113 | case .centerXWithinMargins: return "centerXWithinMargins" 114 | case .centerYWithinMargins: return "centerYWithinMargins" 115 | #if swift(>=5.0) 116 | @unknown default: return "unknown" 117 | #endif 118 | } 119 | #else 120 | switch attribute { 121 | case .notAnAttribute: return "notAnAttribute" 122 | case .top: return "top" 123 | case .left: return "left" 124 | case .bottom: return "bottom" 125 | case .right: return "right" 126 | case .leading: return "leading" 127 | case .trailing: return "trailing" 128 | case .width: return "width" 129 | case .height: return "height" 130 | case .centerX: return "centerX" 131 | case .centerY: return "centerY" 132 | case .lastBaseline: return "lastBaseline" 133 | case .firstBaseline: return "firstBaseline" 134 | #if swift(>=5.0) 135 | @unknown default: return "unknown" 136 | #endif 137 | } 138 | #endif 139 | } 140 | 141 | private func conditionalOptional(from object: Optional) -> Optional { 142 | return object 143 | } 144 | 145 | private func conditionalOptional(from object: T) -> Optional { 146 | return Optional.some(object) 147 | } 148 | 149 | private func descriptionForObject(_ object: AnyObject) -> String { 150 | let pointerDescription = String(format: "%p", UInt(bitPattern: ObjectIdentifier(object))) 151 | var desc = "" 152 | 153 | desc += type(of: object).description() 154 | 155 | if let object = object as? ConstraintView { 156 | desc += ":\(object.snp.label() ?? pointerDescription)" 157 | } else if let object = object as? LayoutConstraint { 158 | desc += ":\(object.label ?? pointerDescription)" 159 | } else { 160 | desc += ":\(pointerDescription)" 161 | } 162 | 163 | if let object = object as? LayoutConstraint, let file = object.constraint?.sourceLocation.0, let line = object.constraint?.sourceLocation.1 { 164 | desc += "@\((file as NSString).lastPathComponent)#\(line)" 165 | } 166 | 167 | desc += "" 168 | return desc 169 | } 170 | -------------------------------------------------------------------------------- /RMShapesPageControl.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RMShapesPageControl.swift 3 | // RMShapesPageControl 4 | // 5 | // Created by Rupam Mitra on 20/06/25. 6 | // 7 | 8 | import UIKit 9 | 10 | enum IndicatorType { 11 | case circle 12 | case square 13 | case rectangleHorizontal 14 | case rectangleVertical 15 | case triangleUp 16 | case triangleDown 17 | case pentagon 18 | case hexagon 19 | } 20 | 21 | class RMShapesPageControl: UIControl { 22 | 23 | var numberOfPages: Int = 0 { 24 | didSet { setupIndicators() } 25 | } 26 | 27 | var currentPage: Int = 0 { 28 | didSet { updateIndicators() } 29 | } 30 | 31 | var shape: IndicatorType = .circle { 32 | didSet { setupIndicators() } 33 | } 34 | 35 | var indicatorSize: CGSize = CGSize(width: 12, height: 12) { 36 | didSet { setupIndicators() } 37 | } 38 | 39 | var indicatorSpacing: CGFloat = 8 { 40 | didSet { setupIndicators() } 41 | } 42 | 43 | var currentPageTintColor: UIColor = .systemBlue 44 | var pageIndicatorTintColor: UIColor = .lightGray 45 | 46 | var isVertical: Bool = false { 47 | didSet { setNeedsLayout() } 48 | } 49 | 50 | private var indicators: [CAShapeLayer] = [] 51 | 52 | override init(frame: CGRect) { 53 | super.init(frame: frame) 54 | isUserInteractionEnabled = true 55 | } 56 | 57 | required init?(coder: NSCoder) { 58 | super.init(coder: coder) 59 | isUserInteractionEnabled = true 60 | } 61 | 62 | private func setupIndicators() { 63 | indicators.forEach { $0.removeFromSuperlayer() } 64 | indicators = [] 65 | 66 | for i in 0.. UIBezierPath { 108 | switch shape { 109 | case .circle: 110 | return UIBezierPath(ovalIn: rect) 111 | case .square: 112 | return UIBezierPath(rect: rect) 113 | case .rectangleHorizontal: 114 | var r = rect 115 | r.size.width *= 1.5 116 | return UIBezierPath(roundedRect: r, cornerRadius: 3) 117 | case .rectangleVertical: 118 | var r = rect 119 | r.size.height *= 1.5 120 | return UIBezierPath(roundedRect: r, cornerRadius: 3) 121 | case .triangleUp: 122 | return trianglePath(upward: true, in: rect) 123 | case .triangleDown: 124 | return trianglePath(upward: false, in: rect) 125 | case .pentagon: 126 | return polygonPath(sides: 5, in: rect) 127 | case .hexagon: 128 | return polygonPath(sides: 6, in: rect) 129 | } 130 | } 131 | 132 | private func trianglePath(upward: Bool, in rect: CGRect) -> UIBezierPath { 133 | let path = UIBezierPath() 134 | let midX = rect.midX 135 | let minX = rect.minX 136 | let maxX = rect.maxX 137 | let minY = rect.minY 138 | let maxY = rect.maxY 139 | 140 | if upward { 141 | path.move(to: CGPoint(x: midX, y: minY)) 142 | path.addLine(to: CGPoint(x: maxX, y: maxY)) 143 | path.addLine(to: CGPoint(x: minX, y: maxY)) 144 | } else { 145 | path.move(to: CGPoint(x: minX, y: minY)) 146 | path.addLine(to: CGPoint(x: maxX, y: minY)) 147 | path.addLine(to: CGPoint(x: midX, y: maxY)) 148 | } 149 | 150 | path.close() 151 | return path 152 | } 153 | 154 | private func polygonPath(sides: Int, in rect: CGRect) -> UIBezierPath { 155 | let path = UIBezierPath() 156 | let center = CGPoint(x: rect.midX, y: rect.midY) 157 | let radius = min(rect.width, rect.height) / 2 158 | let angleIncrement = CGFloat(2 * Double.pi) / CGFloat(sides) 159 | let rotationOffset = CGFloat(-Double.pi / 2) 160 | 161 | for i in 0.., with event: UIEvent?) { 179 | guard let location = touches.first?.location(in: self) else { return } 180 | for (index, _) in indicators.enumerated() { 181 | let size = indicatorSize 182 | let spacing = indicatorSpacing 183 | let count = CGFloat(numberOfPages) 184 | 185 | if isVertical { 186 | let totalHeight = count * size.height + (count - 1) * spacing 187 | let startY = (bounds.height - totalHeight) / 2 188 | let y = startY + CGFloat(index) * (size.height + spacing) 189 | let rect = CGRect(x: (bounds.width - size.width) / 2, y: y, width: size.width, height: size.height) 190 | if rect.contains(location) { 191 | currentPage = index 192 | sendActions(for: .valueChanged) 193 | break 194 | } 195 | } else { 196 | let totalWidth = count * size.width + (count - 1) * spacing 197 | let startX = (bounds.width - totalWidth) / 2 198 | let x = startX + CGFloat(index) * (size.width + spacing) 199 | let rect = CGRect(x: x, y: (bounds.height - size.height) / 2, width: size.width, height: size.height) 200 | if rect.contains(location) { 201 | currentPage = index 202 | sendActions(for: .valueChanged) 203 | break 204 | } 205 | } 206 | } 207 | } 208 | } 209 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintDSL.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintDSL { 32 | 33 | var target: AnyObject? { get } 34 | 35 | func setLabel(_ value: String?) 36 | func label() -> String? 37 | 38 | } 39 | extension ConstraintDSL { 40 | 41 | public func setLabel(_ value: String?) { 42 | objc_setAssociatedObject(self.target as Any, &labelKey, value, .OBJC_ASSOCIATION_COPY_NONATOMIC) 43 | } 44 | public func label() -> String? { 45 | return objc_getAssociatedObject(self.target as Any, &labelKey) as? String 46 | } 47 | 48 | } 49 | private var labelKey: UInt8 = 0 50 | 51 | 52 | public protocol ConstraintBasicAttributesDSL : ConstraintDSL { 53 | } 54 | extension ConstraintBasicAttributesDSL { 55 | 56 | // MARK: Basics 57 | 58 | public var left: ConstraintItem { 59 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.left) 60 | } 61 | 62 | public var top: ConstraintItem { 63 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.top) 64 | } 65 | 66 | public var right: ConstraintItem { 67 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.right) 68 | } 69 | 70 | public var bottom: ConstraintItem { 71 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.bottom) 72 | } 73 | 74 | public var leading: ConstraintItem { 75 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.leading) 76 | } 77 | 78 | public var trailing: ConstraintItem { 79 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.trailing) 80 | } 81 | 82 | public var width: ConstraintItem { 83 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.width) 84 | } 85 | 86 | public var height: ConstraintItem { 87 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.height) 88 | } 89 | 90 | public var centerX: ConstraintItem { 91 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerX) 92 | } 93 | 94 | public var centerY: ConstraintItem { 95 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerY) 96 | } 97 | 98 | public var edges: ConstraintItem { 99 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.edges) 100 | } 101 | 102 | public var directionalEdges: ConstraintItem { 103 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.directionalEdges) 104 | } 105 | 106 | public var horizontalEdges: ConstraintItem { 107 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.horizontalEdges) 108 | } 109 | 110 | public var verticalEdges: ConstraintItem { 111 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.verticalEdges) 112 | } 113 | 114 | public var directionalHorizontalEdges: ConstraintItem { 115 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.directionalHorizontalEdges) 116 | } 117 | 118 | public var directionalVerticalEdges: ConstraintItem { 119 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.directionalVerticalEdges) 120 | } 121 | 122 | public var size: ConstraintItem { 123 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.size) 124 | } 125 | 126 | public var center: ConstraintItem { 127 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.center) 128 | } 129 | 130 | } 131 | 132 | public protocol ConstraintAttributesDSL : ConstraintBasicAttributesDSL { 133 | } 134 | extension ConstraintAttributesDSL { 135 | 136 | // MARK: Baselines 137 | @available(*, deprecated, renamed:"lastBaseline") 138 | public var baseline: ConstraintItem { 139 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.lastBaseline) 140 | } 141 | 142 | @available(iOS 8.0, OSX 10.11, *) 143 | public var lastBaseline: ConstraintItem { 144 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.lastBaseline) 145 | } 146 | 147 | @available(iOS 8.0, OSX 10.11, *) 148 | public var firstBaseline: ConstraintItem { 149 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.firstBaseline) 150 | } 151 | 152 | // MARK: Margins 153 | 154 | @available(iOS 8.0, *) 155 | public var leftMargin: ConstraintItem { 156 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.leftMargin) 157 | } 158 | 159 | @available(iOS 8.0, *) 160 | public var topMargin: ConstraintItem { 161 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.topMargin) 162 | } 163 | 164 | @available(iOS 8.0, *) 165 | public var rightMargin: ConstraintItem { 166 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.rightMargin) 167 | } 168 | 169 | @available(iOS 8.0, *) 170 | public var bottomMargin: ConstraintItem { 171 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.bottomMargin) 172 | } 173 | 174 | @available(iOS 8.0, *) 175 | public var leadingMargin: ConstraintItem { 176 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.leadingMargin) 177 | } 178 | 179 | @available(iOS 8.0, *) 180 | public var trailingMargin: ConstraintItem { 181 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.trailingMargin) 182 | } 183 | 184 | @available(iOS 8.0, *) 185 | public var centerXWithinMargins: ConstraintItem { 186 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerXWithinMargins) 187 | } 188 | 189 | @available(iOS 8.0, *) 190 | public var centerYWithinMargins: ConstraintItem { 191 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerYWithinMargins) 192 | } 193 | 194 | @available(iOS 8.0, *) 195 | public var margins: ConstraintItem { 196 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.margins) 197 | } 198 | 199 | @available(iOS 8.0, *) 200 | public var directionalMargins: ConstraintItem { 201 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.directionalMargins) 202 | } 203 | 204 | @available(iOS 8.0, *) 205 | public var centerWithinMargins: ConstraintItem { 206 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerWithinMargins) 207 | } 208 | 209 | } 210 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintConstantTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintConstantTarget { 32 | } 33 | 34 | extension CGPoint: ConstraintConstantTarget { 35 | } 36 | 37 | extension CGSize: ConstraintConstantTarget { 38 | } 39 | 40 | extension ConstraintInsets: ConstraintConstantTarget { 41 | } 42 | 43 | #if canImport(UIKit) 44 | @available(iOS 11.0, tvOS 11.0, *) 45 | extension ConstraintDirectionalInsets: ConstraintConstantTarget { 46 | } 47 | #endif 48 | 49 | extension ConstraintConstantTarget { 50 | 51 | internal func constraintConstantTargetValueFor(layoutAttribute: LayoutAttribute) -> CGFloat { 52 | if let value = self as? CGFloat { 53 | return value 54 | } 55 | 56 | if let value = self as? Float { 57 | return CGFloat(value) 58 | } 59 | 60 | if let value = self as? Double { 61 | return CGFloat(value) 62 | } 63 | 64 | if let value = self as? Int { 65 | return CGFloat(value) 66 | } 67 | 68 | if let value = self as? UInt { 69 | return CGFloat(value) 70 | } 71 | 72 | if let value = self as? CGSize { 73 | if layoutAttribute == .width { 74 | return value.width 75 | } else if layoutAttribute == .height { 76 | return value.height 77 | } else { 78 | return 0.0 79 | } 80 | } 81 | 82 | if let value = self as? CGPoint { 83 | #if canImport(UIKit) 84 | switch layoutAttribute { 85 | case .left, .right, .leading, .trailing, .centerX, .leftMargin, .rightMargin, .leadingMargin, .trailingMargin, .centerXWithinMargins: 86 | return value.x 87 | case .top, .bottom, .centerY, .topMargin, .bottomMargin, .centerYWithinMargins, .lastBaseline, .firstBaseline: 88 | return value.y 89 | case .width, .height, .notAnAttribute: 90 | return 0.0 91 | #if swift(>=5.0) 92 | @unknown default: 93 | return 0.0 94 | #endif 95 | } 96 | #else 97 | switch layoutAttribute { 98 | case .left, .right, .leading, .trailing, .centerX: 99 | return value.x 100 | case .top, .bottom, .centerY, .lastBaseline, .firstBaseline: 101 | return value.y 102 | case .width, .height, .notAnAttribute: 103 | return 0.0 104 | #if swift(>=5.0) 105 | @unknown default: 106 | return 0.0 107 | #endif 108 | } 109 | #endif 110 | } 111 | 112 | if let value = self as? ConstraintInsets { 113 | #if canImport(UIKit) 114 | switch layoutAttribute { 115 | case .left, .leftMargin: 116 | return value.left 117 | case .top, .topMargin, .firstBaseline: 118 | return value.top 119 | case .right, .rightMargin: 120 | return -value.right 121 | case .bottom, .bottomMargin, .lastBaseline: 122 | return -value.bottom 123 | case .leading, .leadingMargin: 124 | return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.left : value.right 125 | case .trailing, .trailingMargin: 126 | return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? -value.right : -value.left 127 | case .centerX, .centerXWithinMargins: 128 | return (value.left - value.right) / 2 129 | case .centerY, .centerYWithinMargins: 130 | return (value.top - value.bottom) / 2 131 | case .width: 132 | return -(value.left + value.right) 133 | case .height: 134 | return -(value.top + value.bottom) 135 | case .notAnAttribute: 136 | return 0.0 137 | #if swift(>=5.0) 138 | @unknown default: 139 | return 0.0 140 | #endif 141 | } 142 | #else 143 | switch layoutAttribute { 144 | case .left: 145 | return value.left 146 | case .top, .firstBaseline: 147 | return value.top 148 | case .right: 149 | return -value.right 150 | case .bottom, .lastBaseline: 151 | return -value.bottom 152 | case .leading: 153 | return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.left : value.right 154 | case .trailing: 155 | return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? -value.right : -value.left 156 | case .centerX: 157 | return (value.left - value.right) / 2 158 | case .centerY: 159 | return (value.top - value.bottom) / 2 160 | case .width: 161 | return -(value.left + value.right) 162 | case .height: 163 | return -(value.top + value.bottom) 164 | case .notAnAttribute: 165 | return 0.0 166 | #if swift(>=5.0) 167 | @unknown default: 168 | return 0.0 169 | #endif 170 | } 171 | #endif 172 | } 173 | 174 | #if canImport(UIKit) 175 | if #available(iOS 11.0, tvOS 11.0, *), let value = self as? ConstraintDirectionalInsets { 176 | switch layoutAttribute { 177 | case .left, .leftMargin: 178 | return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.leading : value.trailing 179 | case .top, .topMargin, .firstBaseline: 180 | return value.top 181 | case .right, .rightMargin: 182 | return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? -value.trailing : -value.leading 183 | case .bottom, .bottomMargin, .lastBaseline: 184 | return -value.bottom 185 | case .leading, .leadingMargin: 186 | return value.leading 187 | case .trailing, .trailingMargin: 188 | return -value.trailing 189 | case .centerX, .centerXWithinMargins: 190 | return (value.leading - value.trailing) / 2 191 | case .centerY, .centerYWithinMargins: 192 | return (value.top - value.bottom) / 2 193 | case .width: 194 | return -(value.leading + value.trailing) 195 | case .height: 196 | return -(value.top + value.bottom) 197 | case .notAnAttribute: 198 | return 0.0 199 | #if swift(>=5.0) 200 | @unknown default: 201 | return 0.0 202 | #else 203 | default: 204 | return 0.0 205 | #endif 206 | } 207 | } 208 | #endif 209 | 210 | return 0.0 211 | } 212 | 213 | } 214 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintMaker.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | public class ConstraintMaker { 31 | 32 | public var left: ConstraintMakerExtendable { 33 | return self.makeExtendableWithAttributes(.left) 34 | } 35 | 36 | public var top: ConstraintMakerExtendable { 37 | return self.makeExtendableWithAttributes(.top) 38 | } 39 | 40 | public var bottom: ConstraintMakerExtendable { 41 | return self.makeExtendableWithAttributes(.bottom) 42 | } 43 | 44 | public var right: ConstraintMakerExtendable { 45 | return self.makeExtendableWithAttributes(.right) 46 | } 47 | 48 | public var leading: ConstraintMakerExtendable { 49 | return self.makeExtendableWithAttributes(.leading) 50 | } 51 | 52 | public var trailing: ConstraintMakerExtendable { 53 | return self.makeExtendableWithAttributes(.trailing) 54 | } 55 | 56 | public var width: ConstraintMakerExtendable { 57 | return self.makeExtendableWithAttributes(.width) 58 | } 59 | 60 | public var height: ConstraintMakerExtendable { 61 | return self.makeExtendableWithAttributes(.height) 62 | } 63 | 64 | public var centerX: ConstraintMakerExtendable { 65 | return self.makeExtendableWithAttributes(.centerX) 66 | } 67 | 68 | public var centerY: ConstraintMakerExtendable { 69 | return self.makeExtendableWithAttributes(.centerY) 70 | } 71 | 72 | @available(*, deprecated, renamed:"lastBaseline") 73 | public var baseline: ConstraintMakerExtendable { 74 | return self.makeExtendableWithAttributes(.lastBaseline) 75 | } 76 | 77 | public var lastBaseline: ConstraintMakerExtendable { 78 | return self.makeExtendableWithAttributes(.lastBaseline) 79 | } 80 | 81 | @available(iOS 8.0, OSX 10.11, *) 82 | public var firstBaseline: ConstraintMakerExtendable { 83 | return self.makeExtendableWithAttributes(.firstBaseline) 84 | } 85 | 86 | @available(iOS 8.0, *) 87 | public var leftMargin: ConstraintMakerExtendable { 88 | return self.makeExtendableWithAttributes(.leftMargin) 89 | } 90 | 91 | @available(iOS 8.0, *) 92 | public var rightMargin: ConstraintMakerExtendable { 93 | return self.makeExtendableWithAttributes(.rightMargin) 94 | } 95 | 96 | @available(iOS 8.0, *) 97 | public var topMargin: ConstraintMakerExtendable { 98 | return self.makeExtendableWithAttributes(.topMargin) 99 | } 100 | 101 | @available(iOS 8.0, *) 102 | public var bottomMargin: ConstraintMakerExtendable { 103 | return self.makeExtendableWithAttributes(.bottomMargin) 104 | } 105 | 106 | @available(iOS 8.0, *) 107 | public var leadingMargin: ConstraintMakerExtendable { 108 | return self.makeExtendableWithAttributes(.leadingMargin) 109 | } 110 | 111 | @available(iOS 8.0, *) 112 | public var trailingMargin: ConstraintMakerExtendable { 113 | return self.makeExtendableWithAttributes(.trailingMargin) 114 | } 115 | 116 | @available(iOS 8.0, *) 117 | public var centerXWithinMargins: ConstraintMakerExtendable { 118 | return self.makeExtendableWithAttributes(.centerXWithinMargins) 119 | } 120 | 121 | @available(iOS 8.0, *) 122 | public var centerYWithinMargins: ConstraintMakerExtendable { 123 | return self.makeExtendableWithAttributes(.centerYWithinMargins) 124 | } 125 | 126 | public var edges: ConstraintMakerExtendable { 127 | return self.makeExtendableWithAttributes(.edges) 128 | } 129 | public var horizontalEdges: ConstraintMakerExtendable { 130 | return self.makeExtendableWithAttributes(.horizontalEdges) 131 | } 132 | public var verticalEdges: ConstraintMakerExtendable { 133 | return self.makeExtendableWithAttributes(.verticalEdges) 134 | } 135 | public var directionalEdges: ConstraintMakerExtendable { 136 | return self.makeExtendableWithAttributes(.directionalEdges) 137 | } 138 | public var directionalHorizontalEdges: ConstraintMakerExtendable { 139 | return self.makeExtendableWithAttributes(.directionalHorizontalEdges) 140 | } 141 | public var directionalVerticalEdges: ConstraintMakerExtendable { 142 | return self.makeExtendableWithAttributes(.directionalVerticalEdges) 143 | } 144 | public var size: ConstraintMakerExtendable { 145 | return self.makeExtendableWithAttributes(.size) 146 | } 147 | public var center: ConstraintMakerExtendable { 148 | return self.makeExtendableWithAttributes(.center) 149 | } 150 | 151 | @available(iOS 8.0, *) 152 | public var margins: ConstraintMakerExtendable { 153 | return self.makeExtendableWithAttributes(.margins) 154 | } 155 | 156 | @available(iOS 8.0, *) 157 | public var directionalMargins: ConstraintMakerExtendable { 158 | return self.makeExtendableWithAttributes(.directionalMargins) 159 | } 160 | 161 | @available(iOS 8.0, *) 162 | public var centerWithinMargins: ConstraintMakerExtendable { 163 | return self.makeExtendableWithAttributes(.centerWithinMargins) 164 | } 165 | 166 | public let item: LayoutConstraintItem 167 | private var descriptions = [ConstraintDescription]() 168 | 169 | internal init(item: LayoutConstraintItem) { 170 | self.item = item 171 | self.item.prepare() 172 | } 173 | 174 | internal func makeExtendableWithAttributes(_ attributes: ConstraintAttributes) -> ConstraintMakerExtendable { 175 | let description = ConstraintDescription(item: self.item, attributes: attributes) 176 | self.descriptions.append(description) 177 | return ConstraintMakerExtendable(description) 178 | } 179 | 180 | internal static func prepareConstraints(item: LayoutConstraintItem, closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { 181 | let maker = ConstraintMaker(item: item) 182 | closure(maker) 183 | var constraints: [Constraint] = [] 184 | for description in maker.descriptions { 185 | guard let constraint = description.constraint else { 186 | continue 187 | } 188 | constraints.append(constraint) 189 | } 190 | return constraints 191 | } 192 | 193 | internal static func makeConstraints(item: LayoutConstraintItem, closure: (_ make: ConstraintMaker) -> Void) { 194 | let constraints = prepareConstraints(item: item, closure: closure) 195 | for constraint in constraints { 196 | constraint.activateIfNeeded(updatingExisting: false) 197 | } 198 | } 199 | 200 | internal static func remakeConstraints(item: LayoutConstraintItem, closure: (_ make: ConstraintMaker) -> Void) { 201 | self.removeConstraints(item: item) 202 | self.makeConstraints(item: item, closure: closure) 203 | } 204 | 205 | internal static func updateConstraints(item: LayoutConstraintItem, closure: (_ make: ConstraintMaker) -> Void) { 206 | guard item.constraints.count > 0 else { 207 | self.makeConstraints(item: item, closure: closure) 208 | return 209 | } 210 | 211 | let constraints = prepareConstraints(item: item, closure: closure) 212 | for constraint in constraints { 213 | constraint.activateIfNeeded(updatingExisting: true) 214 | } 215 | } 216 | 217 | internal static func removeConstraints(item: LayoutConstraintItem) { 218 | let constraints = item.constraints 219 | for constraint in constraints { 220 | constraint.deactivateIfNeeded() 221 | } 222 | } 223 | 224 | } 225 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RMShapesPageControl/Pods-RMShapesPageControl-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | function on_error { 7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" 8 | } 9 | trap 'on_error $LINENO' ERR 10 | 11 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 12 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 13 | # frameworks to, so exit 0 (signalling the script phase was successful). 14 | exit 0 15 | fi 16 | 17 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 18 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 19 | 20 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 21 | SWIFT_STDLIB_PATH="${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 22 | BCSYMBOLMAP_DIR="BCSymbolMaps" 23 | 24 | 25 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 26 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 27 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 28 | 29 | # Copies and strips a vendored framework 30 | install_framework() 31 | { 32 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 33 | local source="${BUILT_PRODUCTS_DIR}/$1" 34 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 35 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 36 | elif [ -r "$1" ]; then 37 | local source="$1" 38 | fi 39 | 40 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 41 | 42 | if [ -L "${source}" ]; then 43 | echo "Symlinked..." 44 | source="$(readlink -f "${source}")" 45 | fi 46 | 47 | if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then 48 | # Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied 49 | find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do 50 | echo "Installing $f" 51 | install_bcsymbolmap "$f" "$destination" 52 | rm "$f" 53 | done 54 | rmdir "${source}/${BCSYMBOLMAP_DIR}" 55 | fi 56 | 57 | # Use filter instead of exclude so missing patterns don't throw errors. 58 | 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}\"" 59 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 60 | 61 | local basename 62 | basename="$(basename -s .framework "$1")" 63 | binary="${destination}/${basename}.framework/${basename}" 64 | 65 | if ! [ -r "$binary" ]; then 66 | binary="${destination}/${basename}" 67 | elif [ -L "${binary}" ]; then 68 | echo "Destination binary is symlinked..." 69 | dirname="$(dirname "${binary}")" 70 | binary="${dirname}/$(readlink "${binary}")" 71 | fi 72 | 73 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 74 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 75 | strip_invalid_archs "$binary" 76 | fi 77 | 78 | # Resign the code if required by the build settings to avoid unstable apps 79 | code_sign_if_enabled "${destination}/$(basename "$1")" 80 | 81 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 82 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 83 | local swift_runtime_libs 84 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) 85 | for lib in $swift_runtime_libs; do 86 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 87 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 88 | code_sign_if_enabled "${destination}/${lib}" 89 | done 90 | fi 91 | } 92 | # Copies and strips a vendored dSYM 93 | install_dsym() { 94 | local source="$1" 95 | warn_missing_arch=${2:-true} 96 | if [ -r "$source" ]; then 97 | # Copy the dSYM into the targets temp dir. 98 | 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}\"" 99 | 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}" 100 | 101 | local basename 102 | basename="$(basename -s .dSYM "$source")" 103 | binary_name="$(ls "$source/Contents/Resources/DWARF")" 104 | binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" 105 | 106 | # Strip invalid architectures from the dSYM. 107 | if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then 108 | strip_invalid_archs "$binary" "$warn_missing_arch" 109 | fi 110 | if [[ $STRIP_BINARY_RETVAL == 0 ]]; then 111 | # Move the stripped file into its final destination. 112 | 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}\"" 113 | 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}" 114 | else 115 | # 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. 116 | mkdir -p "${DWARF_DSYM_FOLDER_PATH}" 117 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" 118 | fi 119 | fi 120 | } 121 | 122 | # Used as a return value for each invocation of `strip_invalid_archs` function. 123 | STRIP_BINARY_RETVAL=0 124 | 125 | # Strip invalid architectures 126 | strip_invalid_archs() { 127 | binary="$1" 128 | warn_missing_arch=${2:-true} 129 | # Get architectures for current target binary 130 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 131 | # Intersect them with the architectures we are building for 132 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 133 | # If there are no archs supported by this binary then warn the user 134 | if [[ -z "$intersected_archs" ]]; then 135 | if [[ "$warn_missing_arch" == "true" ]]; then 136 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 137 | fi 138 | STRIP_BINARY_RETVAL=1 139 | return 140 | fi 141 | stripped="" 142 | for arch in $binary_archs; do 143 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 144 | # Strip non-valid architectures in-place 145 | lipo -remove "$arch" -output "$binary" "$binary" 146 | stripped="$stripped $arch" 147 | fi 148 | done 149 | if [[ "$stripped" ]]; then 150 | echo "Stripped $binary of architectures:$stripped" 151 | fi 152 | STRIP_BINARY_RETVAL=0 153 | } 154 | 155 | # Copies the bcsymbolmap files of a vendored framework 156 | install_bcsymbolmap() { 157 | local bcsymbolmap_path="$1" 158 | local destination="${BUILT_PRODUCTS_DIR}" 159 | 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}"" 160 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" 161 | } 162 | 163 | # Signs a framework with the provided identity 164 | code_sign_if_enabled() { 165 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 166 | # Use the current code_sign_identity 167 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 168 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 169 | 170 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 171 | code_sign_cmd="$code_sign_cmd &" 172 | fi 173 | echo "$code_sign_cmd" 174 | eval "$code_sign_cmd" 175 | fi 176 | } 177 | 178 | if [[ "$CONFIGURATION" == "Debug" ]]; then 179 | install_framework "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework" 180 | fi 181 | if [[ "$CONFIGURATION" == "Release" ]]; then 182 | install_framework "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework" 183 | fi 184 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 185 | wait 186 | fi 187 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/ConstraintAttributes.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | internal struct ConstraintAttributes : OptionSet, ExpressibleByIntegerLiteral { 32 | 33 | typealias IntegerLiteralType = UInt 34 | 35 | internal init(rawValue: UInt) { 36 | self.rawValue = rawValue 37 | } 38 | internal init(_ rawValue: UInt) { 39 | self.init(rawValue: rawValue) 40 | } 41 | internal init(nilLiteral: ()) { 42 | self.rawValue = 0 43 | } 44 | internal init(integerLiteral rawValue: IntegerLiteralType) { 45 | self.init(rawValue: rawValue) 46 | } 47 | 48 | internal private(set) var rawValue: UInt 49 | internal static var allZeros: ConstraintAttributes { return 0 } 50 | internal static func convertFromNilLiteral() -> ConstraintAttributes { return 0 } 51 | internal var boolValue: Bool { return self.rawValue != 0 } 52 | 53 | internal func toRaw() -> UInt { return self.rawValue } 54 | internal static func fromRaw(_ raw: UInt) -> ConstraintAttributes? { return self.init(raw) } 55 | internal static func fromMask(_ raw: UInt) -> ConstraintAttributes { return self.init(raw) } 56 | 57 | // normal 58 | 59 | internal static let none: ConstraintAttributes = 0 60 | internal static let left: ConstraintAttributes = ConstraintAttributes(UInt(1) << 0) 61 | internal static let top: ConstraintAttributes = ConstraintAttributes(UInt(1) << 1) 62 | internal static let right: ConstraintAttributes = ConstraintAttributes(UInt(1) << 2) 63 | internal static let bottom: ConstraintAttributes = ConstraintAttributes(UInt(1) << 3) 64 | internal static let leading: ConstraintAttributes = ConstraintAttributes(UInt(1) << 4) 65 | internal static let trailing: ConstraintAttributes = ConstraintAttributes(UInt(1) << 5) 66 | internal static let width: ConstraintAttributes = ConstraintAttributes(UInt(1) << 6) 67 | internal static let height: ConstraintAttributes = ConstraintAttributes(UInt(1) << 7) 68 | internal static let centerX: ConstraintAttributes = ConstraintAttributes(UInt(1) << 8) 69 | internal static let centerY: ConstraintAttributes = ConstraintAttributes(UInt(1) << 9) 70 | internal static let lastBaseline: ConstraintAttributes = ConstraintAttributes(UInt(1) << 10) 71 | 72 | @available(iOS 8.0, OSX 10.11, *) 73 | internal static let firstBaseline: ConstraintAttributes = ConstraintAttributes(UInt(1) << 11) 74 | 75 | @available(iOS 8.0, *) 76 | internal static let leftMargin: ConstraintAttributes = ConstraintAttributes(UInt(1) << 12) 77 | 78 | @available(iOS 8.0, *) 79 | internal static let rightMargin: ConstraintAttributes = ConstraintAttributes(UInt(1) << 13) 80 | 81 | @available(iOS 8.0, *) 82 | internal static let topMargin: ConstraintAttributes = ConstraintAttributes(UInt(1) << 14) 83 | 84 | @available(iOS 8.0, *) 85 | internal static let bottomMargin: ConstraintAttributes = ConstraintAttributes(UInt(1) << 15) 86 | 87 | @available(iOS 8.0, *) 88 | internal static let leadingMargin: ConstraintAttributes = ConstraintAttributes(UInt(1) << 16) 89 | 90 | @available(iOS 8.0, *) 91 | internal static let trailingMargin: ConstraintAttributes = ConstraintAttributes(UInt(1) << 17) 92 | 93 | @available(iOS 8.0, *) 94 | internal static let centerXWithinMargins: ConstraintAttributes = ConstraintAttributes(UInt(1) << 18) 95 | 96 | @available(iOS 8.0, *) 97 | internal static let centerYWithinMargins: ConstraintAttributes = ConstraintAttributes(UInt(1) << 19) 98 | 99 | // aggregates 100 | 101 | internal static let edges: ConstraintAttributes = [.horizontalEdges, .verticalEdges] 102 | internal static let horizontalEdges: ConstraintAttributes = [.left, .right] 103 | internal static let verticalEdges: ConstraintAttributes = [.top, .bottom] 104 | internal static let directionalEdges: ConstraintAttributes = [.directionalHorizontalEdges, .directionalVerticalEdges] 105 | internal static let directionalHorizontalEdges: ConstraintAttributes = [.leading, .trailing] 106 | internal static let directionalVerticalEdges: ConstraintAttributes = [.top, .bottom] 107 | internal static let size: ConstraintAttributes = [.width, .height] 108 | internal static let center: ConstraintAttributes = [.centerX, .centerY] 109 | 110 | @available(iOS 8.0, *) 111 | internal static let margins: ConstraintAttributes = [.leftMargin, .topMargin, .rightMargin, .bottomMargin] 112 | 113 | @available(iOS 8.0, *) 114 | internal static let directionalMargins: ConstraintAttributes = [.leadingMargin, .topMargin, .trailingMargin, .bottomMargin] 115 | 116 | @available(iOS 8.0, *) 117 | internal static let centerWithinMargins: ConstraintAttributes = [.centerXWithinMargins, .centerYWithinMargins] 118 | 119 | internal var layoutAttributes:[LayoutAttribute] { 120 | var attrs = [LayoutAttribute]() 121 | if (self.contains(ConstraintAttributes.left)) { 122 | attrs.append(.left) 123 | } 124 | if (self.contains(ConstraintAttributes.top)) { 125 | attrs.append(.top) 126 | } 127 | if (self.contains(ConstraintAttributes.right)) { 128 | attrs.append(.right) 129 | } 130 | if (self.contains(ConstraintAttributes.bottom)) { 131 | attrs.append(.bottom) 132 | } 133 | if (self.contains(ConstraintAttributes.leading)) { 134 | attrs.append(.leading) 135 | } 136 | if (self.contains(ConstraintAttributes.trailing)) { 137 | attrs.append(.trailing) 138 | } 139 | if (self.contains(ConstraintAttributes.width)) { 140 | attrs.append(.width) 141 | } 142 | if (self.contains(ConstraintAttributes.height)) { 143 | attrs.append(.height) 144 | } 145 | if (self.contains(ConstraintAttributes.centerX)) { 146 | attrs.append(.centerX) 147 | } 148 | if (self.contains(ConstraintAttributes.centerY)) { 149 | attrs.append(.centerY) 150 | } 151 | if (self.contains(ConstraintAttributes.lastBaseline)) { 152 | attrs.append(.lastBaseline) 153 | } 154 | 155 | #if canImport(UIKit) 156 | if (self.contains(ConstraintAttributes.firstBaseline)) { 157 | attrs.append(.firstBaseline) 158 | } 159 | if (self.contains(ConstraintAttributes.leftMargin)) { 160 | attrs.append(.leftMargin) 161 | } 162 | if (self.contains(ConstraintAttributes.rightMargin)) { 163 | attrs.append(.rightMargin) 164 | } 165 | if (self.contains(ConstraintAttributes.topMargin)) { 166 | attrs.append(.topMargin) 167 | } 168 | if (self.contains(ConstraintAttributes.bottomMargin)) { 169 | attrs.append(.bottomMargin) 170 | } 171 | if (self.contains(ConstraintAttributes.leadingMargin)) { 172 | attrs.append(.leadingMargin) 173 | } 174 | if (self.contains(ConstraintAttributes.trailingMargin)) { 175 | attrs.append(.trailingMargin) 176 | } 177 | if (self.contains(ConstraintAttributes.centerXWithinMargins)) { 178 | attrs.append(.centerXWithinMargins) 179 | } 180 | if (self.contains(ConstraintAttributes.centerYWithinMargins)) { 181 | attrs.append(.centerYWithinMargins) 182 | } 183 | #endif 184 | 185 | return attrs 186 | } 187 | } 188 | 189 | internal func + (left: ConstraintAttributes, right: ConstraintAttributes) -> ConstraintAttributes { 190 | return left.union(right) 191 | } 192 | 193 | internal func +=(left: inout ConstraintAttributes, right: ConstraintAttributes) { 194 | left.formUnion(right) 195 | } 196 | 197 | internal func -=(left: inout ConstraintAttributes, right: ConstraintAttributes) { 198 | left.subtract(right) 199 | } 200 | 201 | internal func ==(left: ConstraintAttributes, right: ConstraintAttributes) -> Bool { 202 | return left.rawValue == right.rawValue 203 | } 204 | -------------------------------------------------------------------------------- /Pods/SnapKit/Sources/Constraint.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if canImport(UIKit) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | public final class Constraint { 31 | 32 | internal let sourceLocation: (String, UInt) 33 | internal let label: String? 34 | 35 | private let from: ConstraintItem 36 | private let to: ConstraintItem 37 | private let relation: ConstraintRelation 38 | private let multiplier: ConstraintMultiplierTarget 39 | private var constant: ConstraintConstantTarget { 40 | didSet { 41 | self.updateConstantAndPriorityIfNeeded() 42 | } 43 | } 44 | private var priority: ConstraintPriorityTarget { 45 | didSet { 46 | self.updateConstantAndPriorityIfNeeded() 47 | } 48 | } 49 | public var layoutConstraints: [LayoutConstraint] 50 | 51 | public var isActive: Bool { 52 | set { 53 | if newValue { 54 | activate() 55 | } 56 | else { 57 | deactivate() 58 | } 59 | } 60 | 61 | get { 62 | for layoutConstraint in self.layoutConstraints { 63 | if layoutConstraint.isActive { 64 | return true 65 | } 66 | } 67 | return false 68 | } 69 | } 70 | 71 | // MARK: Initialization 72 | 73 | internal init(from: ConstraintItem, 74 | to: ConstraintItem, 75 | relation: ConstraintRelation, 76 | sourceLocation: (String, UInt), 77 | label: String?, 78 | multiplier: ConstraintMultiplierTarget, 79 | constant: ConstraintConstantTarget, 80 | priority: ConstraintPriorityTarget) { 81 | self.from = from 82 | self.to = to 83 | self.relation = relation 84 | self.sourceLocation = sourceLocation 85 | self.label = label 86 | self.multiplier = multiplier 87 | self.constant = constant 88 | self.priority = priority 89 | self.layoutConstraints = [] 90 | 91 | // get attributes 92 | let layoutFromAttributes = self.from.attributes.layoutAttributes 93 | let layoutToAttributes = self.to.attributes.layoutAttributes 94 | 95 | // get layout from 96 | let layoutFrom = self.from.layoutConstraintItem! 97 | 98 | // get relation 99 | let layoutRelation = self.relation.layoutRelation 100 | 101 | for layoutFromAttribute in layoutFromAttributes { 102 | // get layout to attribute 103 | let layoutToAttribute: LayoutAttribute 104 | #if canImport(UIKit) 105 | if layoutToAttributes.count > 0 { 106 | if self.from.attributes == .edges && self.to.attributes == .margins { 107 | switch layoutFromAttribute { 108 | case .left: 109 | layoutToAttribute = .leftMargin 110 | case .right: 111 | layoutToAttribute = .rightMargin 112 | case .top: 113 | layoutToAttribute = .topMargin 114 | case .bottom: 115 | layoutToAttribute = .bottomMargin 116 | default: 117 | fatalError() 118 | } 119 | } else if self.from.attributes == .margins && self.to.attributes == .edges { 120 | switch layoutFromAttribute { 121 | case .leftMargin: 122 | layoutToAttribute = .left 123 | case .rightMargin: 124 | layoutToAttribute = .right 125 | case .topMargin: 126 | layoutToAttribute = .top 127 | case .bottomMargin: 128 | layoutToAttribute = .bottom 129 | default: 130 | fatalError() 131 | } 132 | } else if self.from.attributes == .directionalEdges && self.to.attributes == .directionalMargins { 133 | switch layoutFromAttribute { 134 | case .leading: 135 | layoutToAttribute = .leadingMargin 136 | case .trailing: 137 | layoutToAttribute = .trailingMargin 138 | case .top: 139 | layoutToAttribute = .topMargin 140 | case .bottom: 141 | layoutToAttribute = .bottomMargin 142 | default: 143 | fatalError() 144 | } 145 | } else if self.from.attributes == .directionalMargins && self.to.attributes == .directionalEdges { 146 | switch layoutFromAttribute { 147 | case .leadingMargin: 148 | layoutToAttribute = .leading 149 | case .trailingMargin: 150 | layoutToAttribute = .trailing 151 | case .topMargin: 152 | layoutToAttribute = .top 153 | case .bottomMargin: 154 | layoutToAttribute = .bottom 155 | default: 156 | fatalError() 157 | } 158 | } else if self.from.attributes == self.to.attributes { 159 | layoutToAttribute = layoutFromAttribute 160 | } else { 161 | layoutToAttribute = layoutToAttributes[0] 162 | } 163 | } else { 164 | if self.to.target == nil && (layoutFromAttribute == .centerX || layoutFromAttribute == .centerY) { 165 | layoutToAttribute = layoutFromAttribute == .centerX ? .left : .top 166 | } else { 167 | layoutToAttribute = layoutFromAttribute 168 | } 169 | } 170 | #else 171 | if self.from.attributes == self.to.attributes { 172 | layoutToAttribute = layoutFromAttribute 173 | } else if layoutToAttributes.count > 0 { 174 | layoutToAttribute = layoutToAttributes[0] 175 | } else { 176 | layoutToAttribute = layoutFromAttribute 177 | } 178 | #endif 179 | 180 | // get layout constant 181 | let layoutConstant: CGFloat = self.constant.constraintConstantTargetValueFor(layoutAttribute: layoutToAttribute) 182 | 183 | // get layout to 184 | var layoutTo: AnyObject? = self.to.target 185 | 186 | // use superview if possible 187 | if layoutTo == nil && layoutToAttribute != .width && layoutToAttribute != .height { 188 | layoutTo = layoutFrom.superview 189 | } 190 | 191 | // create layout constraint 192 | let layoutConstraint = LayoutConstraint( 193 | item: layoutFrom, 194 | attribute: layoutFromAttribute, 195 | relatedBy: layoutRelation, 196 | toItem: layoutTo, 197 | attribute: layoutToAttribute, 198 | multiplier: self.multiplier.constraintMultiplierTargetValue, 199 | constant: layoutConstant 200 | ) 201 | 202 | // set label 203 | layoutConstraint.label = self.label 204 | 205 | // set priority 206 | layoutConstraint.priority = LayoutPriority(rawValue: self.priority.constraintPriorityTargetValue) 207 | 208 | // set constraint 209 | layoutConstraint.constraint = self 210 | 211 | // append 212 | self.layoutConstraints.append(layoutConstraint) 213 | } 214 | } 215 | 216 | // MARK: Public 217 | 218 | @available(*, deprecated, renamed:"activate()") 219 | public func install() { 220 | self.activate() 221 | } 222 | 223 | @available(*, deprecated, renamed:"deactivate()") 224 | public func uninstall() { 225 | self.deactivate() 226 | } 227 | 228 | public func activate() { 229 | self.activateIfNeeded() 230 | } 231 | 232 | public func deactivate() { 233 | self.deactivateIfNeeded() 234 | } 235 | 236 | @discardableResult 237 | public func update(offset: ConstraintOffsetTarget) -> Constraint { 238 | self.constant = offset.constraintOffsetTargetValue 239 | return self 240 | } 241 | 242 | @discardableResult 243 | public func update(inset: ConstraintInsetTarget) -> Constraint { 244 | self.constant = inset.constraintInsetTargetValue 245 | return self 246 | } 247 | 248 | #if canImport(UIKit) 249 | @discardableResult 250 | @available(iOS 11.0, tvOS 11.0, *) 251 | public func update(inset: ConstraintDirectionalInsetTarget) -> Constraint { 252 | self.constant = inset.constraintDirectionalInsetTargetValue 253 | return self 254 | } 255 | #endif 256 | 257 | @discardableResult 258 | public func update(priority: ConstraintPriorityTarget) -> Constraint { 259 | self.priority = priority.constraintPriorityTargetValue 260 | return self 261 | } 262 | 263 | @discardableResult 264 | public func update(priority: ConstraintPriority) -> Constraint { 265 | self.priority = priority.value 266 | return self 267 | } 268 | 269 | @available(*, deprecated, renamed:"update(offset:)") 270 | public func updateOffset(amount: ConstraintOffsetTarget) -> Void { self.update(offset: amount) } 271 | 272 | @available(*, deprecated, renamed:"update(inset:)") 273 | public func updateInsets(amount: ConstraintInsetTarget) -> Void { self.update(inset: amount) } 274 | 275 | @available(*, deprecated, renamed:"update(priority:)") 276 | public func updatePriority(amount: ConstraintPriorityTarget) -> Void { self.update(priority: amount) } 277 | 278 | @available(*, deprecated, message:"Use update(priority: ConstraintPriorityTarget) instead.") 279 | public func updatePriorityRequired() -> Void {} 280 | 281 | @available(*, deprecated, message:"Use update(priority: ConstraintPriorityTarget) instead.") 282 | public func updatePriorityHigh() -> Void { fatalError("Must be implemented by Concrete subclass.") } 283 | 284 | @available(*, deprecated, message:"Use update(priority: ConstraintPriorityTarget) instead.") 285 | public func updatePriorityMedium() -> Void { fatalError("Must be implemented by Concrete subclass.") } 286 | 287 | @available(*, deprecated, message:"Use update(priority: ConstraintPriorityTarget) instead.") 288 | public func updatePriorityLow() -> Void { fatalError("Must be implemented by Concrete subclass.") } 289 | 290 | // MARK: Internal 291 | 292 | internal func updateConstantAndPriorityIfNeeded() { 293 | for layoutConstraint in self.layoutConstraints { 294 | let attribute = (layoutConstraint.secondAttribute == .notAnAttribute) ? layoutConstraint.firstAttribute : layoutConstraint.secondAttribute 295 | layoutConstraint.constant = self.constant.constraintConstantTargetValueFor(layoutAttribute: attribute) 296 | 297 | let requiredPriority = ConstraintPriority.required.value 298 | if (layoutConstraint.priority.rawValue < requiredPriority), (self.priority.constraintPriorityTargetValue != requiredPriority) { 299 | layoutConstraint.priority = LayoutPriority(rawValue: self.priority.constraintPriorityTargetValue) 300 | } 301 | } 302 | } 303 | 304 | internal func activateIfNeeded(updatingExisting: Bool = false) { 305 | guard let item = self.from.layoutConstraintItem else { 306 | print("WARNING: SnapKit failed to get from item from constraint. Activate will be a no-op.") 307 | return 308 | } 309 | let layoutConstraints = self.layoutConstraints 310 | 311 | if updatingExisting { 312 | var existingLayoutConstraints: [LayoutConstraint] = [] 313 | for constraint in item.constraints { 314 | existingLayoutConstraints += constraint.layoutConstraints 315 | } 316 | 317 | for layoutConstraint in layoutConstraints { 318 | let existingLayoutConstraint = existingLayoutConstraints.first { $0 == layoutConstraint } 319 | guard let updateLayoutConstraint = existingLayoutConstraint else { 320 | fatalError("Updated constraint could not find existing matching constraint to update: \(layoutConstraint)") 321 | } 322 | 323 | let updateLayoutAttribute = (updateLayoutConstraint.secondAttribute == .notAnAttribute) ? updateLayoutConstraint.firstAttribute : updateLayoutConstraint.secondAttribute 324 | updateLayoutConstraint.constant = self.constant.constraintConstantTargetValueFor(layoutAttribute: updateLayoutAttribute) 325 | } 326 | } else { 327 | NSLayoutConstraint.activate(layoutConstraints) 328 | item.add(constraints: [self]) 329 | } 330 | } 331 | 332 | internal func deactivateIfNeeded() { 333 | guard let item = self.from.layoutConstraintItem else { 334 | print("WARNING: SnapKit failed to get from item from constraint. Deactivate will be a no-op.") 335 | return 336 | } 337 | let layoutConstraints = self.layoutConstraints 338 | NSLayoutConstraint.deactivate(layoutConstraints) 339 | item.remove(constraints: [self]) 340 | } 341 | } 342 | --------------------------------------------------------------------------------