├── .gitignore ├── Caliber.podspec ├── Caliber └── Caliber.swift ├── Demo ├── Demo.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── paolocuscela.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── paolocuscela.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist ├── Demo.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── paolocuscela.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── Demo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── Header.imageset │ │ │ ├── Contents.json │ │ │ ├── Header-1.png │ │ │ ├── Header-2.png │ │ │ └── Header.png │ │ └── background.imageset │ │ │ ├── Contents.json │ │ │ └── Forest-Minimal-Download-Wallpaper-HD-1366x768.jpg │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── Podfile ├── Podfile.lock └── Pods │ ├── Local Podspecs │ └── Caliber.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ │ └── paolocuscela.xcuserdatad │ │ └── xcschemes │ │ ├── Caliber.xcscheme │ │ ├── Pods-Demo.xcscheme │ │ └── xcschememanagement.plist │ └── Target Support Files │ ├── Caliber │ ├── Caliber-dummy.m │ ├── Caliber-prefix.pch │ ├── Caliber-umbrella.h │ ├── Caliber.modulemap │ ├── Caliber.xcconfig │ └── Info.plist │ └── Pods-Demo │ ├── Info.plist │ ├── Pods-Demo-acknowledgements.markdown │ ├── Pods-Demo-acknowledgements.plist │ ├── Pods-Demo-dummy.m │ ├── Pods-Demo-frameworks.sh │ ├── Pods-Demo-resources.sh │ ├── Pods-Demo-umbrella.h │ ├── Pods-Demo.debug.xcconfig │ ├── Pods-Demo.modulemap │ └── Pods-Demo.release.xcconfig ├── Images ├── Header.png └── Overview.png ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | \.DS_Store 3 | -------------------------------------------------------------------------------- /Caliber.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'Caliber' 3 | s.version = '1.0' 4 | s.summary = 'Implementing autolayout constrains programmatically made dead simple.' 5 | s.homepage = 'https://github.com/PaoloCuscela/Caliber' 6 | s.screenshots = '', '' 7 | s.license = { :type => 'MIT', :file => 'LICENSE' } 8 | s.author = { 'Paolo Cuscela' => 'cuscio.2@gmail.com'} 9 | s.source = { :git => 'https://github.com/PaoloCuscela/Caliber.git', :tag => s.version.to_s } 10 | 11 | s.ios.deployment_target = '9.0' 12 | s.source_files = 'Caliber/*' 13 | s.frameworks = 'UIKit' 14 | end 15 | -------------------------------------------------------------------------------- /Caliber/Caliber.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Caliber.swift 3 | // CodeConstrains 4 | // 5 | // Created by Paolo Cuscela on 10/11/17. 6 | // Copyright © 2017 Paolo Cuscela. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | open class Caliber { 13 | 14 | private let view: UIView 15 | 16 | public init(_ view: UIView ) { 17 | view.translatesAutoresizingMaskIntoConstraints = false 18 | self.view = view 19 | } 20 | 21 | /** 22 | Add a specific constraint to the selected view. 23 | */ 24 | public func constrain(_ attribute: CaliberAttribute, to viewAttribute: CaliberAttribute, of second: UIView, offset: CGFloat = 0, multiplier : CGFloat = 1) -> Caliber { 25 | 26 | if let sup = view.superview { 27 | let constraint = NSLayoutConstraint(item: view, attribute: ns(attribute), relatedBy: .equal, toItem: second, attribute: ns(viewAttribute), multiplier: multiplier, constant: offset) 28 | sup.addConstraint(constraint) 29 | } 30 | 31 | return self 32 | } 33 | 34 | /** 35 | Anchor the top margin to the selected view anchor with a fixed offset. 36 | */ 37 | public func top(with otherView: UIView, _ anchor: CaliberY, offset: CGFloat = 0 ) -> Caliber { 38 | 39 | view.topAnchor.constraint(equalTo: nsAnchor(otherView, anchor: anchor), constant: offset).isActive = true 40 | return self 41 | } 42 | 43 | /** 44 | Anchor the bottom margin to the selected view anchor with a fixed offset. 45 | */ 46 | public func bottom(with otherView: UIView, _ anchor: CaliberY, offset: CGFloat = 0 ) -> Caliber { 47 | 48 | view.bottomAnchor.constraint(equalTo: nsAnchor(otherView, anchor: anchor), constant: offset).isActive = true 49 | return self 50 | } 51 | 52 | /** 53 | Anchor the left margin to the selected view's anchor with a fixed offset. 54 | */ 55 | public func left(with otherView: UIView, _ anchor: CaliberX, offset: CGFloat = 0 ) -> Caliber { 56 | 57 | view.leftAnchor.constraint(equalTo: nsAnchor(otherView, anchor: anchor), constant: offset).isActive = true 58 | return self 59 | } 60 | 61 | /** 62 | Anchor the right margin to the selected view's anchor with a fixed offset. 63 | */ 64 | public func right(with otherView: UIView, _ anchor: CaliberX, offset: CGFloat = 0 ) -> Caliber { 65 | 66 | view.rightAnchor.constraint(equalTo: nsAnchor(otherView, anchor: anchor), constant: offset).isActive = true 67 | return self 68 | } 69 | 70 | func set(_ value: CGFloat, to attribute: CaliberAttribute ) -> Caliber { 71 | 72 | guard let sup = view.superview else { return self } 73 | 74 | let constraint = attribute != .aspect ? 75 | NSLayoutConstraint(item: view, attribute: ns(attribute) , relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: value) : 76 | NSLayoutConstraint(item: view, attribute: .width, relatedBy: .equal, toItem: view, attribute: .height, multiplier: value, constant: 0) 77 | 78 | sup.addConstraint(constraint) 79 | 80 | return self 81 | } 82 | 83 | /** 84 | Fill the selected view bounds with specified insets. 85 | */ 86 | public func fit(inside anotherView: UIView, offset: CGFloat = 0 ) { 87 | 88 | _ = constrain(.top, to: .top, of: anotherView, offset: offset, multiplier: 1) 89 | .constrain(.bottom, to: .bottom, of: anotherView, offset: offset, multiplier: 1) 90 | .constrain(.left, to: .left, of: anotherView, offset: offset, multiplier: 1) 91 | .constrain(.right, to: .right, of: anotherView, offset: offset, multiplier: 1) 92 | } 93 | 94 | /** 95 | Center inside the selected view. 96 | */ 97 | public func center(in anotherView: UIView) -> Caliber { 98 | 99 | view.centerXAnchor.constraint(equalTo: anotherView.centerXAnchor).isActive = true 100 | view.centerYAnchor.constraint(equalTo: anotherView.centerYAnchor).isActive = true 101 | return self 102 | } 103 | 104 | /** 105 | Center horizontally inside the selected view. 106 | */ 107 | public func centerHorizontally(in anotherView: UIView, multiplier: CGFloat = 1) -> Caliber { 108 | 109 | constrain(.centerX, to: .centerX, of: anotherView, offset: 0, multiplier: multiplier).ok() 110 | return self 111 | } 112 | 113 | /** 114 | Center vertically inside the selected view. 115 | */ 116 | public func centerVertically(in anotherView: UIView, multiplier: CGFloat = 1) -> Caliber { 117 | 118 | constrain(.centerY, to: .centerY, of: anotherView, offset: 0, multiplier: multiplier).ok() 119 | 120 | return self 121 | } 122 | 123 | /** 124 | Set width equal to the selected view's width, with a specified multiplier. 125 | */ 126 | public func width( of anotherView: UIView, multiplier: CGFloat = 1 ) -> Caliber { 127 | 128 | view.widthAnchor.constraint(equalTo: anotherView.widthAnchor, multiplier: multiplier).isActive = true 129 | return self 130 | } 131 | 132 | /** 133 | Set height equal to the selected view's height, with a specified multiplier. 134 | */ 135 | public func height( of anotherView: UIView, multiplier: CGFloat = 1 ) -> Caliber { 136 | 137 | view.heightAnchor.constraint(equalTo: anotherView.heightAnchor, multiplier: multiplier).isActive = true 138 | return self 139 | } 140 | 141 | /** 142 | View's width. 143 | */ 144 | public var width: CGFloat { 145 | set(val) { 146 | _ = set(val, to: .width) 147 | } 148 | get { return view.bounds.width } 149 | } 150 | 151 | /** 152 | View's height. 153 | */ 154 | public var height: CGFloat { 155 | set(val) { 156 | _ = set(val, to: .height) 157 | } 158 | get { return view.bounds.height } 159 | } 160 | 161 | /** 162 | View's aspect ratio (needs at least a width or height constrain set). 163 | */ 164 | public var aspect: CGFloat { 165 | set(val) { 166 | _ = set(val, to: .aspect) 167 | } 168 | get { return view.bounds.width / view.bounds.height } 169 | } 170 | 171 | 172 | public func ok(){} 173 | 174 | fileprivate func ns(_ caliberAttribute: CaliberAttribute) -> NSLayoutAttribute { 175 | switch caliberAttribute { 176 | case .bottom: return .bottom 177 | case .centerX: return .centerX 178 | case .centerY: return .centerY 179 | case .height: return .height 180 | case .left: return .leading 181 | case .right: return .trailing 182 | case .top: return .top 183 | case .width: return .width 184 | default: return .width 185 | } 186 | } 187 | 188 | fileprivate func nsAnchor(_ view: UIView, anchor: CaliberY) -> NSLayoutAnchor { 189 | 190 | guard #available(iOS 11.0, *) else { 191 | 192 | return (anchor == .bottom) ? view.layoutMarginsGuide.bottomAnchor : view.layoutMarginsGuide.topAnchor 193 | } 194 | return (anchor == .bottom) ? view.safeAreaLayoutGuide.bottomAnchor : view.safeAreaLayoutGuide.topAnchor 195 | 196 | } 197 | 198 | fileprivate func nsAnchor(_ view: UIView, anchor: CaliberX) -> NSLayoutAnchor { 199 | 200 | guard #available(iOS 11.0, *) else { 201 | 202 | return (anchor == .left) ? view.layoutMarginsGuide.leftAnchor : view.layoutMarginsGuide.rightAnchor 203 | } 204 | return (anchor == .left) ? view.safeAreaLayoutGuide.leftAnchor : view.safeAreaLayoutGuide.rightAnchor 205 | } 206 | 207 | } 208 | 209 | public enum CaliberAttribute { 210 | case width, height, top, bottom, left, right, aspect, centerX, centerY 211 | } 212 | 213 | public enum CaliberY { 214 | case top,bottom 215 | } 216 | 217 | public enum CaliberX { 218 | case left,right 219 | } 220 | 221 | 222 | public extension UIView { 223 | 224 | public var caliber: Caliber { 225 | get { 226 | return Caliber(self) 227 | } 228 | } 229 | } 230 | -------------------------------------------------------------------------------- /Demo/Demo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1C2D5A4388A1A7D69FEF2D14 /* Pods_Demo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5C043DFD5EC68B97B7A2B93 /* Pods_Demo.framework */; }; 11 | 6D836C611FB60E92007E8FEC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D836C601FB60E92007E8FEC /* AppDelegate.swift */; }; 12 | 6D836C631FB60E92007E8FEC /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D836C621FB60E92007E8FEC /* ViewController.swift */; }; 13 | 6D836C661FB60E92007E8FEC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D836C641FB60E92007E8FEC /* Main.storyboard */; }; 14 | 6D836C681FB60E92007E8FEC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6D836C671FB60E92007E8FEC /* Assets.xcassets */; }; 15 | 6D836C6B1FB60E92007E8FEC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D836C691FB60E92007E8FEC /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 206AC5286DA00AD970128DA1 /* Pods-Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig"; sourceTree = ""; }; 20 | 6D836C5D1FB60E92007E8FEC /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | 6D836C601FB60E92007E8FEC /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 22 | 6D836C621FB60E92007E8FEC /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 23 | 6D836C651FB60E92007E8FEC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 24 | 6D836C671FB60E92007E8FEC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 25 | 6D836C6A1FB60E92007E8FEC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 26 | 6D836C6C1FB60E92007E8FEC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 27 | AE338050091FC401A9DBAED8 /* Pods-Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo.release.xcconfig"; path = "Pods/Target Support Files/Pods-Demo/Pods-Demo.release.xcconfig"; sourceTree = ""; }; 28 | E5C043DFD5EC68B97B7A2B93 /* Pods_Demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Demo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | 6D836C5A1FB60E92007E8FEC /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | 1C2D5A4388A1A7D69FEF2D14 /* Pods_Demo.framework in Frameworks */, 37 | ); 38 | runOnlyForDeploymentPostprocessing = 0; 39 | }; 40 | /* End PBXFrameworksBuildPhase section */ 41 | 42 | /* Begin PBXGroup section */ 43 | 6D836C541FB60E92007E8FEC = { 44 | isa = PBXGroup; 45 | children = ( 46 | 6D836C5F1FB60E92007E8FEC /* Demo */, 47 | 6D836C5E1FB60E92007E8FEC /* Products */, 48 | 7EAACEAD45B3A2001441CD76 /* Pods */, 49 | EBB3B27E0A2A78599F3F72F9 /* Frameworks */, 50 | ); 51 | sourceTree = ""; 52 | }; 53 | 6D836C5E1FB60E92007E8FEC /* Products */ = { 54 | isa = PBXGroup; 55 | children = ( 56 | 6D836C5D1FB60E92007E8FEC /* Demo.app */, 57 | ); 58 | name = Products; 59 | sourceTree = ""; 60 | }; 61 | 6D836C5F1FB60E92007E8FEC /* Demo */ = { 62 | isa = PBXGroup; 63 | children = ( 64 | 6D836C601FB60E92007E8FEC /* AppDelegate.swift */, 65 | 6D836C621FB60E92007E8FEC /* ViewController.swift */, 66 | 6D836C641FB60E92007E8FEC /* Main.storyboard */, 67 | 6D836C671FB60E92007E8FEC /* Assets.xcassets */, 68 | 6D836C691FB60E92007E8FEC /* LaunchScreen.storyboard */, 69 | 6D836C6C1FB60E92007E8FEC /* Info.plist */, 70 | ); 71 | path = Demo; 72 | sourceTree = ""; 73 | }; 74 | 7EAACEAD45B3A2001441CD76 /* Pods */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 206AC5286DA00AD970128DA1 /* Pods-Demo.debug.xcconfig */, 78 | AE338050091FC401A9DBAED8 /* Pods-Demo.release.xcconfig */, 79 | ); 80 | name = Pods; 81 | sourceTree = ""; 82 | }; 83 | EBB3B27E0A2A78599F3F72F9 /* Frameworks */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | E5C043DFD5EC68B97B7A2B93 /* Pods_Demo.framework */, 87 | ); 88 | name = Frameworks; 89 | sourceTree = ""; 90 | }; 91 | /* End PBXGroup section */ 92 | 93 | /* Begin PBXNativeTarget section */ 94 | 6D836C5C1FB60E92007E8FEC /* Demo */ = { 95 | isa = PBXNativeTarget; 96 | buildConfigurationList = 6D836C6F1FB60E92007E8FEC /* Build configuration list for PBXNativeTarget "Demo" */; 97 | buildPhases = ( 98 | E59C11B5C4277756D519D1E8 /* [CP] Check Pods Manifest.lock */, 99 | 6D836C591FB60E92007E8FEC /* Sources */, 100 | 6D836C5A1FB60E92007E8FEC /* Frameworks */, 101 | 6D836C5B1FB60E92007E8FEC /* Resources */, 102 | BA210E8D4579BA7B66DA3CB1 /* [CP] Embed Pods Frameworks */, 103 | F909F98762369DA264436089 /* [CP] Copy Pods Resources */, 104 | ); 105 | buildRules = ( 106 | ); 107 | dependencies = ( 108 | ); 109 | name = Demo; 110 | productName = Demo; 111 | productReference = 6D836C5D1FB60E92007E8FEC /* Demo.app */; 112 | productType = "com.apple.product-type.application"; 113 | }; 114 | /* End PBXNativeTarget section */ 115 | 116 | /* Begin PBXProject section */ 117 | 6D836C551FB60E92007E8FEC /* Project object */ = { 118 | isa = PBXProject; 119 | attributes = { 120 | LastSwiftUpdateCheck = 0910; 121 | LastUpgradeCheck = 0910; 122 | ORGANIZATIONNAME = "Paolo Cuscela"; 123 | TargetAttributes = { 124 | 6D836C5C1FB60E92007E8FEC = { 125 | CreatedOnToolsVersion = 9.1; 126 | ProvisioningStyle = Automatic; 127 | }; 128 | }; 129 | }; 130 | buildConfigurationList = 6D836C581FB60E92007E8FEC /* Build configuration list for PBXProject "Demo" */; 131 | compatibilityVersion = "Xcode 8.0"; 132 | developmentRegion = en; 133 | hasScannedForEncodings = 0; 134 | knownRegions = ( 135 | en, 136 | Base, 137 | ); 138 | mainGroup = 6D836C541FB60E92007E8FEC; 139 | productRefGroup = 6D836C5E1FB60E92007E8FEC /* Products */; 140 | projectDirPath = ""; 141 | projectRoot = ""; 142 | targets = ( 143 | 6D836C5C1FB60E92007E8FEC /* Demo */, 144 | ); 145 | }; 146 | /* End PBXProject section */ 147 | 148 | /* Begin PBXResourcesBuildPhase section */ 149 | 6D836C5B1FB60E92007E8FEC /* Resources */ = { 150 | isa = PBXResourcesBuildPhase; 151 | buildActionMask = 2147483647; 152 | files = ( 153 | 6D836C6B1FB60E92007E8FEC /* LaunchScreen.storyboard in Resources */, 154 | 6D836C681FB60E92007E8FEC /* Assets.xcassets in Resources */, 155 | 6D836C661FB60E92007E8FEC /* Main.storyboard in Resources */, 156 | ); 157 | runOnlyForDeploymentPostprocessing = 0; 158 | }; 159 | /* End PBXResourcesBuildPhase section */ 160 | 161 | /* Begin PBXShellScriptBuildPhase section */ 162 | BA210E8D4579BA7B66DA3CB1 /* [CP] Embed Pods Frameworks */ = { 163 | isa = PBXShellScriptBuildPhase; 164 | buildActionMask = 2147483647; 165 | files = ( 166 | ); 167 | inputPaths = ( 168 | "${SRCROOT}/Pods/Target Support Files/Pods-Demo/Pods-Demo-frameworks.sh", 169 | "${BUILT_PRODUCTS_DIR}/Caliber/Caliber.framework", 170 | ); 171 | name = "[CP] Embed Pods Frameworks"; 172 | outputPaths = ( 173 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Caliber.framework", 174 | ); 175 | runOnlyForDeploymentPostprocessing = 0; 176 | shellPath = /bin/sh; 177 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Demo/Pods-Demo-frameworks.sh\"\n"; 178 | showEnvVarsInLog = 0; 179 | }; 180 | E59C11B5C4277756D519D1E8 /* [CP] Check Pods Manifest.lock */ = { 181 | isa = PBXShellScriptBuildPhase; 182 | buildActionMask = 2147483647; 183 | files = ( 184 | ); 185 | inputPaths = ( 186 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 187 | "${PODS_ROOT}/Manifest.lock", 188 | ); 189 | name = "[CP] Check Pods Manifest.lock"; 190 | outputPaths = ( 191 | "$(DERIVED_FILE_DIR)/Pods-Demo-checkManifestLockResult.txt", 192 | ); 193 | runOnlyForDeploymentPostprocessing = 0; 194 | shellPath = /bin/sh; 195 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 196 | showEnvVarsInLog = 0; 197 | }; 198 | F909F98762369DA264436089 /* [CP] Copy Pods Resources */ = { 199 | isa = PBXShellScriptBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | ); 203 | inputPaths = ( 204 | ); 205 | name = "[CP] Copy Pods Resources"; 206 | outputPaths = ( 207 | ); 208 | runOnlyForDeploymentPostprocessing = 0; 209 | shellPath = /bin/sh; 210 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Demo/Pods-Demo-resources.sh\"\n"; 211 | showEnvVarsInLog = 0; 212 | }; 213 | /* End PBXShellScriptBuildPhase section */ 214 | 215 | /* Begin PBXSourcesBuildPhase section */ 216 | 6D836C591FB60E92007E8FEC /* Sources */ = { 217 | isa = PBXSourcesBuildPhase; 218 | buildActionMask = 2147483647; 219 | files = ( 220 | 6D836C631FB60E92007E8FEC /* ViewController.swift in Sources */, 221 | 6D836C611FB60E92007E8FEC /* AppDelegate.swift in Sources */, 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | }; 225 | /* End PBXSourcesBuildPhase section */ 226 | 227 | /* Begin PBXVariantGroup section */ 228 | 6D836C641FB60E92007E8FEC /* Main.storyboard */ = { 229 | isa = PBXVariantGroup; 230 | children = ( 231 | 6D836C651FB60E92007E8FEC /* Base */, 232 | ); 233 | name = Main.storyboard; 234 | sourceTree = ""; 235 | }; 236 | 6D836C691FB60E92007E8FEC /* LaunchScreen.storyboard */ = { 237 | isa = PBXVariantGroup; 238 | children = ( 239 | 6D836C6A1FB60E92007E8FEC /* Base */, 240 | ); 241 | name = LaunchScreen.storyboard; 242 | sourceTree = ""; 243 | }; 244 | /* End PBXVariantGroup section */ 245 | 246 | /* Begin XCBuildConfiguration section */ 247 | 6D836C6D1FB60E92007E8FEC /* Debug */ = { 248 | isa = XCBuildConfiguration; 249 | buildSettings = { 250 | ALWAYS_SEARCH_USER_PATHS = NO; 251 | CLANG_ANALYZER_NONNULL = YES; 252 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 253 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 254 | CLANG_CXX_LIBRARY = "libc++"; 255 | CLANG_ENABLE_MODULES = YES; 256 | CLANG_ENABLE_OBJC_ARC = YES; 257 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 258 | CLANG_WARN_BOOL_CONVERSION = YES; 259 | CLANG_WARN_COMMA = YES; 260 | CLANG_WARN_CONSTANT_CONVERSION = YES; 261 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 262 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 263 | CLANG_WARN_EMPTY_BODY = YES; 264 | CLANG_WARN_ENUM_CONVERSION = YES; 265 | CLANG_WARN_INFINITE_RECURSION = YES; 266 | CLANG_WARN_INT_CONVERSION = YES; 267 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 268 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 269 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 270 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 271 | CLANG_WARN_STRICT_PROTOTYPES = YES; 272 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 273 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 274 | CLANG_WARN_UNREACHABLE_CODE = YES; 275 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 276 | CODE_SIGN_IDENTITY = "iPhone Developer"; 277 | COPY_PHASE_STRIP = NO; 278 | DEBUG_INFORMATION_FORMAT = dwarf; 279 | ENABLE_STRICT_OBJC_MSGSEND = YES; 280 | ENABLE_TESTABILITY = YES; 281 | GCC_C_LANGUAGE_STANDARD = gnu11; 282 | GCC_DYNAMIC_NO_PIC = NO; 283 | GCC_NO_COMMON_BLOCKS = YES; 284 | GCC_OPTIMIZATION_LEVEL = 0; 285 | GCC_PREPROCESSOR_DEFINITIONS = ( 286 | "DEBUG=1", 287 | "$(inherited)", 288 | ); 289 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 290 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 291 | GCC_WARN_UNDECLARED_SELECTOR = YES; 292 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 293 | GCC_WARN_UNUSED_FUNCTION = YES; 294 | GCC_WARN_UNUSED_VARIABLE = YES; 295 | IPHONEOS_DEPLOYMENT_TARGET = 11.1; 296 | MTL_ENABLE_DEBUG_INFO = YES; 297 | ONLY_ACTIVE_ARCH = YES; 298 | SDKROOT = iphoneos; 299 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 300 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 301 | }; 302 | name = Debug; 303 | }; 304 | 6D836C6E1FB60E92007E8FEC /* Release */ = { 305 | isa = XCBuildConfiguration; 306 | buildSettings = { 307 | ALWAYS_SEARCH_USER_PATHS = NO; 308 | CLANG_ANALYZER_NONNULL = YES; 309 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 310 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 311 | CLANG_CXX_LIBRARY = "libc++"; 312 | CLANG_ENABLE_MODULES = YES; 313 | CLANG_ENABLE_OBJC_ARC = YES; 314 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 315 | CLANG_WARN_BOOL_CONVERSION = YES; 316 | CLANG_WARN_COMMA = YES; 317 | CLANG_WARN_CONSTANT_CONVERSION = YES; 318 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 319 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 320 | CLANG_WARN_EMPTY_BODY = YES; 321 | CLANG_WARN_ENUM_CONVERSION = YES; 322 | CLANG_WARN_INFINITE_RECURSION = YES; 323 | CLANG_WARN_INT_CONVERSION = YES; 324 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 325 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 326 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 327 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 328 | CLANG_WARN_STRICT_PROTOTYPES = YES; 329 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 330 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 331 | CLANG_WARN_UNREACHABLE_CODE = YES; 332 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 333 | CODE_SIGN_IDENTITY = "iPhone Developer"; 334 | COPY_PHASE_STRIP = NO; 335 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 336 | ENABLE_NS_ASSERTIONS = NO; 337 | ENABLE_STRICT_OBJC_MSGSEND = YES; 338 | GCC_C_LANGUAGE_STANDARD = gnu11; 339 | GCC_NO_COMMON_BLOCKS = YES; 340 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 341 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 342 | GCC_WARN_UNDECLARED_SELECTOR = YES; 343 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 344 | GCC_WARN_UNUSED_FUNCTION = YES; 345 | GCC_WARN_UNUSED_VARIABLE = YES; 346 | IPHONEOS_DEPLOYMENT_TARGET = 11.1; 347 | MTL_ENABLE_DEBUG_INFO = NO; 348 | SDKROOT = iphoneos; 349 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 350 | VALIDATE_PRODUCT = YES; 351 | }; 352 | name = Release; 353 | }; 354 | 6D836C701FB60E92007E8FEC /* Debug */ = { 355 | isa = XCBuildConfiguration; 356 | baseConfigurationReference = 206AC5286DA00AD970128DA1 /* Pods-Demo.debug.xcconfig */; 357 | buildSettings = { 358 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 359 | CODE_SIGN_STYLE = Automatic; 360 | DEVELOPMENT_TEAM = 4B98PNC6BV; 361 | INFOPLIST_FILE = Demo/Info.plist; 362 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 363 | PRODUCT_BUNDLE_IDENTIFIER = paolocuscela.Demo; 364 | PRODUCT_NAME = "$(TARGET_NAME)"; 365 | SWIFT_VERSION = 4.0; 366 | TARGETED_DEVICE_FAMILY = "1,2"; 367 | }; 368 | name = Debug; 369 | }; 370 | 6D836C711FB60E92007E8FEC /* Release */ = { 371 | isa = XCBuildConfiguration; 372 | baseConfigurationReference = AE338050091FC401A9DBAED8 /* Pods-Demo.release.xcconfig */; 373 | buildSettings = { 374 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 375 | CODE_SIGN_STYLE = Automatic; 376 | DEVELOPMENT_TEAM = 4B98PNC6BV; 377 | INFOPLIST_FILE = Demo/Info.plist; 378 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 379 | PRODUCT_BUNDLE_IDENTIFIER = paolocuscela.Demo; 380 | PRODUCT_NAME = "$(TARGET_NAME)"; 381 | SWIFT_VERSION = 4.0; 382 | TARGETED_DEVICE_FAMILY = "1,2"; 383 | }; 384 | name = Release; 385 | }; 386 | /* End XCBuildConfiguration section */ 387 | 388 | /* Begin XCConfigurationList section */ 389 | 6D836C581FB60E92007E8FEC /* Build configuration list for PBXProject "Demo" */ = { 390 | isa = XCConfigurationList; 391 | buildConfigurations = ( 392 | 6D836C6D1FB60E92007E8FEC /* Debug */, 393 | 6D836C6E1FB60E92007E8FEC /* Release */, 394 | ); 395 | defaultConfigurationIsVisible = 0; 396 | defaultConfigurationName = Release; 397 | }; 398 | 6D836C6F1FB60E92007E8FEC /* Build configuration list for PBXNativeTarget "Demo" */ = { 399 | isa = XCConfigurationList; 400 | buildConfigurations = ( 401 | 6D836C701FB60E92007E8FEC /* Debug */, 402 | 6D836C711FB60E92007E8FEC /* Release */, 403 | ); 404 | defaultConfigurationIsVisible = 0; 405 | defaultConfigurationName = Release; 406 | }; 407 | /* End XCConfigurationList section */ 408 | }; 409 | rootObject = 6D836C551FB60E92007E8FEC /* Project object */; 410 | } 411 | -------------------------------------------------------------------------------- /Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demo/Demo.xcodeproj/project.xcworkspace/xcuserdata/paolocuscela.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaoloCuscela/Caliber/5d8924aa33bf75a9b61212afa6d238902307cc1d/Demo/Demo.xcodeproj/project.xcworkspace/xcuserdata/paolocuscela.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Demo/Demo.xcodeproj/xcuserdata/paolocuscela.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Demo.xcscheme 8 | 9 | orderHint 10 | 2 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Demo/Demo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Demo/Demo.xcworkspace/xcuserdata/paolocuscela.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaoloCuscela/Caliber/5d8924aa33bf75a9b61212afa6d238902307cc1d/Demo/Demo.xcworkspace/xcuserdata/paolocuscela.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Demo/Demo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Demo 4 | // 5 | // Created by Paolo Cuscela on 10/11/17. 6 | // Copyright © 2017 Paolo Cuscela. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/Header.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Header.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Header-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Header-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/Header.imageset/Header-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaoloCuscela/Caliber/5d8924aa33bf75a9b61212afa6d238902307cc1d/Demo/Demo/Assets.xcassets/Header.imageset/Header-1.png -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/Header.imageset/Header-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaoloCuscela/Caliber/5d8924aa33bf75a9b61212afa6d238902307cc1d/Demo/Demo/Assets.xcassets/Header.imageset/Header-2.png -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/Header.imageset/Header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaoloCuscela/Caliber/5d8924aa33bf75a9b61212afa6d238902307cc1d/Demo/Demo/Assets.xcassets/Header.imageset/Header.png -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/background.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Forest-Minimal-Download-Wallpaper-HD-1366x768.jpg" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | }, 12 | "properties" : { 13 | "template-rendering-intent" : "original" 14 | } 15 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/background.imageset/Forest-Minimal-Download-Wallpaper-HD-1366x768.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaoloCuscela/Caliber/5d8924aa33bf75a9b61212afa6d238902307cc1d/Demo/Demo/Assets.xcassets/background.imageset/Forest-Minimal-Download-Wallpaper-HD-1366x768.jpg -------------------------------------------------------------------------------- /Demo/Demo/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 | -------------------------------------------------------------------------------- /Demo/Demo/Base.lproj/Main.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 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Demo/Demo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(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 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Demo/Demo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Demo 4 | // 5 | // Created by Paolo Cuscela on 10/11/17. 6 | // Copyright © 2017 Paolo Cuscela. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Caliber 11 | 12 | class ViewController: UIViewController { 13 | 14 | let header = UIImageView() 15 | let blurRect = UIVisualEffectView(effect: UIBlurEffect(style: .regular)) 16 | let summary = UILabel() 17 | let backgroundIV = UIImageView() 18 | 19 | override func viewDidLoad() { 20 | super.viewDidLoad() 21 | 22 | // Setup your views and add them to a superview. 23 | setup() 24 | view.addSubview(header) 25 | view.addSubview(backgroundIV) 26 | backgroundIV.addSubview(blurRect) 27 | blurRect.contentView.addSubview(summary) 28 | 29 | // Add Constrains. 30 | header.caliber .top(with: view, .top, offset: -20) 31 | .left(with: view, .left) 32 | .right(with: view, .right) 33 | .aspect = 2560/1080 34 | 35 | backgroundIV.caliber .top(with: header, .bottom, offset: 20) 36 | .left(with: view, .left, offset: 20) 37 | .right(with: view, .right, offset: -20) 38 | .bottom(with: view, .bottom, offset: -20) 39 | .ok() 40 | 41 | blurRect.caliber .bottom(with: backgroundIV, .bottom, offset: -20) 42 | .right(with: backgroundIV, .right, offset: -20) 43 | .left(with: backgroundIV, .left, offset: 20) 44 | .height = 60 45 | 46 | summary.caliber.fit(inside: blurRect.contentView) 47 | 48 | } 49 | 50 | func setup(){ 51 | 52 | header.image = #imageLiteral(resourceName: "Header") 53 | header.contentMode = .scaleAspectFill 54 | header.clipsToBounds = true 55 | 56 | backgroundIV.image = #imageLiteral(resourceName: "background") 57 | backgroundIV.contentMode = .scaleAspectFill 58 | backgroundIV.layer.cornerRadius = 20 59 | backgroundIV.clipsToBounds = true 60 | 61 | blurRect.layer.cornerRadius = 20 62 | blurRect.clipsToBounds = true 63 | 64 | summary.text = "Implementing AutoLayout constrains programmatically made dead simple." 65 | summary.textColor = UIColor.white 66 | summary.numberOfLines = 2 67 | summary.font = UIFont.boldSystemFont(ofSize: summary.font.pointSize) 68 | summary.textAlignment = .center 69 | summary.adjustsFontSizeToFitWidth = true 70 | } 71 | 72 | } 73 | 74 | -------------------------------------------------------------------------------- /Demo/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'Demo' do 5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for Demo 9 | pod 'Caliber', :path => '../' 10 | 11 | end 12 | -------------------------------------------------------------------------------- /Demo/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Caliber (1.0) 3 | 4 | DEPENDENCIES: 5 | - Caliber (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | Caliber: 9 | :path: ../ 10 | 11 | SPEC CHECKSUMS: 12 | Caliber: 754fce480a33fa4116c509e8636b8ec039633a9b 13 | 14 | PODFILE CHECKSUM: 89fa107166259e8893602f3906398b25f5f553cc 15 | 16 | COCOAPODS: 1.3.1 17 | -------------------------------------------------------------------------------- /Demo/Pods/Local Podspecs/Caliber.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Caliber", 3 | "version": "1.0", 4 | "summary": "Implementing autolayout constrains programmatically made dead simple.", 5 | "homepage": "https://github.com/PaoloCuscela/Caliber", 6 | "screenshots": [ 7 | "", 8 | "" 9 | ], 10 | "license": { 11 | "type": "MIT", 12 | "file": "LICENSE" 13 | }, 14 | "authors": { 15 | "Paolo Cuscela": "cuscio.2@gmail.com" 16 | }, 17 | "source": { 18 | "git": "https://github.com/PaoloCuscela/Caliber.git", 19 | "tag": "1.0" 20 | }, 21 | "platforms": { 22 | "ios": "9.0" 23 | }, 24 | "source_files": "Caliber/*", 25 | "frameworks": "UIKit" 26 | } 27 | -------------------------------------------------------------------------------- /Demo/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Caliber (1.0) 3 | 4 | DEPENDENCIES: 5 | - Caliber (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | Caliber: 9 | :path: ../ 10 | 11 | SPEC CHECKSUMS: 12 | Caliber: 754fce480a33fa4116c509e8636b8ec039633a9b 13 | 14 | PODFILE CHECKSUM: 89fa107166259e8893602f3906398b25f5f553cc 15 | 16 | COCOAPODS: 1.3.1 17 | -------------------------------------------------------------------------------- /Demo/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0872B098655A47ADA7DA901EDF103073 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */; }; 11 | 1B3D8FD824DDEC533182974C2C23F07A /* Pods-Demo-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 03EA1E60232BFA05817BC26ACB8E68BA /* Pods-Demo-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | 3CDAC310242174180C42789E81BB8140 /* Caliber-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 254F44512C1EB42DEA04F8A51498E242 /* Caliber-dummy.m */; }; 13 | 52085D4B16F3A84847BB1C18DBD93116 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B63C6A64CF66340668996F78DA6BB482 /* UIKit.framework */; }; 14 | 73904F7A246295A71378AFAA98E8A7FB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */; }; 15 | AC06408C0E97C669760EFF72FBE2E8CC /* Pods-Demo-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C5BC86D40B890A7B0844F888209CA06F /* Pods-Demo-dummy.m */; }; 16 | D017148BC8D050B1F1C1408FA48F7E5B /* Caliber-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B47B22462AEF354288CC18AFCCC49408 /* Caliber-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 17 | F12310D197F919EC4C36309123EE8942 /* Caliber.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD79A2E7E9B47DFB0DDDC7468BB11A58 /* Caliber.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | 01180C29842F94D805A406C5E6A4C49C /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = 9A0B96746704297B59686B7D42DD8C09; 26 | remoteInfo = Caliber; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 03EA1E60232BFA05817BC26ACB8E68BA /* Pods-Demo-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Demo-umbrella.h"; sourceTree = ""; }; 32 | 04CE20BFBA0F564640BF10F29BE86917 /* Pods_Demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Demo.framework; path = "Pods-Demo.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | 254F44512C1EB42DEA04F8A51498E242 /* Caliber-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Caliber-dummy.m"; sourceTree = ""; }; 34 | 322419E99883B306EE7EC77959FCC8DF /* Pods-Demo.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-Demo.modulemap"; sourceTree = ""; }; 35 | 3CD5A30239C90F1B549B4AB9299ECF16 /* Pods-Demo-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Demo-frameworks.sh"; sourceTree = ""; }; 36 | 3D653C9DA16200D75AD14323AA830C6B /* Pods-Demo-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Demo-resources.sh"; sourceTree = ""; }; 37 | 517EC55D2972B4886C264736C4BD6E2F /* Caliber.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Caliber.xcconfig; sourceTree = ""; }; 38 | 6756EC8559C4FB543DC2DEA9EE6AD0D0 /* Caliber.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Caliber.modulemap; sourceTree = ""; }; 39 | 71940C1CEB7995DC34CFE54CAF1AEF88 /* Pods-Demo-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Demo-acknowledgements.markdown"; sourceTree = ""; }; 40 | 81211C5071F644D60C4B66CB24EE3624 /* Caliber-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Caliber-prefix.pch"; sourceTree = ""; }; 41 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 42 | A4031FF22D60858DC71296E9142647D1 /* Caliber.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Caliber.framework; path = Caliber.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | AD79A2E7E9B47DFB0DDDC7468BB11A58 /* Caliber.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Caliber.swift; path = Caliber/Caliber.swift; sourceTree = ""; }; 44 | B47B22462AEF354288CC18AFCCC49408 /* Caliber-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Caliber-umbrella.h"; sourceTree = ""; }; 45 | B63C6A64CF66340668996F78DA6BB482 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 46 | C5BC86D40B890A7B0844F888209CA06F /* Pods-Demo-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Demo-dummy.m"; sourceTree = ""; }; 47 | CA19694C0AC41D598DE4ABFEB300E619 /* Pods-Demo-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Demo-acknowledgements.plist"; sourceTree = ""; }; 48 | CC6A59B0ADA6CB2F51DAE6508E437829 /* Pods-Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Demo.debug.xcconfig"; sourceTree = ""; }; 49 | D295553F9B2A225C9766277642DD6786 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 51 | DAB0701F8F25395B1ED46510ED4B9797 /* Pods-Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Demo.release.xcconfig"; sourceTree = ""; }; 52 | E68F8C86FB3267A3C87983DA9E269889 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | /* End PBXFileReference section */ 54 | 55 | /* Begin PBXFrameworksBuildPhase section */ 56 | 08ED85E7CCFFD9365E9A950A75A4643A /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | 73904F7A246295A71378AFAA98E8A7FB /* Foundation.framework in Frameworks */, 61 | 52085D4B16F3A84847BB1C18DBD93116 /* UIKit.framework in Frameworks */, 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | 0DC516D346DDCF9148B90B04C01CBB4A /* Frameworks */ = { 66 | isa = PBXFrameworksBuildPhase; 67 | buildActionMask = 2147483647; 68 | files = ( 69 | 0872B098655A47ADA7DA901EDF103073 /* Foundation.framework in Frameworks */, 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | /* End PBXFrameworksBuildPhase section */ 74 | 75 | /* Begin PBXGroup section */ 76 | 1FFD0B12C1910D6EB7660C15B995BB07 /* Development Pods */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | 97CBF67ECE08EDDB57161CFB72F7C7EA /* Caliber */, 80 | ); 81 | name = "Development Pods"; 82 | sourceTree = ""; 83 | }; 84 | 433CD3331B6C3787F473C941B61FC68F /* Frameworks */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 438B396F6B4147076630CAEFE34282C1 /* iOS */, 88 | ); 89 | name = Frameworks; 90 | sourceTree = ""; 91 | }; 92 | 438B396F6B4147076630CAEFE34282C1 /* iOS */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */, 96 | B63C6A64CF66340668996F78DA6BB482 /* UIKit.framework */, 97 | ); 98 | name = iOS; 99 | sourceTree = ""; 100 | }; 101 | 6F2351C272926D3E0225FEFC2F9C5D1F /* Targets Support Files */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | ECC58720C5754A079F9A150E40E2FCDD /* Pods-Demo */, 105 | ); 106 | name = "Targets Support Files"; 107 | sourceTree = ""; 108 | }; 109 | 7DB346D0F39D3F0E887471402A8071AB = { 110 | isa = PBXGroup; 111 | children = ( 112 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 113 | 1FFD0B12C1910D6EB7660C15B995BB07 /* Development Pods */, 114 | 433CD3331B6C3787F473C941B61FC68F /* Frameworks */, 115 | E8B1E1EA9F8C3ECBFE0D1FBA9A8374A0 /* Products */, 116 | 6F2351C272926D3E0225FEFC2F9C5D1F /* Targets Support Files */, 117 | ); 118 | sourceTree = ""; 119 | }; 120 | 97CBF67ECE08EDDB57161CFB72F7C7EA /* Caliber */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | AD79A2E7E9B47DFB0DDDC7468BB11A58 /* Caliber.swift */, 124 | E85F8A8691630C4B1E260A207A3A4C8A /* Support Files */, 125 | ); 126 | name = Caliber; 127 | path = ../..; 128 | sourceTree = ""; 129 | }; 130 | E85F8A8691630C4B1E260A207A3A4C8A /* Support Files */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 6756EC8559C4FB543DC2DEA9EE6AD0D0 /* Caliber.modulemap */, 134 | 517EC55D2972B4886C264736C4BD6E2F /* Caliber.xcconfig */, 135 | 254F44512C1EB42DEA04F8A51498E242 /* Caliber-dummy.m */, 136 | 81211C5071F644D60C4B66CB24EE3624 /* Caliber-prefix.pch */, 137 | B47B22462AEF354288CC18AFCCC49408 /* Caliber-umbrella.h */, 138 | D295553F9B2A225C9766277642DD6786 /* Info.plist */, 139 | ); 140 | name = "Support Files"; 141 | path = "Demo/Pods/Target Support Files/Caliber"; 142 | sourceTree = ""; 143 | }; 144 | E8B1E1EA9F8C3ECBFE0D1FBA9A8374A0 /* Products */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | A4031FF22D60858DC71296E9142647D1 /* Caliber.framework */, 148 | 04CE20BFBA0F564640BF10F29BE86917 /* Pods_Demo.framework */, 149 | ); 150 | name = Products; 151 | sourceTree = ""; 152 | }; 153 | ECC58720C5754A079F9A150E40E2FCDD /* Pods-Demo */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | E68F8C86FB3267A3C87983DA9E269889 /* Info.plist */, 157 | 322419E99883B306EE7EC77959FCC8DF /* Pods-Demo.modulemap */, 158 | 71940C1CEB7995DC34CFE54CAF1AEF88 /* Pods-Demo-acknowledgements.markdown */, 159 | CA19694C0AC41D598DE4ABFEB300E619 /* Pods-Demo-acknowledgements.plist */, 160 | C5BC86D40B890A7B0844F888209CA06F /* Pods-Demo-dummy.m */, 161 | 3CD5A30239C90F1B549B4AB9299ECF16 /* Pods-Demo-frameworks.sh */, 162 | 3D653C9DA16200D75AD14323AA830C6B /* Pods-Demo-resources.sh */, 163 | 03EA1E60232BFA05817BC26ACB8E68BA /* Pods-Demo-umbrella.h */, 164 | CC6A59B0ADA6CB2F51DAE6508E437829 /* Pods-Demo.debug.xcconfig */, 165 | DAB0701F8F25395B1ED46510ED4B9797 /* Pods-Demo.release.xcconfig */, 166 | ); 167 | name = "Pods-Demo"; 168 | path = "Target Support Files/Pods-Demo"; 169 | sourceTree = ""; 170 | }; 171 | /* End PBXGroup section */ 172 | 173 | /* Begin PBXHeadersBuildPhase section */ 174 | BC397D5BC86CE05B161A52D2A7E155D7 /* Headers */ = { 175 | isa = PBXHeadersBuildPhase; 176 | buildActionMask = 2147483647; 177 | files = ( 178 | 1B3D8FD824DDEC533182974C2C23F07A /* Pods-Demo-umbrella.h in Headers */, 179 | ); 180 | runOnlyForDeploymentPostprocessing = 0; 181 | }; 182 | C1F7394808AE2B0E9F878C96A7F343E9 /* Headers */ = { 183 | isa = PBXHeadersBuildPhase; 184 | buildActionMask = 2147483647; 185 | files = ( 186 | D017148BC8D050B1F1C1408FA48F7E5B /* Caliber-umbrella.h in Headers */, 187 | ); 188 | runOnlyForDeploymentPostprocessing = 0; 189 | }; 190 | /* End PBXHeadersBuildPhase section */ 191 | 192 | /* Begin PBXNativeTarget section */ 193 | 9A0B96746704297B59686B7D42DD8C09 /* Caliber */ = { 194 | isa = PBXNativeTarget; 195 | buildConfigurationList = 2791A16D2862E2F6599BF538B10BF786 /* Build configuration list for PBXNativeTarget "Caliber" */; 196 | buildPhases = ( 197 | B7C89A3C5A3AB839D7008F8A8F64443A /* Sources */, 198 | 08ED85E7CCFFD9365E9A950A75A4643A /* Frameworks */, 199 | C1F7394808AE2B0E9F878C96A7F343E9 /* Headers */, 200 | ); 201 | buildRules = ( 202 | ); 203 | dependencies = ( 204 | ); 205 | name = Caliber; 206 | productName = Caliber; 207 | productReference = A4031FF22D60858DC71296E9142647D1 /* Caliber.framework */; 208 | productType = "com.apple.product-type.framework"; 209 | }; 210 | B0AA55C86957FFD8BB8F2B744A9A400A /* Pods-Demo */ = { 211 | isa = PBXNativeTarget; 212 | buildConfigurationList = 77FB5144D7D99A098D7F1D185AAE9716 /* Build configuration list for PBXNativeTarget "Pods-Demo" */; 213 | buildPhases = ( 214 | 9420AF052F93ACDFB3D39BE948CA2BE6 /* Sources */, 215 | 0DC516D346DDCF9148B90B04C01CBB4A /* Frameworks */, 216 | BC397D5BC86CE05B161A52D2A7E155D7 /* Headers */, 217 | ); 218 | buildRules = ( 219 | ); 220 | dependencies = ( 221 | F4C229570207C6D1F39D5014E9BB3B3B /* PBXTargetDependency */, 222 | ); 223 | name = "Pods-Demo"; 224 | productName = "Pods-Demo"; 225 | productReference = 04CE20BFBA0F564640BF10F29BE86917 /* Pods_Demo.framework */; 226 | productType = "com.apple.product-type.framework"; 227 | }; 228 | /* End PBXNativeTarget section */ 229 | 230 | /* Begin PBXProject section */ 231 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 232 | isa = PBXProject; 233 | attributes = { 234 | LastSwiftUpdateCheck = 0830; 235 | LastUpgradeCheck = 0700; 236 | }; 237 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 238 | compatibilityVersion = "Xcode 3.2"; 239 | developmentRegion = English; 240 | hasScannedForEncodings = 0; 241 | knownRegions = ( 242 | en, 243 | ); 244 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 245 | productRefGroup = E8B1E1EA9F8C3ECBFE0D1FBA9A8374A0 /* Products */; 246 | projectDirPath = ""; 247 | projectRoot = ""; 248 | targets = ( 249 | 9A0B96746704297B59686B7D42DD8C09 /* Caliber */, 250 | B0AA55C86957FFD8BB8F2B744A9A400A /* Pods-Demo */, 251 | ); 252 | }; 253 | /* End PBXProject section */ 254 | 255 | /* Begin PBXSourcesBuildPhase section */ 256 | 9420AF052F93ACDFB3D39BE948CA2BE6 /* Sources */ = { 257 | isa = PBXSourcesBuildPhase; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | AC06408C0E97C669760EFF72FBE2E8CC /* Pods-Demo-dummy.m in Sources */, 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | B7C89A3C5A3AB839D7008F8A8F64443A /* Sources */ = { 265 | isa = PBXSourcesBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | 3CDAC310242174180C42789E81BB8140 /* Caliber-dummy.m in Sources */, 269 | F12310D197F919EC4C36309123EE8942 /* Caliber.swift in Sources */, 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | }; 273 | /* End PBXSourcesBuildPhase section */ 274 | 275 | /* Begin PBXTargetDependency section */ 276 | F4C229570207C6D1F39D5014E9BB3B3B /* PBXTargetDependency */ = { 277 | isa = PBXTargetDependency; 278 | name = Caliber; 279 | target = 9A0B96746704297B59686B7D42DD8C09 /* Caliber */; 280 | targetProxy = 01180C29842F94D805A406C5E6A4C49C /* PBXContainerItemProxy */; 281 | }; 282 | /* End PBXTargetDependency section */ 283 | 284 | /* Begin XCBuildConfiguration section */ 285 | 08B28679312CF06EAC658D35A5105BFB /* Debug */ = { 286 | isa = XCBuildConfiguration; 287 | baseConfigurationReference = CC6A59B0ADA6CB2F51DAE6508E437829 /* Pods-Demo.debug.xcconfig */; 288 | buildSettings = { 289 | CODE_SIGN_IDENTITY = ""; 290 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 291 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 292 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 293 | CURRENT_PROJECT_VERSION = 1; 294 | DEFINES_MODULE = YES; 295 | DYLIB_COMPATIBILITY_VERSION = 1; 296 | DYLIB_CURRENT_VERSION = 1; 297 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 298 | INFOPLIST_FILE = "Target Support Files/Pods-Demo/Info.plist"; 299 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 300 | IPHONEOS_DEPLOYMENT_TARGET = 11.1; 301 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 302 | MACH_O_TYPE = staticlib; 303 | MODULEMAP_FILE = "Target Support Files/Pods-Demo/Pods-Demo.modulemap"; 304 | OTHER_LDFLAGS = ""; 305 | OTHER_LIBTOOLFLAGS = ""; 306 | PODS_ROOT = "$(SRCROOT)"; 307 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 308 | PRODUCT_NAME = Pods_Demo; 309 | SDKROOT = iphoneos; 310 | SKIP_INSTALL = YES; 311 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 312 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 313 | TARGETED_DEVICE_FAMILY = "1,2"; 314 | VERSIONING_SYSTEM = "apple-generic"; 315 | VERSION_INFO_PREFIX = ""; 316 | }; 317 | name = Debug; 318 | }; 319 | 1D23278938ADF334174C5BF2A4B6B1B8 /* Release */ = { 320 | isa = XCBuildConfiguration; 321 | buildSettings = { 322 | ALWAYS_SEARCH_USER_PATHS = NO; 323 | CLANG_ANALYZER_NONNULL = YES; 324 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 325 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 326 | CLANG_CXX_LIBRARY = "libc++"; 327 | CLANG_ENABLE_MODULES = YES; 328 | CLANG_ENABLE_OBJC_ARC = YES; 329 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 330 | CLANG_WARN_BOOL_CONVERSION = YES; 331 | CLANG_WARN_COMMA = YES; 332 | CLANG_WARN_CONSTANT_CONVERSION = YES; 333 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 334 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 335 | CLANG_WARN_EMPTY_BODY = YES; 336 | CLANG_WARN_ENUM_CONVERSION = YES; 337 | CLANG_WARN_INFINITE_RECURSION = YES; 338 | CLANG_WARN_INT_CONVERSION = YES; 339 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 340 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 341 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 342 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 343 | CLANG_WARN_STRICT_PROTOTYPES = YES; 344 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 345 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 346 | CLANG_WARN_UNREACHABLE_CODE = YES; 347 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 348 | CODE_SIGNING_REQUIRED = NO; 349 | COPY_PHASE_STRIP = NO; 350 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 351 | ENABLE_NS_ASSERTIONS = NO; 352 | ENABLE_STRICT_OBJC_MSGSEND = YES; 353 | GCC_C_LANGUAGE_STANDARD = gnu11; 354 | GCC_NO_COMMON_BLOCKS = YES; 355 | GCC_PREPROCESSOR_DEFINITIONS = ( 356 | "POD_CONFIGURATION_RELEASE=1", 357 | "$(inherited)", 358 | ); 359 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 360 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 361 | GCC_WARN_UNDECLARED_SELECTOR = YES; 362 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 363 | GCC_WARN_UNUSED_FUNCTION = YES; 364 | GCC_WARN_UNUSED_VARIABLE = YES; 365 | IPHONEOS_DEPLOYMENT_TARGET = 11.1; 366 | MTL_ENABLE_DEBUG_INFO = NO; 367 | PRODUCT_NAME = "$(TARGET_NAME)"; 368 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 369 | STRIP_INSTALLED_PRODUCT = NO; 370 | SYMROOT = "${SRCROOT}/../build"; 371 | }; 372 | name = Release; 373 | }; 374 | 8EB1BE36BD75D7DF4F43A9C153B8E72C /* Release */ = { 375 | isa = XCBuildConfiguration; 376 | baseConfigurationReference = 517EC55D2972B4886C264736C4BD6E2F /* Caliber.xcconfig */; 377 | buildSettings = { 378 | CODE_SIGN_IDENTITY = ""; 379 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 380 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 381 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 382 | CURRENT_PROJECT_VERSION = 1; 383 | DEFINES_MODULE = YES; 384 | DYLIB_COMPATIBILITY_VERSION = 1; 385 | DYLIB_CURRENT_VERSION = 1; 386 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 387 | GCC_PREFIX_HEADER = "Target Support Files/Caliber/Caliber-prefix.pch"; 388 | INFOPLIST_FILE = "Target Support Files/Caliber/Info.plist"; 389 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 390 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 391 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 392 | MODULEMAP_FILE = "Target Support Files/Caliber/Caliber.modulemap"; 393 | PRODUCT_NAME = Caliber; 394 | SDKROOT = iphoneos; 395 | SKIP_INSTALL = YES; 396 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 397 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 398 | SWIFT_VERSION = 4.0; 399 | TARGETED_DEVICE_FAMILY = "1,2"; 400 | VALIDATE_PRODUCT = YES; 401 | VERSIONING_SYSTEM = "apple-generic"; 402 | VERSION_INFO_PREFIX = ""; 403 | }; 404 | name = Release; 405 | }; 406 | 995C3A53DEAA96B47E756185345E180D /* Debug */ = { 407 | isa = XCBuildConfiguration; 408 | buildSettings = { 409 | ALWAYS_SEARCH_USER_PATHS = NO; 410 | CLANG_ANALYZER_NONNULL = YES; 411 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 412 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 413 | CLANG_CXX_LIBRARY = "libc++"; 414 | CLANG_ENABLE_MODULES = YES; 415 | CLANG_ENABLE_OBJC_ARC = YES; 416 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 417 | CLANG_WARN_BOOL_CONVERSION = YES; 418 | CLANG_WARN_COMMA = YES; 419 | CLANG_WARN_CONSTANT_CONVERSION = YES; 420 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 421 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 422 | CLANG_WARN_EMPTY_BODY = YES; 423 | CLANG_WARN_ENUM_CONVERSION = YES; 424 | CLANG_WARN_INFINITE_RECURSION = YES; 425 | CLANG_WARN_INT_CONVERSION = YES; 426 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 427 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 428 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 429 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 430 | CLANG_WARN_STRICT_PROTOTYPES = YES; 431 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 432 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 433 | CLANG_WARN_UNREACHABLE_CODE = YES; 434 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 435 | CODE_SIGNING_REQUIRED = NO; 436 | COPY_PHASE_STRIP = NO; 437 | DEBUG_INFORMATION_FORMAT = dwarf; 438 | ENABLE_STRICT_OBJC_MSGSEND = YES; 439 | ENABLE_TESTABILITY = YES; 440 | GCC_C_LANGUAGE_STANDARD = gnu11; 441 | GCC_DYNAMIC_NO_PIC = NO; 442 | GCC_NO_COMMON_BLOCKS = YES; 443 | GCC_OPTIMIZATION_LEVEL = 0; 444 | GCC_PREPROCESSOR_DEFINITIONS = ( 445 | "POD_CONFIGURATION_DEBUG=1", 446 | "DEBUG=1", 447 | "$(inherited)", 448 | ); 449 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 450 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 451 | GCC_WARN_UNDECLARED_SELECTOR = YES; 452 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 453 | GCC_WARN_UNUSED_FUNCTION = YES; 454 | GCC_WARN_UNUSED_VARIABLE = YES; 455 | IPHONEOS_DEPLOYMENT_TARGET = 11.1; 456 | MTL_ENABLE_DEBUG_INFO = YES; 457 | ONLY_ACTIVE_ARCH = YES; 458 | PRODUCT_NAME = "$(TARGET_NAME)"; 459 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 460 | STRIP_INSTALLED_PRODUCT = NO; 461 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 462 | SYMROOT = "${SRCROOT}/../build"; 463 | }; 464 | name = Debug; 465 | }; 466 | A773EBA47A588CA7E749368718424610 /* Debug */ = { 467 | isa = XCBuildConfiguration; 468 | baseConfigurationReference = 517EC55D2972B4886C264736C4BD6E2F /* Caliber.xcconfig */; 469 | buildSettings = { 470 | CODE_SIGN_IDENTITY = ""; 471 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 472 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 473 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 474 | CURRENT_PROJECT_VERSION = 1; 475 | DEFINES_MODULE = YES; 476 | DYLIB_COMPATIBILITY_VERSION = 1; 477 | DYLIB_CURRENT_VERSION = 1; 478 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 479 | GCC_PREFIX_HEADER = "Target Support Files/Caliber/Caliber-prefix.pch"; 480 | INFOPLIST_FILE = "Target Support Files/Caliber/Info.plist"; 481 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 482 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 483 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 484 | MODULEMAP_FILE = "Target Support Files/Caliber/Caliber.modulemap"; 485 | PRODUCT_NAME = Caliber; 486 | SDKROOT = iphoneos; 487 | SKIP_INSTALL = YES; 488 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 489 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 490 | SWIFT_VERSION = 4.0; 491 | TARGETED_DEVICE_FAMILY = "1,2"; 492 | VERSIONING_SYSTEM = "apple-generic"; 493 | VERSION_INFO_PREFIX = ""; 494 | }; 495 | name = Debug; 496 | }; 497 | C624CFF80339AB84A95A3C5934054D01 /* Release */ = { 498 | isa = XCBuildConfiguration; 499 | baseConfigurationReference = DAB0701F8F25395B1ED46510ED4B9797 /* Pods-Demo.release.xcconfig */; 500 | buildSettings = { 501 | CODE_SIGN_IDENTITY = ""; 502 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 503 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 504 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 505 | CURRENT_PROJECT_VERSION = 1; 506 | DEFINES_MODULE = YES; 507 | DYLIB_COMPATIBILITY_VERSION = 1; 508 | DYLIB_CURRENT_VERSION = 1; 509 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 510 | INFOPLIST_FILE = "Target Support Files/Pods-Demo/Info.plist"; 511 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 512 | IPHONEOS_DEPLOYMENT_TARGET = 11.1; 513 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 514 | MACH_O_TYPE = staticlib; 515 | MODULEMAP_FILE = "Target Support Files/Pods-Demo/Pods-Demo.modulemap"; 516 | OTHER_LDFLAGS = ""; 517 | OTHER_LIBTOOLFLAGS = ""; 518 | PODS_ROOT = "$(SRCROOT)"; 519 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 520 | PRODUCT_NAME = Pods_Demo; 521 | SDKROOT = iphoneos; 522 | SKIP_INSTALL = YES; 523 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 524 | TARGETED_DEVICE_FAMILY = "1,2"; 525 | VALIDATE_PRODUCT = YES; 526 | VERSIONING_SYSTEM = "apple-generic"; 527 | VERSION_INFO_PREFIX = ""; 528 | }; 529 | name = Release; 530 | }; 531 | /* End XCBuildConfiguration section */ 532 | 533 | /* Begin XCConfigurationList section */ 534 | 2791A16D2862E2F6599BF538B10BF786 /* Build configuration list for PBXNativeTarget "Caliber" */ = { 535 | isa = XCConfigurationList; 536 | buildConfigurations = ( 537 | A773EBA47A588CA7E749368718424610 /* Debug */, 538 | 8EB1BE36BD75D7DF4F43A9C153B8E72C /* Release */, 539 | ); 540 | defaultConfigurationIsVisible = 0; 541 | defaultConfigurationName = Release; 542 | }; 543 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 544 | isa = XCConfigurationList; 545 | buildConfigurations = ( 546 | 995C3A53DEAA96B47E756185345E180D /* Debug */, 547 | 1D23278938ADF334174C5BF2A4B6B1B8 /* Release */, 548 | ); 549 | defaultConfigurationIsVisible = 0; 550 | defaultConfigurationName = Release; 551 | }; 552 | 77FB5144D7D99A098D7F1D185AAE9716 /* Build configuration list for PBXNativeTarget "Pods-Demo" */ = { 553 | isa = XCConfigurationList; 554 | buildConfigurations = ( 555 | 08B28679312CF06EAC658D35A5105BFB /* Debug */, 556 | C624CFF80339AB84A95A3C5934054D01 /* Release */, 557 | ); 558 | defaultConfigurationIsVisible = 0; 559 | defaultConfigurationName = Release; 560 | }; 561 | /* End XCConfigurationList section */ 562 | }; 563 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 564 | } 565 | -------------------------------------------------------------------------------- /Demo/Pods/Pods.xcodeproj/xcuserdata/paolocuscela.xcuserdatad/xcschemes/Caliber.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Demo/Pods/Pods.xcodeproj/xcuserdata/paolocuscela.xcuserdatad/xcschemes/Pods-Demo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 47 | 48 | 54 | 55 | 56 | 57 | 58 | 59 | 65 | 66 | 68 | 69 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /Demo/Pods/Pods.xcodeproj/xcuserdata/paolocuscela.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Caliber.xcscheme 8 | 9 | isShown 10 | 11 | orderHint 12 | 0 13 | 14 | Pods-Demo.xcscheme 15 | 16 | isShown 17 | 18 | orderHint 19 | 1 20 | 21 | 22 | SuppressBuildableAutocreation 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Caliber/Caliber-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Caliber : NSObject 3 | @end 4 | @implementation PodsDummy_Caliber 5 | @end 6 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Caliber/Caliber-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 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Caliber/Caliber-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 CaliberVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char CaliberVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Caliber/Caliber.modulemap: -------------------------------------------------------------------------------- 1 | framework module Caliber { 2 | umbrella header "Caliber-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Caliber/Caliber.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Caliber 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_LDFLAGS = -framework "UIKit" 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Caliber/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 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 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-Demo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 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 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-Demo/Pods-Demo-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-Demo/Pods-Demo-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 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-Demo/Pods-Demo-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Demo : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Demo 5 | @end 6 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-Demo/Pods-Demo-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 10 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 11 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 12 | 13 | install_framework() 14 | { 15 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 16 | local source="${BUILT_PRODUCTS_DIR}/$1" 17 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 18 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 19 | elif [ -r "$1" ]; then 20 | local source="$1" 21 | fi 22 | 23 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 24 | 25 | if [ -L "${source}" ]; then 26 | echo "Symlinked..." 27 | source="$(readlink "${source}")" 28 | fi 29 | 30 | # Use filter instead of exclude so missing patterns don't throw errors. 31 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 32 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 33 | 34 | local basename 35 | basename="$(basename -s .framework "$1")" 36 | binary="${destination}/${basename}.framework/${basename}" 37 | if ! [ -r "$binary" ]; then 38 | binary="${destination}/${basename}" 39 | fi 40 | 41 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 42 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 43 | strip_invalid_archs "$binary" 44 | fi 45 | 46 | # Resign the code if required by the build settings to avoid unstable apps 47 | code_sign_if_enabled "${destination}/$(basename "$1")" 48 | 49 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 50 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 51 | local swift_runtime_libs 52 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 53 | for lib in $swift_runtime_libs; do 54 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 55 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 56 | code_sign_if_enabled "${destination}/${lib}" 57 | done 58 | fi 59 | } 60 | 61 | # Copies the dSYM of a vendored framework 62 | install_dsym() { 63 | local source="$1" 64 | if [ -r "$source" ]; then 65 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\"" 66 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}" 67 | fi 68 | } 69 | 70 | # Signs a framework with the provided identity 71 | code_sign_if_enabled() { 72 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 73 | # Use the current code_sign_identitiy 74 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 75 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 76 | 77 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 78 | code_sign_cmd="$code_sign_cmd &" 79 | fi 80 | echo "$code_sign_cmd" 81 | eval "$code_sign_cmd" 82 | fi 83 | } 84 | 85 | # Strip invalid architectures 86 | strip_invalid_archs() { 87 | binary="$1" 88 | # Get architectures for current file 89 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 90 | stripped="" 91 | for arch in $archs; do 92 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 93 | # Strip non-valid architectures in-place 94 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 95 | stripped="$stripped $arch" 96 | fi 97 | done 98 | if [[ "$stripped" ]]; then 99 | echo "Stripped $binary of architectures:$stripped" 100 | fi 101 | } 102 | 103 | 104 | if [[ "$CONFIGURATION" == "Debug" ]]; then 105 | install_framework "${BUILT_PRODUCTS_DIR}/Caliber/Caliber.framework" 106 | fi 107 | if [[ "$CONFIGURATION" == "Release" ]]; then 108 | install_framework "${BUILT_PRODUCTS_DIR}/Caliber/Caliber.framework" 109 | fi 110 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 111 | wait 112 | fi 113 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-Demo/Pods-Demo-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 12 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 13 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 14 | 15 | case "${TARGETED_DEVICE_FAMILY}" in 16 | 1,2) 17 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 18 | ;; 19 | 1) 20 | TARGET_DEVICE_ARGS="--target-device iphone" 21 | ;; 22 | 2) 23 | TARGET_DEVICE_ARGS="--target-device ipad" 24 | ;; 25 | 3) 26 | TARGET_DEVICE_ARGS="--target-device tv" 27 | ;; 28 | 4) 29 | TARGET_DEVICE_ARGS="--target-device watch" 30 | ;; 31 | *) 32 | TARGET_DEVICE_ARGS="--target-device mac" 33 | ;; 34 | esac 35 | 36 | install_resource() 37 | { 38 | if [[ "$1" = /* ]] ; then 39 | RESOURCE_PATH="$1" 40 | else 41 | RESOURCE_PATH="${PODS_ROOT}/$1" 42 | fi 43 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 44 | cat << EOM 45 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 46 | EOM 47 | exit 1 48 | fi 49 | case $RESOURCE_PATH in 50 | *.storyboard) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 53 | ;; 54 | *.xib) 55 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 56 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 57 | ;; 58 | *.framework) 59 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 60 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 61 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 62 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 63 | ;; 64 | *.xcdatamodel) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 67 | ;; 68 | *.xcdatamodeld) 69 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 70 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 71 | ;; 72 | *.xcmappingmodel) 73 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 74 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 75 | ;; 76 | *.xcassets) 77 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 78 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 79 | ;; 80 | *) 81 | echo "$RESOURCE_PATH" || true 82 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 83 | ;; 84 | esac 85 | } 86 | 87 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 89 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 90 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 91 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 92 | fi 93 | rm -f "$RESOURCES_TO_COPY" 94 | 95 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 96 | then 97 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 98 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 99 | while read line; do 100 | if [[ $line != "${PODS_ROOT}*" ]]; then 101 | XCASSET_FILES+=("$line") 102 | fi 103 | done <<<"$OTHER_XCASSETS" 104 | 105 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 106 | fi 107 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-Demo/Pods-Demo-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_DemoVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_DemoVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Caliber" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Caliber/Caliber.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "Caliber" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-Demo/Pods-Demo.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_Demo { 2 | umbrella header "Pods-Demo-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-Demo/Pods-Demo.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Caliber" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Caliber/Caliber.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "Caliber" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Images/Header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaoloCuscela/Caliber/5d8924aa33bf75a9b61212afa6d238902307cc1d/Images/Header.png -------------------------------------------------------------------------------- /Images/Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaoloCuscela/Caliber/5d8924aa33bf75a9b61212afa6d238902307cc1d/Images/Overview.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 PaoloCuscela 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | GitHub Stars 5 | 6 | Pod Version 8 | 9 | Platform 11 | 12 | License 14 |

15 | 16 | ![Overview](https://raw.githubusercontent.com/PaoloCuscela/Caliber/master/Images/Header.png) 17 | 18 |

Implementing autolayout constrains programmatically made dead simple.

19 | 20 | ## Getting Started 21 | 22 | ```swift 23 | import Caliber 24 | 25 | // Setup view and add to a superview. 26 | 27 | let aView = UIView() 28 | aView.backgroundColor = UIColor.red 29 | view.addSubview(aView) 30 | 31 | // Add Constraints 32 | 33 | aView.caliber .top(with: view, .top) 34 | .centerHorizontally(in: view) 35 | .width = 100 36 | 37 | aView.caliber.aspect = 16/9 38 | 39 | // That's All. 40 | ``` 41 | 42 | ## Overview 43 | 44 | ![GetStarted](https://raw.githubusercontent.com/PaoloCuscela/Caliber/master/Images/Overview.png) 45 | 46 | ## Prerequisites 47 | 48 | - **Xcode 9.0** or newer 49 | - **Swift 4.0** 50 | 51 | ## Installation 52 | 53 | ### CocoaPods 54 | ``` 55 | use_frameworks! 56 | pod 'Caliber' 57 | ``` 58 | ### Manual 59 | - **Download** the repo 60 | - ⌘C ⌘V the **Caliber.swift** file into your project 61 | - In your **Project's Info** go to '**Build Phases**' 62 | - Open '**Compile Sources**' and **add Caliber.swift** 63 | 64 | ## License 65 | 66 | Caliber is released under the [MIT License](LICENSE). 67 | --------------------------------------------------------------------------------