├── .gitignore ├── Examples ├── Example │ ├── Example.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ ├── Example.xcworkspace │ │ └── contents.xcworkspacedata │ ├── Example │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ └── Heart.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── heart.png │ │ │ │ ├── heart@2x.png │ │ │ │ └── heart@3x.png │ │ ├── Base.lproj │ │ │ └── LaunchScreen.storyboard │ │ ├── Info.plist │ │ ├── ViewController.swift │ │ └── snow.png │ ├── Podfile │ ├── Podfile.lock │ └── Pods │ │ ├── FluentLayout │ │ ├── FluentLayout │ │ │ ├── FluentLayout.h │ │ │ ├── Layout.swift │ │ │ ├── LayoutConstraints.swift │ │ │ ├── LayoutDefaultControlCreator.swift │ │ │ ├── LayoutDefaultControls.swift │ │ │ ├── LayoutDefaults.swift │ │ │ ├── LayoutExtensions.swift │ │ │ ├── LayoutOwner.swift │ │ │ ├── LayoutScrollable.swift │ │ │ ├── LayoutSection.swift │ │ │ └── LayoutViewController.swift │ │ ├── LICENSE │ │ └── README.md │ │ ├── Manifest.lock │ │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ │ └── Target Support Files │ │ ├── FluentLayout │ │ ├── FluentLayout-dummy.m │ │ ├── FluentLayout-prefix.pch │ │ ├── FluentLayout-umbrella.h │ │ ├── FluentLayout.modulemap │ │ ├── FluentLayout.xcconfig │ │ └── Info.plist │ │ └── Pods-Example │ │ ├── Info.plist │ │ ├── Pods-Example-acknowledgements.markdown │ │ ├── Pods-Example-acknowledgements.plist │ │ ├── Pods-Example-dummy.m │ │ ├── Pods-Example-frameworks.sh │ │ ├── Pods-Example-resources.sh │ │ ├── Pods-Example-umbrella.h │ │ ├── Pods-Example.debug.xcconfig │ │ ├── Pods-Example.modulemap │ │ └── Pods-Example.release.xcconfig ├── ExampleScreenShot.png └── ProfileHeader.png ├── FluentLayout.podspec ├── FluentLayout.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── FluentLayout ├── FluentLayout.h ├── Info.plist ├── Layout.swift ├── LayoutConstraints.swift ├── LayoutDefaultControlCreator.swift ├── LayoutDefaultControls.swift ├── LayoutDefaults.swift ├── LayoutExtensions.swift ├── LayoutOwner.swift ├── LayoutScrollable.swift ├── LayoutSection.swift └── LayoutViewController.swift ├── FluentLayoutTests ├── FluentLayoutTests.swift └── Info.plist ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | ## Playgrounds 31 | timeline.xctimeline 32 | playground.xcworkspace 33 | 34 | # Swift Package Manager 35 | # 36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 37 | # Packages/ 38 | .build/ 39 | 40 | # CocoaPods 41 | # 42 | # We recommend against adding the Pods directory to your .gitignore. However 43 | # you should judge for yourself, the pros and cons are mentioned at: 44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 45 | # 46 | # Pods/ 47 | 48 | # Carthage 49 | # 50 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 51 | # Carthage/Checkouts 52 | 53 | Carthage/Build 54 | 55 | # fastlane 56 | # 57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 58 | # screenshots whenever they are needed. 59 | # For more information about the recommended setup visit: 60 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 61 | 62 | fastlane/report.xml 63 | fastlane/Preview.html 64 | fastlane/screenshots 65 | fastlane/test_output 66 | -------------------------------------------------------------------------------- /Examples/Example/Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 447480A8741FDDCF0AE83655 /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90AD4EC32E9ED73FA0E84BA3 /* Pods_Example.framework */; }; 11 | F70DB8D71E873046009EC8B4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F70DB8D61E873046009EC8B4 /* AppDelegate.swift */; }; 12 | F70DB8D91E873046009EC8B4 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F70DB8D81E873046009EC8B4 /* ViewController.swift */; }; 13 | F70DB8DE1E873046009EC8B4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F70DB8DD1E873046009EC8B4 /* Assets.xcassets */; }; 14 | F70DB8E11E873046009EC8B4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F70DB8DF1E873046009EC8B4 /* LaunchScreen.storyboard */; }; 15 | F73902251E87313D005007A9 /* snow.png in Resources */ = {isa = PBXBuildFile; fileRef = F73902241E87313D005007A9 /* snow.png */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 90AD4EC32E9ED73FA0E84BA3 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 20 | 9524986C29FC15A74BA85885 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; }; 21 | 9BFA1E3C1D6C39464B1C47BF /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = ""; }; 22 | F70DB8D31E873046009EC8B4 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | F70DB8D61E873046009EC8B4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 24 | F70DB8D81E873046009EC8B4 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 25 | F70DB8DD1E873046009EC8B4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 26 | F70DB8E01E873046009EC8B4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 27 | F70DB8E21E873046009EC8B4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 28 | F73902241E87313D005007A9 /* snow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = snow.png; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | F70DB8D01E873046009EC8B4 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | 447480A8741FDDCF0AE83655 /* Pods_Example.framework in Frameworks */, 37 | ); 38 | runOnlyForDeploymentPostprocessing = 0; 39 | }; 40 | /* End PBXFrameworksBuildPhase section */ 41 | 42 | /* Begin PBXGroup section */ 43 | 0B58035AF03FE2CD013C192A /* Pods */ = { 44 | isa = PBXGroup; 45 | children = ( 46 | 9524986C29FC15A74BA85885 /* Pods-Example.debug.xcconfig */, 47 | 9BFA1E3C1D6C39464B1C47BF /* Pods-Example.release.xcconfig */, 48 | ); 49 | name = Pods; 50 | sourceTree = ""; 51 | }; 52 | CEF86FC3C7C6275054B91BBD /* Frameworks */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | 90AD4EC32E9ED73FA0E84BA3 /* Pods_Example.framework */, 56 | ); 57 | name = Frameworks; 58 | sourceTree = ""; 59 | }; 60 | F70DB8CA1E873046009EC8B4 = { 61 | isa = PBXGroup; 62 | children = ( 63 | F70DB8D51E873046009EC8B4 /* Example */, 64 | F70DB8D41E873046009EC8B4 /* Products */, 65 | 0B58035AF03FE2CD013C192A /* Pods */, 66 | CEF86FC3C7C6275054B91BBD /* Frameworks */, 67 | ); 68 | sourceTree = ""; 69 | }; 70 | F70DB8D41E873046009EC8B4 /* Products */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | F70DB8D31E873046009EC8B4 /* Example.app */, 74 | ); 75 | name = Products; 76 | sourceTree = ""; 77 | }; 78 | F70DB8D51E873046009EC8B4 /* Example */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | F70DB8D61E873046009EC8B4 /* AppDelegate.swift */, 82 | F70DB8D81E873046009EC8B4 /* ViewController.swift */, 83 | F70DB8DD1E873046009EC8B4 /* Assets.xcassets */, 84 | F73902241E87313D005007A9 /* snow.png */, 85 | F70DB8DF1E873046009EC8B4 /* LaunchScreen.storyboard */, 86 | F70DB8E21E873046009EC8B4 /* Info.plist */, 87 | ); 88 | path = Example; 89 | sourceTree = ""; 90 | }; 91 | /* End PBXGroup section */ 92 | 93 | /* Begin PBXNativeTarget section */ 94 | F70DB8D21E873046009EC8B4 /* Example */ = { 95 | isa = PBXNativeTarget; 96 | buildConfigurationList = F70DB8E51E873046009EC8B4 /* Build configuration list for PBXNativeTarget "Example" */; 97 | buildPhases = ( 98 | 427F668AF3A7AE3F7400EC24 /* [CP] Check Pods Manifest.lock */, 99 | F70DB8CF1E873046009EC8B4 /* Sources */, 100 | F70DB8D01E873046009EC8B4 /* Frameworks */, 101 | F70DB8D11E873046009EC8B4 /* Resources */, 102 | 04542C0D7520C89D4DA1A3F9 /* [CP] Embed Pods Frameworks */, 103 | 2C8459919C379B7E1C640A55 /* [CP] Copy Pods Resources */, 104 | ); 105 | buildRules = ( 106 | ); 107 | dependencies = ( 108 | ); 109 | name = Example; 110 | productName = Example; 111 | productReference = F70DB8D31E873046009EC8B4 /* Example.app */; 112 | productType = "com.apple.product-type.application"; 113 | }; 114 | /* End PBXNativeTarget section */ 115 | 116 | /* Begin PBXProject section */ 117 | F70DB8CB1E873046009EC8B4 /* Project object */ = { 118 | isa = PBXProject; 119 | attributes = { 120 | LastSwiftUpdateCheck = 0820; 121 | LastUpgradeCheck = 0820; 122 | ORGANIZATIONNAME = weswickwire; 123 | TargetAttributes = { 124 | F70DB8D21E873046009EC8B4 = { 125 | CreatedOnToolsVersion = 8.2.1; 126 | DevelopmentTeam = HSE59E2Q5U; 127 | ProvisioningStyle = Automatic; 128 | }; 129 | }; 130 | }; 131 | buildConfigurationList = F70DB8CE1E873046009EC8B4 /* Build configuration list for PBXProject "Example" */; 132 | compatibilityVersion = "Xcode 3.2"; 133 | developmentRegion = English; 134 | hasScannedForEncodings = 0; 135 | knownRegions = ( 136 | en, 137 | Base, 138 | ); 139 | mainGroup = F70DB8CA1E873046009EC8B4; 140 | productRefGroup = F70DB8D41E873046009EC8B4 /* Products */; 141 | projectDirPath = ""; 142 | projectRoot = ""; 143 | targets = ( 144 | F70DB8D21E873046009EC8B4 /* Example */, 145 | ); 146 | }; 147 | /* End PBXProject section */ 148 | 149 | /* Begin PBXResourcesBuildPhase section */ 150 | F70DB8D11E873046009EC8B4 /* Resources */ = { 151 | isa = PBXResourcesBuildPhase; 152 | buildActionMask = 2147483647; 153 | files = ( 154 | F70DB8E11E873046009EC8B4 /* LaunchScreen.storyboard in Resources */, 155 | F70DB8DE1E873046009EC8B4 /* Assets.xcassets in Resources */, 156 | F73902251E87313D005007A9 /* snow.png in Resources */, 157 | ); 158 | runOnlyForDeploymentPostprocessing = 0; 159 | }; 160 | /* End PBXResourcesBuildPhase section */ 161 | 162 | /* Begin PBXShellScriptBuildPhase section */ 163 | 04542C0D7520C89D4DA1A3F9 /* [CP] Embed Pods Frameworks */ = { 164 | isa = PBXShellScriptBuildPhase; 165 | buildActionMask = 2147483647; 166 | files = ( 167 | ); 168 | inputPaths = ( 169 | ); 170 | name = "[CP] Embed Pods Frameworks"; 171 | outputPaths = ( 172 | ); 173 | runOnlyForDeploymentPostprocessing = 0; 174 | shellPath = /bin/sh; 175 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n"; 176 | showEnvVarsInLog = 0; 177 | }; 178 | 2C8459919C379B7E1C640A55 /* [CP] Copy Pods Resources */ = { 179 | isa = PBXShellScriptBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | ); 183 | inputPaths = ( 184 | ); 185 | name = "[CP] Copy Pods Resources"; 186 | outputPaths = ( 187 | ); 188 | runOnlyForDeploymentPostprocessing = 0; 189 | shellPath = /bin/sh; 190 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh\"\n"; 191 | showEnvVarsInLog = 0; 192 | }; 193 | 427F668AF3A7AE3F7400EC24 /* [CP] Check Pods Manifest.lock */ = { 194 | isa = PBXShellScriptBuildPhase; 195 | buildActionMask = 2147483647; 196 | files = ( 197 | ); 198 | inputPaths = ( 199 | ); 200 | name = "[CP] Check Pods Manifest.lock"; 201 | outputPaths = ( 202 | ); 203 | runOnlyForDeploymentPostprocessing = 0; 204 | shellPath = /bin/sh; 205 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 206 | showEnvVarsInLog = 0; 207 | }; 208 | /* End PBXShellScriptBuildPhase section */ 209 | 210 | /* Begin PBXSourcesBuildPhase section */ 211 | F70DB8CF1E873046009EC8B4 /* Sources */ = { 212 | isa = PBXSourcesBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | F70DB8D91E873046009EC8B4 /* ViewController.swift in Sources */, 216 | F70DB8D71E873046009EC8B4 /* AppDelegate.swift in Sources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXSourcesBuildPhase section */ 221 | 222 | /* Begin PBXVariantGroup section */ 223 | F70DB8DF1E873046009EC8B4 /* LaunchScreen.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | F70DB8E01E873046009EC8B4 /* Base */, 227 | ); 228 | name = LaunchScreen.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | F70DB8E31E873046009EC8B4 /* Debug */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_WARN_BOOL_CONVERSION = YES; 244 | CLANG_WARN_CONSTANT_CONVERSION = YES; 245 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 246 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 247 | CLANG_WARN_EMPTY_BODY = YES; 248 | CLANG_WARN_ENUM_CONVERSION = YES; 249 | CLANG_WARN_INFINITE_RECURSION = YES; 250 | CLANG_WARN_INT_CONVERSION = YES; 251 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 252 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 253 | CLANG_WARN_UNREACHABLE_CODE = YES; 254 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 255 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 256 | COPY_PHASE_STRIP = NO; 257 | DEBUG_INFORMATION_FORMAT = dwarf; 258 | ENABLE_STRICT_OBJC_MSGSEND = YES; 259 | ENABLE_TESTABILITY = YES; 260 | GCC_C_LANGUAGE_STANDARD = gnu99; 261 | GCC_DYNAMIC_NO_PIC = NO; 262 | GCC_NO_COMMON_BLOCKS = YES; 263 | GCC_OPTIMIZATION_LEVEL = 0; 264 | GCC_PREPROCESSOR_DEFINITIONS = ( 265 | "DEBUG=1", 266 | "$(inherited)", 267 | ); 268 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 269 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 270 | GCC_WARN_UNDECLARED_SELECTOR = YES; 271 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 272 | GCC_WARN_UNUSED_FUNCTION = YES; 273 | GCC_WARN_UNUSED_VARIABLE = YES; 274 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 275 | MTL_ENABLE_DEBUG_INFO = YES; 276 | ONLY_ACTIVE_ARCH = YES; 277 | SDKROOT = iphoneos; 278 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 279 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 280 | TARGETED_DEVICE_FAMILY = "1,2"; 281 | }; 282 | name = Debug; 283 | }; 284 | F70DB8E41E873046009EC8B4 /* Release */ = { 285 | isa = XCBuildConfiguration; 286 | buildSettings = { 287 | ALWAYS_SEARCH_USER_PATHS = NO; 288 | CLANG_ANALYZER_NONNULL = YES; 289 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 290 | CLANG_CXX_LIBRARY = "libc++"; 291 | CLANG_ENABLE_MODULES = YES; 292 | CLANG_ENABLE_OBJC_ARC = YES; 293 | CLANG_WARN_BOOL_CONVERSION = YES; 294 | CLANG_WARN_CONSTANT_CONVERSION = YES; 295 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 296 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 297 | CLANG_WARN_EMPTY_BODY = YES; 298 | CLANG_WARN_ENUM_CONVERSION = YES; 299 | CLANG_WARN_INFINITE_RECURSION = YES; 300 | CLANG_WARN_INT_CONVERSION = YES; 301 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 302 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 303 | CLANG_WARN_UNREACHABLE_CODE = YES; 304 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 305 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 306 | COPY_PHASE_STRIP = NO; 307 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 308 | ENABLE_NS_ASSERTIONS = NO; 309 | ENABLE_STRICT_OBJC_MSGSEND = YES; 310 | GCC_C_LANGUAGE_STANDARD = gnu99; 311 | GCC_NO_COMMON_BLOCKS = YES; 312 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 313 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 314 | GCC_WARN_UNDECLARED_SELECTOR = YES; 315 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 316 | GCC_WARN_UNUSED_FUNCTION = YES; 317 | GCC_WARN_UNUSED_VARIABLE = YES; 318 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 319 | MTL_ENABLE_DEBUG_INFO = NO; 320 | SDKROOT = iphoneos; 321 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 322 | TARGETED_DEVICE_FAMILY = "1,2"; 323 | VALIDATE_PRODUCT = YES; 324 | }; 325 | name = Release; 326 | }; 327 | F70DB8E61E873046009EC8B4 /* Debug */ = { 328 | isa = XCBuildConfiguration; 329 | baseConfigurationReference = 9524986C29FC15A74BA85885 /* Pods-Example.debug.xcconfig */; 330 | buildSettings = { 331 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 332 | DEVELOPMENT_TEAM = HSE59E2Q5U; 333 | INFOPLIST_FILE = Example/Info.plist; 334 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 335 | PRODUCT_BUNDLE_IDENTIFIER = com.weswickwire.Example; 336 | PRODUCT_NAME = "$(TARGET_NAME)"; 337 | SWIFT_VERSION = 3.0; 338 | }; 339 | name = Debug; 340 | }; 341 | F70DB8E71E873046009EC8B4 /* Release */ = { 342 | isa = XCBuildConfiguration; 343 | baseConfigurationReference = 9BFA1E3C1D6C39464B1C47BF /* Pods-Example.release.xcconfig */; 344 | buildSettings = { 345 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 346 | DEVELOPMENT_TEAM = HSE59E2Q5U; 347 | INFOPLIST_FILE = Example/Info.plist; 348 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 349 | PRODUCT_BUNDLE_IDENTIFIER = com.weswickwire.Example; 350 | PRODUCT_NAME = "$(TARGET_NAME)"; 351 | SWIFT_VERSION = 3.0; 352 | }; 353 | name = Release; 354 | }; 355 | /* End XCBuildConfiguration section */ 356 | 357 | /* Begin XCConfigurationList section */ 358 | F70DB8CE1E873046009EC8B4 /* Build configuration list for PBXProject "Example" */ = { 359 | isa = XCConfigurationList; 360 | buildConfigurations = ( 361 | F70DB8E31E873046009EC8B4 /* Debug */, 362 | F70DB8E41E873046009EC8B4 /* Release */, 363 | ); 364 | defaultConfigurationIsVisible = 0; 365 | defaultConfigurationName = Release; 366 | }; 367 | F70DB8E51E873046009EC8B4 /* Build configuration list for PBXNativeTarget "Example" */ = { 368 | isa = XCConfigurationList; 369 | buildConfigurations = ( 370 | F70DB8E61E873046009EC8B4 /* Debug */, 371 | F70DB8E71E873046009EC8B4 /* Release */, 372 | ); 373 | defaultConfigurationIsVisible = 0; 374 | defaultConfigurationName = Release; 375 | }; 376 | /* End XCConfigurationList section */ 377 | }; 378 | rootObject = F70DB8CB1E873046009EC8B4 /* Project object */; 379 | } 380 | -------------------------------------------------------------------------------- /Examples/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/Example/Example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Examples/Example/Example/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Example 4 | // 5 | // Created by Wes on 3/25/17. 6 | // Copyright © 2017 weswickwire. 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 | 20 | window = UIWindow() 21 | 22 | let vc = ViewController() 23 | 24 | let nav = UINavigationController(rootViewController: vc) 25 | 26 | window!.rootViewController = nav 27 | 28 | window?.makeKeyAndVisible() 29 | 30 | return true 31 | } 32 | 33 | func applicationWillResignActive(_ application: UIApplication) { 34 | // 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. 35 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 36 | } 37 | 38 | func applicationDidEnterBackground(_ application: UIApplication) { 39 | // 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. 40 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 41 | } 42 | 43 | func applicationWillEnterForeground(_ application: UIApplication) { 44 | // 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. 45 | } 46 | 47 | func applicationDidBecomeActive(_ application: UIApplication) { 48 | // 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. 49 | } 50 | 51 | func applicationWillTerminate(_ application: UIApplication) { 52 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /Examples/Example/Example/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 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /Examples/Example/Example/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/Example/Example/Assets.xcassets/Heart.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "heart.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "heart@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "heart@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Examples/Example/Example/Assets.xcassets/Heart.imageset/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wickwirew/FluentLayout/27efbe76d89b2a65352fd554d483ab63d7bb3624/Examples/Example/Example/Assets.xcassets/Heart.imageset/heart.png -------------------------------------------------------------------------------- /Examples/Example/Example/Assets.xcassets/Heart.imageset/heart@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wickwirew/FluentLayout/27efbe76d89b2a65352fd554d483ab63d7bb3624/Examples/Example/Example/Assets.xcassets/Heart.imageset/heart@2x.png -------------------------------------------------------------------------------- /Examples/Example/Example/Assets.xcassets/Heart.imageset/heart@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wickwirew/FluentLayout/27efbe76d89b2a65352fd554d483ab63d7bb3624/Examples/Example/Example/Assets.xcassets/Heart.imageset/heart@3x.png -------------------------------------------------------------------------------- /Examples/Example/Example/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 | 27 | 28 | -------------------------------------------------------------------------------- /Examples/Example/Example/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 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIRequiredDeviceCapabilities 26 | 27 | armv7 28 | 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Examples/Example/Example/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Example 4 | // 5 | // Created by Wes on 3/25/17. 6 | // Copyright © 2017 weswickwire. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import FluentLayout 11 | 12 | class ViewController: LayoutViewController { 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | title = "Fluent Layout" 17 | 18 | let heartButton = UIButton() 19 | heartButton.setImage(UIImage(named: "Heart"), for: .normal) 20 | heartButton.imageView?.contentMode = .center 21 | 22 | let createdTime = UILabel() 23 | createdTime.text = "Posted 2 hrs ago" 24 | createdTime.textColor = .lightGray 25 | createdTime.font = UIFont.systemFont(ofSize: 13, weight: UIFontWeightLight) 26 | 27 | let loremIpsum = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate." 28 | 29 | layout.create(spacing: 12) { 30 | 31 | // Top Title 32 | $0.addSection(title: "Lorem Ipsum") 33 | 34 | // Main Image, keep ratio of image 35 | $0.addImage(named: "snow.png").pinImageAspectRatio() 36 | 37 | // This section holds post information 38 | $0.addSection { 39 | 40 | // Group to contain the title, time stamp and heart 41 | $0.addStack(alignment: .center, spacing: 0) { 42 | 43 | // Title and time stamp should be on top of each other 44 | $0.addStack(axis: .vertical, spacing: 0) { 45 | $0.addTitleLabel(text: "Neque Porro Quisquam") 46 | 47 | // Add custom label 48 | $0.add(view: createdTime) 49 | } 50 | 51 | // Add heart button but pin width to 44 52 | $0.add(view: heartButton).pin(width: 44) 53 | } 54 | 55 | // add post body 56 | $0.addLabel(text: loremIpsum) 57 | } 58 | } 59 | } 60 | 61 | override func didReceiveMemoryWarning() { 62 | super.didReceiveMemoryWarning() 63 | // Dispose of any resources that can be recreated. 64 | } 65 | 66 | 67 | } 68 | 69 | -------------------------------------------------------------------------------- /Examples/Example/Example/snow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wickwirew/FluentLayout/27efbe76d89b2a65352fd554d483ab63d7bb3624/Examples/Example/Example/snow.png -------------------------------------------------------------------------------- /Examples/Example/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'Example' 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 Example 9 | pod 'FluentLayout' 10 | end 11 | -------------------------------------------------------------------------------- /Examples/Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FluentLayout (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - FluentLayout 6 | 7 | SPEC CHECKSUMS: 8 | FluentLayout: 0786cc473287853719eadcb6abc5df17ea13190d 9 | 10 | PODFILE CHECKSUM: a6c1ea7fb238274c8c81793591ec499d2e691491 11 | 12 | COCOAPODS: 1.1.0 13 | -------------------------------------------------------------------------------- /Examples/Example/Pods/FluentLayout/FluentLayout/FluentLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // FluentLayout.h 3 | // FluentLayout 4 | // 5 | // Created by Wes on 3/25/17. 6 | // Copyright © 2017 weswickwire. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for FluentLayout. 12 | FOUNDATION_EXPORT double FluentLayoutVersionNumber; 13 | 14 | //! Project version string for FluentLayout. 15 | FOUNDATION_EXPORT const unsigned char FluentLayoutVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Examples/Example/Pods/FluentLayout/FluentLayout/Layout.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | 5 | open class Layout: UIStackView { 6 | 7 | public init() { 8 | super.init(frame: .zero) 9 | initializeView() 10 | } 11 | 12 | public override init(frame: CGRect) { 13 | super.init(frame: frame) 14 | } 15 | 16 | public required init(coder: NSCoder) { 17 | fatalError("init(coder:) has not been implemented") 18 | } 19 | 20 | internal func initializeView() { 21 | 22 | axis = .vertical 23 | alignment = .fill 24 | distribution = .fill 25 | spacing = LayoutDefaults.spacing 26 | } 27 | 28 | 29 | // Serves no other purpose as a syntax helper 30 | public func create(axis: UILayoutConstraintAxis = .vertical, alignment: UIStackViewAlignment = .fill, distribution: UIStackViewDistribution = .fill, spacing: CGFloat = LayoutDefaults.spacing, create: ((Layout) -> Void)?) { 31 | 32 | self.axis = axis 33 | self.alignment = alignment 34 | self.distribution = distribution 35 | self.spacing = spacing 36 | 37 | if let c = create { 38 | c(self) 39 | } 40 | } 41 | 42 | 43 | 44 | // MARK: Sections 45 | 46 | public func addSection(title: String? = nil, axis: UILayoutConstraintAxis = .vertical, alignment: UIStackViewAlignment = .fill, distribution: UIStackViewDistribution = .fill, spacing: CGFloat = LayoutDefaults.sectionSpacing, create: ((LayoutSection) -> Void)? = nil) { 47 | 48 | let section = LayoutSection() 49 | section.layout.axis = axis 50 | section.layout.alignment = alignment 51 | section.layout.distribution = distribution 52 | section.layout.spacing = spacing 53 | 54 | if let t = title { 55 | section.addTitleLabel(text: t) 56 | } 57 | 58 | if let c = create { 59 | c(section) 60 | } 61 | 62 | addArrangedSubview(section) 63 | } 64 | 65 | 66 | 67 | 68 | // MARK: UI Components 69 | 70 | @discardableResult 71 | public func add(view: TView) -> TView { 72 | 73 | addArrangedSubview(view) 74 | return view 75 | } 76 | 77 | @discardableResult 78 | public func addLabel(text: String) -> UILabel { 79 | 80 | let label = LayoutDefaults.defaultControls.createLabel() 81 | label.text = text 82 | addArrangedSubview(label) 83 | return label 84 | } 85 | 86 | @discardableResult 87 | public func addTitleLabel(text: String) -> UILabel { 88 | 89 | let label = LayoutDefaults.defaultControls.createTitleLabel() 90 | label.text = text 91 | return add(view: label) 92 | } 93 | 94 | @discardableResult 95 | public func addTextField(text: String? = nil, placeholder: String? = nil) -> UITextField { 96 | 97 | let field = LayoutDefaults.defaultControls.createTextField() 98 | field.text = text 99 | field.placeholder = placeholder 100 | return add(view: field) 101 | } 102 | 103 | @discardableResult 104 | public func addButton(title: String? = nil, image: String? = nil) -> UIButton { 105 | 106 | let button = LayoutDefaults.defaultControls.createButton() 107 | 108 | if let t = title { 109 | button.setTitle(t, for: .normal) 110 | } 111 | 112 | if let i = image { 113 | button.setImage(UIImage(named: i), for: .normal) 114 | } 115 | 116 | return add(view: button) 117 | } 118 | 119 | @discardableResult 120 | public func addImage(named: String? = nil, contentMode: UIViewContentMode = .scaleAspectFit) -> UIImageView { 121 | 122 | let image = LayoutDefaults.defaultControls.createImage() 123 | image.contentMode = contentMode 124 | add(view: image) 125 | 126 | if let i = named { 127 | image.image = UIImage(named: i) 128 | } 129 | 130 | return image 131 | } 132 | 133 | @discardableResult 134 | public func addTextView() -> UITextView { 135 | 136 | let text = LayoutDefaults.defaultControls.createTextView() 137 | return add(view: text) 138 | } 139 | 140 | @discardableResult 141 | public func addFelxibleSpacing() -> UIView { 142 | 143 | let spacing = UIView() 144 | spacing.clipsToBounds = true 145 | spacing.backgroundColor = .clear 146 | spacing.setContentCompressionResistancePriority(1, for: .horizontal) 147 | spacing.setContentCompressionResistancePriority(1, for: .vertical) 148 | return add(view: spacing) 149 | } 150 | 151 | 152 | 153 | 154 | // MARK: Stacks 155 | 156 | @discardableResult 157 | public func addStack(axis: UILayoutConstraintAxis = .horizontal, alignment: UIStackViewAlignment = .fill, distribution: UIStackViewDistribution = .fill, spacing: CGFloat = LayoutDefaults.spacing, create: ((Layout) -> Void)?) -> Layout { 158 | 159 | let group = Layout() 160 | group.axis = axis 161 | group.alignment = alignment 162 | group.distribution = distribution 163 | group.spacing = spacing 164 | add(view: group) 165 | 166 | if let c = create { 167 | c(group) 168 | } 169 | 170 | return group 171 | } 172 | } 173 | -------------------------------------------------------------------------------- /Examples/Example/Pods/FluentLayout/FluentLayout/LayoutConstraints.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | 5 | public extension UIView { 6 | 7 | // MARK: Autolayout Extensions 8 | 9 | @discardableResult 10 | func pinToSuperview(top: CGFloat? = nil, bottom: CGFloat? = nil, left: CGFloat? = nil, right: CGFloat? = nil) -> UIView { 11 | 12 | if (self.superview == nil) { 13 | return self 14 | } 15 | 16 | self.translatesAutoresizingMaskIntoConstraints = false 17 | 18 | if let constant = top { 19 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 20 | attribute: .top, 21 | relatedBy: .equal, 22 | toItem: self.superview, 23 | attribute: .top, 24 | multiplier: 1, 25 | constant: constant)) 26 | } 27 | 28 | if let constant = bottom { 29 | self.superview!.addConstraint(NSLayoutConstraint(item: self.superview, 30 | attribute: .bottom, 31 | relatedBy: .equal, 32 | toItem: self, 33 | attribute: .bottom, 34 | multiplier: 1, 35 | constant: constant)) 36 | } 37 | 38 | if let constant = left { 39 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 40 | attribute: .left, 41 | relatedBy: .equal, 42 | toItem: self.superview, 43 | attribute: .left, 44 | multiplier: 1, 45 | constant: constant)) 46 | } 47 | 48 | if let constant = right { 49 | self.superview!.addConstraint(NSLayoutConstraint(item: self.superview, 50 | attribute: .right, 51 | relatedBy: .equal, 52 | toItem: self, 53 | attribute: .right, 54 | multiplier: 1, 55 | constant: constant)) 56 | } 57 | 58 | return self 59 | } 60 | 61 | @discardableResult 62 | func equalWidthTo(view: UIView) -> UIView { 63 | 64 | self.translatesAutoresizingMaskIntoConstraints = false 65 | 66 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 67 | attribute: .width, 68 | relatedBy: .equal, 69 | toItem: view, 70 | attribute: .width, 71 | multiplier: 1, 72 | constant: 0)) 73 | 74 | return self 75 | } 76 | 77 | @discardableResult 78 | func equalHeightTo(view: UIView) -> UIView { 79 | 80 | self.translatesAutoresizingMaskIntoConstraints = false 81 | 82 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 83 | attribute: .height, 84 | relatedBy: .equal, 85 | toItem: view, 86 | attribute: .height, 87 | multiplier: 1, 88 | constant: 0)) 89 | 90 | return self 91 | } 92 | 93 | @discardableResult 94 | func pin(aspectRatio: CGFloat) -> UIView { 95 | 96 | self.translatesAutoresizingMaskIntoConstraints = false 97 | 98 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 99 | attribute: .height, 100 | relatedBy: .equal, 101 | toItem: self, 102 | attribute: .width, 103 | multiplier: aspectRatio, 104 | constant: 0)) 105 | 106 | return self 107 | } 108 | 109 | @discardableResult 110 | func pin(size: CGSize) -> UIView { 111 | 112 | self.pin(width: size.width) 113 | self.pin(height: size.height) 114 | return self 115 | } 116 | 117 | @discardableResult 118 | func pin(width: CGFloat) -> UIView { 119 | 120 | self.translatesAutoresizingMaskIntoConstraints = false 121 | 122 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 123 | attribute: .width, 124 | relatedBy: .equal, 125 | toItem: nil, 126 | attribute: .notAnAttribute, 127 | multiplier: 1, 128 | constant: width)) 129 | 130 | return self 131 | } 132 | 133 | @discardableResult 134 | func pin(height: CGFloat) -> UIView { 135 | 136 | self.translatesAutoresizingMaskIntoConstraints = false 137 | 138 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 139 | attribute: .height, 140 | relatedBy: .equal, 141 | toItem: nil, 142 | attribute: .notAnAttribute, 143 | multiplier: 1, 144 | constant: height)) 145 | 146 | return self 147 | } 148 | 149 | @discardableResult 150 | func pinToLeftOf(view: UIView, constant: CGFloat = 0) -> UIView { 151 | 152 | self.translatesAutoresizingMaskIntoConstraints = false 153 | 154 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 155 | attribute: .right, 156 | relatedBy: .equal, 157 | toItem: view, 158 | attribute: .left, 159 | multiplier: 1, 160 | constant: constant)) 161 | 162 | return self 163 | } 164 | 165 | @discardableResult 166 | func pinToRightOf(view: UIView, constant: CGFloat = 0) -> UIView { 167 | 168 | self.translatesAutoresizingMaskIntoConstraints = false 169 | 170 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 171 | attribute: .left, 172 | relatedBy: .equal, 173 | toItem: view, 174 | attribute: .right, 175 | multiplier: 1, 176 | constant: constant)) 177 | 178 | return self 179 | } 180 | 181 | @discardableResult 182 | func pinAbove(view: UIView, constant: CGFloat = 0) -> UIView { 183 | 184 | self.translatesAutoresizingMaskIntoConstraints = false 185 | 186 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 187 | attribute: .bottom, 188 | relatedBy: .equal, 189 | toItem: view, 190 | attribute: .top, 191 | multiplier: 1, 192 | constant: constant)) 193 | 194 | return self 195 | } 196 | 197 | @discardableResult 198 | func pinBelow(view: UIView, constant: CGFloat = 0) -> UIView { 199 | 200 | self.translatesAutoresizingMaskIntoConstraints = false 201 | 202 | self.superview!.addConstraint(NSLayoutConstraint(item: view, 203 | attribute: .bottom, 204 | relatedBy: .equal, 205 | toItem: self, 206 | attribute: .top, 207 | multiplier: 1, 208 | constant: constant)) 209 | 210 | return self 211 | } 212 | 213 | @discardableResult 214 | func alignCenterXTo(view: UIView, constant: CGFloat = 0) -> UIView { 215 | 216 | self.translatesAutoresizingMaskIntoConstraints = false 217 | 218 | self.superview!.addConstraint(NSLayoutConstraint(item: view, 219 | attribute: .centerX, 220 | relatedBy: .equal, 221 | toItem: self, 222 | attribute: .centerX, 223 | multiplier: 1, 224 | constant: constant)) 225 | 226 | return self 227 | } 228 | 229 | @discardableResult 230 | func alignCenterYTo(view: UIView, constant: CGFloat = 0) -> UIView { 231 | 232 | self.translatesAutoresizingMaskIntoConstraints = false 233 | 234 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 235 | attribute: .centerY, 236 | relatedBy: .equal, 237 | toItem: view, 238 | attribute: .centerY, 239 | multiplier: 1, 240 | constant: constant)) 241 | 242 | return self 243 | } 244 | 245 | @discardableResult 246 | func align(_ selfAttribute: NSLayoutAttribute, toView: UIView, attribute: NSLayoutAttribute) -> UIView { 247 | 248 | self.translatesAutoresizingMaskIntoConstraints = false 249 | 250 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 251 | attribute: selfAttribute, 252 | relatedBy: .equal, 253 | toItem: toView, 254 | attribute: attribute, 255 | multiplier: 1, 256 | constant: 0)) 257 | 258 | return self 259 | } 260 | 261 | @discardableResult 262 | func alignCenterTo(view: UIView) -> UIView { 263 | self.alignCenterXTo(view: view) 264 | self.alignCenterYTo(view: view) 265 | return self 266 | } 267 | 268 | 269 | // MARK: UIView property extensions 270 | 271 | @discardableResult 272 | func setCompressionResistance(horizontal: Float? = nil, vertical: Float? = nil) -> UIView { 273 | 274 | if let h = horizontal { 275 | self.setContentCompressionResistancePriority(h, for: .horizontal) 276 | } 277 | 278 | if let v = vertical { 279 | self.setContentCompressionResistancePriority(v, for: .vertical) 280 | } 281 | 282 | return self 283 | } 284 | 285 | @discardableResult 286 | func setContentHugging(horizontal: Float? = nil, vertical: Float? = nil) -> UIView { 287 | 288 | if let h = horizontal { 289 | self.setContentHuggingPriority(h, for: .horizontal) 290 | } 291 | 292 | if let v = vertical { 293 | self.setContentHuggingPriority(v, for: .vertical) 294 | } 295 | 296 | return self 297 | } 298 | } 299 | 300 | 301 | 302 | public extension UIImageView { 303 | 304 | @discardableResult 305 | func pinImageAspectRatio() -> UIImageView { 306 | 307 | if (self.image != nil && self.image!.size.width != 0) { 308 | self.pin(aspectRatio: self.image!.size.height / self.image!.size.width) 309 | } 310 | 311 | return self 312 | } 313 | 314 | } 315 | -------------------------------------------------------------------------------- /Examples/Example/Pods/FluentLayout/FluentLayout/LayoutDefaultControlCreator.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | 5 | internal class LayoutDefaultControlCreator: LayoutDefaultControls { 6 | 7 | func createLabel() -> UILabel { 8 | let label = UILabel() 9 | label.font = UIFont.systemFont(ofSize: 15, weight: UIFontWeightLight) 10 | label.numberOfLines = 0 11 | label.lineBreakMode = .byCharWrapping 12 | return label 13 | } 14 | 15 | func createTitleLabel() -> UILabel { 16 | let label = UILabel() 17 | label.font = UIFont.systemFont(ofSize: 17, weight: UIFontWeightRegular) 18 | return label 19 | } 20 | 21 | func createTextField() -> UITextField { 22 | let textField = LayoutTextField() 23 | textField.backgroundColor = UIColor(colorLiteralRed: 0.94, green: 0.94, blue: 0.94, alpha: 1.0) 24 | textField.layer.cornerRadius = 4 25 | return textField 26 | } 27 | 28 | func createButton() -> UIButton { 29 | let button = UIButton() 30 | button.backgroundColor = .gray 31 | button.layer.cornerRadius = 4 32 | button.setTitleColor(.white, for: .normal) 33 | return button 34 | } 35 | 36 | func createTextView() -> UITextView { 37 | let textView = UITextView() 38 | textView.backgroundColor = UIColor(colorLiteralRed: 0.94, green: 0.94, blue: 0.94, alpha: 1.0) 39 | textView.layer.cornerRadius = 4 40 | return textView 41 | } 42 | 43 | func createImage() -> UIImageView { 44 | return UIImageView() 45 | } 46 | 47 | } 48 | 49 | 50 | 51 | 52 | private class LayoutTextField: UITextField { 53 | 54 | let padding = UIEdgeInsets(top: 5, left: 5, bottom: 5, right: 5); 55 | 56 | override func textRect(forBounds bounds: CGRect) -> CGRect { 57 | return UIEdgeInsetsInsetRect(bounds, padding) 58 | } 59 | 60 | override func placeholderRect(forBounds bounds: CGRect) -> CGRect { 61 | return UIEdgeInsetsInsetRect(bounds, padding) 62 | } 63 | 64 | override func editingRect(forBounds bounds: CGRect) -> CGRect { 65 | return UIEdgeInsetsInsetRect(bounds, padding) 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Examples/Example/Pods/FluentLayout/FluentLayout/LayoutDefaultControls.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import UIKit 3 | 4 | 5 | 6 | public protocol LayoutDefaultControls { 7 | 8 | func createLabel() -> UILabel 9 | 10 | func createTitleLabel() -> UILabel 11 | 12 | func createTextField() -> UITextField 13 | 14 | func createTextView() -> UITextView 15 | 16 | func createButton() -> UIButton 17 | 18 | func createImage() -> UIImageView 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Examples/Example/Pods/FluentLayout/FluentLayout/LayoutDefaults.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | 5 | public class LayoutDefaults { 6 | 7 | public static var defaultControls: LayoutDefaultControls = LayoutDefaultControlCreator() 8 | 9 | 10 | // MARK: Colors 11 | 12 | public static var backgroundColor: UIColor = .init(colorLiteralRed: 0.96, green: 0.96, blue: 0.96, alpha: 1.0) 13 | 14 | public static var sectionBackgroundColor: UIColor = .white 15 | 16 | public static var sectionBorderColor: UIColor = .init(colorLiteralRed: 0.9, green: 0.9, blue: 0.9, alpha: 1.0) 17 | 18 | 19 | // MARK: Layout Valibles 20 | 21 | public static var padding: UIEdgeInsets = UIEdgeInsetsMake(12, 12, 12, 12) 22 | 23 | public static var sectionPadding: UIEdgeInsets = UIEdgeInsetsMake(8, 8, 8, 8) 24 | 25 | public static var spacing: CGFloat = 12 26 | 27 | public static var sectionBorderWidth: CGFloat = 1 28 | 29 | public static var sectionSpacing: CGFloat = 4 30 | } 31 | -------------------------------------------------------------------------------- /Examples/Example/Pods/FluentLayout/FluentLayout/LayoutExtensions.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | /* 5 | There are views that own a layout object. Without these they would have to do .layout 6 | Having them as extensions centralizes them. 7 | As of now these are used by LayoutScrollable and LayoutSection 8 | 9 | Note: addSection is not in here on purpose. As of now seems useless 10 | to have the sections be able to add sections 11 | */ 12 | extension LayoutOwner { 13 | 14 | public func create(axis: UILayoutConstraintAxis = .vertical, alignment: UIStackViewAlignment = .fill, distribution: UIStackViewDistribution = .fill, spacing: CGFloat = LayoutDefaults.spacing, create: ((Layout) -> Void)?) { 15 | self.layout.create(axis: axis, alignment: alignment, distribution: distribution, spacing: spacing, create: create) 16 | } 17 | 18 | @discardableResult 19 | public func add(view: TView) -> TView { 20 | return self.layout.add(view: view) 21 | } 22 | 23 | @discardableResult 24 | public func addLabel(text: String) -> UILabel { 25 | return self.layout.addLabel(text: text) 26 | } 27 | 28 | @discardableResult 29 | public func addTitleLabel(text: String) -> UILabel { 30 | return self.layout.addTitleLabel(text: text) 31 | } 32 | 33 | @discardableResult 34 | public func addTextField() -> UITextField { 35 | return self.layout.addTextField() 36 | } 37 | 38 | @discardableResult 39 | public func addStack(axis: UILayoutConstraintAxis = .horizontal, alignment: UIStackViewAlignment = .fill, distribution: UIStackViewDistribution = .fill, spacing: CGFloat = 8, create: ((Layout) -> Void)?) -> Layout { 40 | return self.layout.addStack(axis: axis, alignment: alignment, distribution: distribution, spacing: spacing, create: create) 41 | } 42 | 43 | @discardableResult 44 | public func addButton(title: String) -> UIButton { 45 | return self.layout.addButton(title: title) 46 | } 47 | 48 | @discardableResult 49 | public func addImage(named: String? = nil) -> UIImageView { 50 | return self.layout.addImage(named: named) 51 | } 52 | 53 | @discardableResult 54 | public func addTextView() -> UITextView { 55 | return self.layout.addTextView() 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Examples/Example/Pods/FluentLayout/FluentLayout/LayoutOwner.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | /* 5 | For Views that have a layout object. Allows use of extension methods for easier 6 | access to the layout object 7 | */ 8 | public protocol LayoutOwner { 9 | 10 | var layout: Layout { get set } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Examples/Example/Pods/FluentLayout/FluentLayout/LayoutScrollable.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | 5 | open class LayoutScrollable: UIScrollView, LayoutOwner { 6 | 7 | // From LayoutOwner protocol 8 | public var layout: Layout = Layout() 9 | 10 | // ScrollView content view 11 | let contentView = UIView() 12 | 13 | // Contraints for the layout. Modified by layoutInsets 14 | var topConstraint: NSLayoutConstraint? = nil 15 | var bottomConstraint: NSLayoutConstraint? = nil 16 | var leftConstraint: NSLayoutConstraint? = nil 17 | var rightConstraint: NSLayoutConstraint? = nil 18 | 19 | 20 | 21 | public init() { 22 | super.init(frame: .zero) 23 | initializeView() 24 | } 25 | 26 | public override init(frame: CGRect) { 27 | super.init(frame: frame) 28 | } 29 | 30 | public required init?(coder aDecoder: NSCoder) { 31 | super.init(coder: aDecoder) 32 | } 33 | 34 | 35 | 36 | public var _layoutInsets: UIEdgeInsets = LayoutDefaults.padding 37 | public var layoutInsets: UIEdgeInsets { 38 | set { 39 | _layoutInsets = newValue 40 | applyLayoutInsets() 41 | } 42 | get { 43 | return _layoutInsets 44 | } 45 | } 46 | 47 | 48 | 49 | private func initializeView() { 50 | 51 | contentView.backgroundColor = .clear 52 | backgroundColor = LayoutDefaults.backgroundColor 53 | 54 | addSubview(contentView) 55 | contentView.addSubview(layout) 56 | 57 | contentView.pinToSuperview(top: 0, bottom: 0, left: 0, right: 0) 58 | .equalWidthTo(view: self) 59 | 60 | layout.translatesAutoresizingMaskIntoConstraints = false 61 | 62 | topConstraint = NSLayoutConstraint(item: layout, 63 | attribute: .top, 64 | relatedBy: .equal, 65 | toItem: contentView, 66 | attribute: .top, 67 | multiplier: 1, 68 | constant: layoutInsets.top) 69 | 70 | bottomConstraint = NSLayoutConstraint(item: contentView, 71 | attribute: .bottom, 72 | relatedBy: .greaterThanOrEqual, 73 | toItem: layout, 74 | attribute: .bottom, 75 | multiplier: 1, 76 | constant: layoutInsets.bottom) 77 | 78 | leftConstraint = NSLayoutConstraint(item: layout, 79 | attribute: .left, 80 | relatedBy: .equal, 81 | toItem: contentView, 82 | attribute: .left, 83 | multiplier: 1, 84 | constant: layoutInsets.left) 85 | 86 | rightConstraint = NSLayoutConstraint(item: contentView, 87 | attribute: .right, 88 | relatedBy: .equal, 89 | toItem: layout, 90 | attribute: .right, 91 | multiplier: 1, 92 | constant: layoutInsets.right) 93 | 94 | contentView.addConstraints([topConstraint!, bottomConstraint!, leftConstraint!, rightConstraint!]) 95 | } 96 | 97 | private func applyLayoutInsets() { 98 | topConstraint?.constant = layoutInsets.top 99 | bottomConstraint?.constant = layoutInsets.bottom 100 | leftConstraint?.constant = layoutInsets.left 101 | rightConstraint?.constant = layoutInsets.right 102 | } 103 | 104 | public func addSection(title: String? = nil, create: ((LayoutSection) -> Void)? = nil) { 105 | layout.addSection(title: title, create: create) 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /Examples/Example/Pods/FluentLayout/FluentLayout/LayoutSection.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | /* 4 | Layout sections are 'blocks' in the UI that are separated from the rest. 5 | Usually have a differnt background color than its superview 6 | */ 7 | open class LayoutSection: UIView, LayoutOwner { 8 | 9 | public var layout: Layout = Layout() 10 | 11 | public override init(frame: CGRect) { 12 | super.init(frame: frame) 13 | 14 | addSubview(layout) 15 | 16 | layout.pinToSuperview(top: LayoutDefaults.sectionPadding.top, 17 | bottom: LayoutDefaults.sectionPadding.bottom, 18 | left: LayoutDefaults.sectionPadding.left, 19 | right: LayoutDefaults.sectionPadding.right) 20 | 21 | backgroundColor = LayoutDefaults.sectionBackgroundColor 22 | layer.borderColor = LayoutDefaults.sectionBorderColor.cgColor 23 | layer.borderWidth = LayoutDefaults.sectionBorderWidth 24 | } 25 | 26 | public required init?(coder aDecoder: NSCoder) { 27 | fatalError("init(coder:) has not been implemented") 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Examples/Example/Pods/FluentLayout/FluentLayout/LayoutViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | 4 | 5 | /* 6 | View controller class where the view of the view controller is a LayoutScrollable object 7 | */ 8 | open class LayoutViewController: UIViewController { 9 | 10 | public let layout = LayoutScrollable() 11 | 12 | override open func loadView() { 13 | self.view = layout 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Examples/Example/Pods/FluentLayout/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Wesley Wickwire 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 | -------------------------------------------------------------------------------- /Examples/Example/Pods/FluentLayout/README.md: -------------------------------------------------------------------------------- 1 | # FluentLayout -------------------------------------------------------------------------------- /Examples/Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FluentLayout (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - FluentLayout 6 | 7 | SPEC CHECKSUMS: 8 | FluentLayout: 0786cc473287853719eadcb6abc5df17ea13190d 9 | 10 | PODFILE CHECKSUM: a6c1ea7fb238274c8c81793591ec499d2e691491 11 | 12 | COCOAPODS: 1.1.0 13 | -------------------------------------------------------------------------------- /Examples/Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 207F2E3DCB7B8F2731DE37FF8246AC3B /* LayoutDefaultControlCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1854BF65AF77CC674809DAAE0D1596D8 /* LayoutDefaultControlCreator.swift */; }; 11 | 5B87F06F5EEB2D2328C30139FA5F200A /* LayoutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3136C168FBD0530889EA02F577893FCF /* LayoutViewController.swift */; }; 12 | 5C06061AD5F59D63A73B0E6F415026A7 /* FluentLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = D8F7BFFB58C21C05C7F6DA1A9E1B3464 /* FluentLayout.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 6DD5E95463D4721C82415F66DB71774E /* Layout.swift in Sources */ = {isa = PBXBuildFile; fileRef = B744FAE75C154BF1942F0C315C6FDACD /* Layout.swift */; }; 14 | 70D9FD212E14C5FB927628AEA2B9E336 /* LayoutOwner.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC9034ED67A561AA662149604C4F24F0 /* LayoutOwner.swift */; }; 15 | 82380B201821DC8BCB7A008E74969E4A /* FluentLayout-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7C528E1ECB00D2342676E1A04E73247A /* FluentLayout-dummy.m */; }; 16 | 8957E8A4FCE979D461AB1F0FC3A9DF74 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CEC22C73C1608DFA5D5D78BDCB218219 /* Foundation.framework */; }; 17 | 99F1AAAC47FCAE87CF3407AD30129AC8 /* Pods-Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C9BDE82371C83FA9AE91B05F77ACAA36 /* Pods-Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 18 | A5D44702F3C4B6C13D7A36F579843241 /* Pods-Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 699118D7DDD5F335E4FB8B17DC0F12D2 /* Pods-Example-dummy.m */; }; 19 | A655625A9EF2BEE3BB9756949FD3612D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CEC22C73C1608DFA5D5D78BDCB218219 /* Foundation.framework */; }; 20 | AA0EBE9EAA213F3D7F3B248EB9DB4B64 /* LayoutSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C9394921B996D3ECBF96678130DBC99 /* LayoutSection.swift */; }; 21 | BBB5CC5F5335B818EC4862E3EA24EB60 /* LayoutConstraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = E57CD3CCFF869F8F23511F4222EBC5E7 /* LayoutConstraints.swift */; }; 22 | BCD558EFEEB5D2AA72BA12B71D15DF8E /* LayoutScrollable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 424F2D6267F796E68BD3CBEDB9B8C6FD /* LayoutScrollable.swift */; }; 23 | CCBF0CF3711B7B5941ACF55747D2F5E2 /* LayoutExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71459613CF409D41D90261595F0037AA /* LayoutExtensions.swift */; }; 24 | E6A566B6C472F67F620DED9B9745DCBC /* LayoutDefaultControls.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F9CD7F336B49229817DAFC77494C4D4 /* LayoutDefaultControls.swift */; }; 25 | EF130FAAEB561B9CBA4738D49755C119 /* LayoutDefaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BE24BD6444181C6789CC5DE56B2605E /* LayoutDefaults.swift */; }; 26 | F37291AF608C663877E22027390F787D /* FluentLayout-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A5D7DC8419981DD06BE72E30DB7E5F9 /* FluentLayout-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | DBEE62D336801C2224787CFD4494EA1E /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 8A4E2BF18A8E98B1117807DF1315E4F9; 35 | remoteInfo = FluentLayout; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 01E6907CF2644EB1CF8E23F708A3DA0B /* Pods-Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Example-resources.sh"; sourceTree = ""; }; 41 | 06D63CBB92780FE65A1187968C258C33 /* FluentLayout.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = FluentLayout.modulemap; sourceTree = ""; }; 42 | 0F9CD7F336B49229817DAFC77494C4D4 /* LayoutDefaultControls.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutDefaultControls.swift; path = FluentLayout/LayoutDefaultControls.swift; sourceTree = ""; }; 43 | 119072C64A19799964E1620D83F514FB /* Pods-Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-Example.modulemap"; sourceTree = ""; }; 44 | 128B61F63E96B7396181BF3B5C5541AC /* FluentLayout-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "FluentLayout-prefix.pch"; sourceTree = ""; }; 45 | 149054C495E8EC590CAB4C524133016F /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Example.debug.xcconfig"; sourceTree = ""; }; 46 | 1854BF65AF77CC674809DAAE0D1596D8 /* LayoutDefaultControlCreator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutDefaultControlCreator.swift; path = FluentLayout/LayoutDefaultControlCreator.swift; sourceTree = ""; }; 47 | 1C9394921B996D3ECBF96678130DBC99 /* LayoutSection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutSection.swift; path = FluentLayout/LayoutSection.swift; sourceTree = ""; }; 48 | 3136C168FBD0530889EA02F577893FCF /* LayoutViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutViewController.swift; path = FluentLayout/LayoutViewController.swift; sourceTree = ""; }; 49 | 424F2D6267F796E68BD3CBEDB9B8C6FD /* LayoutScrollable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutScrollable.swift; path = FluentLayout/LayoutScrollable.swift; sourceTree = ""; }; 50 | 552550F3F912264E5D073F8893691F88 /* Pods-Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Example-frameworks.sh"; sourceTree = ""; }; 51 | 699118D7DDD5F335E4FB8B17DC0F12D2 /* Pods-Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Example-dummy.m"; sourceTree = ""; }; 52 | 6A5D7DC8419981DD06BE72E30DB7E5F9 /* FluentLayout-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "FluentLayout-umbrella.h"; sourceTree = ""; }; 53 | 71459613CF409D41D90261595F0037AA /* LayoutExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutExtensions.swift; path = FluentLayout/LayoutExtensions.swift; sourceTree = ""; }; 54 | 764D33E23CE6C1111110B04F5CBADADB /* Pods-Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Example-acknowledgements.plist"; sourceTree = ""; }; 55 | 7C528E1ECB00D2342676E1A04E73247A /* FluentLayout-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "FluentLayout-dummy.m"; sourceTree = ""; }; 56 | 8713C548E9BFFE4C7424180A7D357F3A /* FluentLayout.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = FluentLayout.xcconfig; sourceTree = ""; }; 57 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 58 | 9BE24BD6444181C6789CC5DE56B2605E /* LayoutDefaults.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutDefaults.swift; path = FluentLayout/LayoutDefaults.swift; sourceTree = ""; }; 59 | A661FECCEBFF9D01869EE3B29C4C1EFF /* Pods-Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Example-acknowledgements.markdown"; sourceTree = ""; }; 60 | B744FAE75C154BF1942F0C315C6FDACD /* Layout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Layout.swift; path = FluentLayout/Layout.swift; sourceTree = ""; }; 61 | BF4BA912BAB2F7B3F7BBB31BE9E81368 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 62 | C1C12E7C4ACC49A24B3C034B5688DDDA /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 63 | C9BDE82371C83FA9AE91B05F77ACAA36 /* Pods-Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Example-umbrella.h"; sourceTree = ""; }; 64 | CEC22C73C1608DFA5D5D78BDCB218219 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 65 | D8F7BFFB58C21C05C7F6DA1A9E1B3464 /* FluentLayout.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FluentLayout.h; path = FluentLayout/FluentLayout.h; sourceTree = ""; }; 66 | DC9034ED67A561AA662149604C4F24F0 /* LayoutOwner.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutOwner.swift; path = FluentLayout/LayoutOwner.swift; sourceTree = ""; }; 67 | E512A5F985F876750237FD237C3AEEDA /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Example.release.xcconfig"; sourceTree = ""; }; 68 | E57CD3CCFF869F8F23511F4222EBC5E7 /* LayoutConstraints.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutConstraints.swift; path = FluentLayout/LayoutConstraints.swift; sourceTree = ""; }; 69 | E7F1476B61B4DCF140A3BCEB16FB0326 /* FluentLayout.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FluentLayout.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 70 | EFFB74AAA6B2AE8DABF0E88E61E09178 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 71 | /* End PBXFileReference section */ 72 | 73 | /* Begin PBXFrameworksBuildPhase section */ 74 | 37B95546AB13F4BFEE8983D1E2C68287 /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | A655625A9EF2BEE3BB9756949FD3612D /* Foundation.framework in Frameworks */, 79 | ); 80 | runOnlyForDeploymentPostprocessing = 0; 81 | }; 82 | 4C93A392C18C8CF6FB25BEF356978ABF /* Frameworks */ = { 83 | isa = PBXFrameworksBuildPhase; 84 | buildActionMask = 2147483647; 85 | files = ( 86 | 8957E8A4FCE979D461AB1F0FC3A9DF74 /* Foundation.framework in Frameworks */, 87 | ); 88 | runOnlyForDeploymentPostprocessing = 0; 89 | }; 90 | /* End PBXFrameworksBuildPhase section */ 91 | 92 | /* Begin PBXGroup section */ 93 | 171AFBAAB33E347664C515D5FA49254D /* FluentLayout */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | D8F7BFFB58C21C05C7F6DA1A9E1B3464 /* FluentLayout.h */, 97 | B744FAE75C154BF1942F0C315C6FDACD /* Layout.swift */, 98 | E57CD3CCFF869F8F23511F4222EBC5E7 /* LayoutConstraints.swift */, 99 | 1854BF65AF77CC674809DAAE0D1596D8 /* LayoutDefaultControlCreator.swift */, 100 | 0F9CD7F336B49229817DAFC77494C4D4 /* LayoutDefaultControls.swift */, 101 | 9BE24BD6444181C6789CC5DE56B2605E /* LayoutDefaults.swift */, 102 | 71459613CF409D41D90261595F0037AA /* LayoutExtensions.swift */, 103 | DC9034ED67A561AA662149604C4F24F0 /* LayoutOwner.swift */, 104 | 424F2D6267F796E68BD3CBEDB9B8C6FD /* LayoutScrollable.swift */, 105 | 1C9394921B996D3ECBF96678130DBC99 /* LayoutSection.swift */, 106 | 3136C168FBD0530889EA02F577893FCF /* LayoutViewController.swift */, 107 | 24401C49FDE7002FC84BEF8E6A142DA9 /* Support Files */, 108 | ); 109 | path = FluentLayout; 110 | sourceTree = ""; 111 | }; 112 | 24401C49FDE7002FC84BEF8E6A142DA9 /* Support Files */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | 06D63CBB92780FE65A1187968C258C33 /* FluentLayout.modulemap */, 116 | 8713C548E9BFFE4C7424180A7D357F3A /* FluentLayout.xcconfig */, 117 | 7C528E1ECB00D2342676E1A04E73247A /* FluentLayout-dummy.m */, 118 | 128B61F63E96B7396181BF3B5C5541AC /* FluentLayout-prefix.pch */, 119 | 6A5D7DC8419981DD06BE72E30DB7E5F9 /* FluentLayout-umbrella.h */, 120 | BF4BA912BAB2F7B3F7BBB31BE9E81368 /* Info.plist */, 121 | ); 122 | name = "Support Files"; 123 | path = "../Target Support Files/FluentLayout"; 124 | sourceTree = ""; 125 | }; 126 | 2E1B05BF12B99EAA5C6B1572F4C3DC7E /* Pods */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 171AFBAAB33E347664C515D5FA49254D /* FluentLayout */, 130 | ); 131 | name = Pods; 132 | sourceTree = ""; 133 | }; 134 | 3DCAB2B7CDE207B3958B6CB957FCC758 /* iOS */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | CEC22C73C1608DFA5D5D78BDCB218219 /* Foundation.framework */, 138 | ); 139 | name = iOS; 140 | sourceTree = ""; 141 | }; 142 | 5C20DD4283C1D04AB0AE0FC06AB071DC /* Products */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | E7F1476B61B4DCF140A3BCEB16FB0326 /* FluentLayout.framework */, 146 | C1C12E7C4ACC49A24B3C034B5688DDDA /* Pods_Example.framework */, 147 | ); 148 | name = Products; 149 | sourceTree = ""; 150 | }; 151 | 6A4F6A14E3FB951290E4531728B7A461 /* Targets Support Files */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | FE9811ABEB5931E154211FCA14B78350 /* Pods-Example */, 155 | ); 156 | name = "Targets Support Files"; 157 | sourceTree = ""; 158 | }; 159 | 7DB346D0F39D3F0E887471402A8071AB = { 160 | isa = PBXGroup; 161 | children = ( 162 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 163 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 164 | 2E1B05BF12B99EAA5C6B1572F4C3DC7E /* Pods */, 165 | 5C20DD4283C1D04AB0AE0FC06AB071DC /* Products */, 166 | 6A4F6A14E3FB951290E4531728B7A461 /* Targets Support Files */, 167 | ); 168 | sourceTree = ""; 169 | }; 170 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 171 | isa = PBXGroup; 172 | children = ( 173 | 3DCAB2B7CDE207B3958B6CB957FCC758 /* iOS */, 174 | ); 175 | name = Frameworks; 176 | sourceTree = ""; 177 | }; 178 | FE9811ABEB5931E154211FCA14B78350 /* Pods-Example */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | EFFB74AAA6B2AE8DABF0E88E61E09178 /* Info.plist */, 182 | 119072C64A19799964E1620D83F514FB /* Pods-Example.modulemap */, 183 | A661FECCEBFF9D01869EE3B29C4C1EFF /* Pods-Example-acknowledgements.markdown */, 184 | 764D33E23CE6C1111110B04F5CBADADB /* Pods-Example-acknowledgements.plist */, 185 | 699118D7DDD5F335E4FB8B17DC0F12D2 /* Pods-Example-dummy.m */, 186 | 552550F3F912264E5D073F8893691F88 /* Pods-Example-frameworks.sh */, 187 | 01E6907CF2644EB1CF8E23F708A3DA0B /* Pods-Example-resources.sh */, 188 | C9BDE82371C83FA9AE91B05F77ACAA36 /* Pods-Example-umbrella.h */, 189 | 149054C495E8EC590CAB4C524133016F /* Pods-Example.debug.xcconfig */, 190 | E512A5F985F876750237FD237C3AEEDA /* Pods-Example.release.xcconfig */, 191 | ); 192 | name = "Pods-Example"; 193 | path = "Target Support Files/Pods-Example"; 194 | sourceTree = ""; 195 | }; 196 | /* End PBXGroup section */ 197 | 198 | /* Begin PBXHeadersBuildPhase section */ 199 | 2A51CC27A15A6585AED5CA34702D885E /* Headers */ = { 200 | isa = PBXHeadersBuildPhase; 201 | buildActionMask = 2147483647; 202 | files = ( 203 | 99F1AAAC47FCAE87CF3407AD30129AC8 /* Pods-Example-umbrella.h in Headers */, 204 | ); 205 | runOnlyForDeploymentPostprocessing = 0; 206 | }; 207 | 2A79AFCE0B504D1E8C96C53A45035234 /* Headers */ = { 208 | isa = PBXHeadersBuildPhase; 209 | buildActionMask = 2147483647; 210 | files = ( 211 | F37291AF608C663877E22027390F787D /* FluentLayout-umbrella.h in Headers */, 212 | 5C06061AD5F59D63A73B0E6F415026A7 /* FluentLayout.h in Headers */, 213 | ); 214 | runOnlyForDeploymentPostprocessing = 0; 215 | }; 216 | /* End PBXHeadersBuildPhase section */ 217 | 218 | /* Begin PBXNativeTarget section */ 219 | 8A4E2BF18A8E98B1117807DF1315E4F9 /* FluentLayout */ = { 220 | isa = PBXNativeTarget; 221 | buildConfigurationList = DCF8905659CA113A15E4C51AC0209D94 /* Build configuration list for PBXNativeTarget "FluentLayout" */; 222 | buildPhases = ( 223 | 9E6EA87D7B360118DA36324A3236256C /* Sources */, 224 | 37B95546AB13F4BFEE8983D1E2C68287 /* Frameworks */, 225 | 2A79AFCE0B504D1E8C96C53A45035234 /* Headers */, 226 | ); 227 | buildRules = ( 228 | ); 229 | dependencies = ( 230 | ); 231 | name = FluentLayout; 232 | productName = FluentLayout; 233 | productReference = E7F1476B61B4DCF140A3BCEB16FB0326 /* FluentLayout.framework */; 234 | productType = "com.apple.product-type.framework"; 235 | }; 236 | A57D51516A5B8ABAEF0E97FB14D47EB4 /* Pods-Example */ = { 237 | isa = PBXNativeTarget; 238 | buildConfigurationList = 61E8CA123EA5EC198144649A830B7269 /* Build configuration list for PBXNativeTarget "Pods-Example" */; 239 | buildPhases = ( 240 | FDB4B5E32AE69FA44D1F621292A53F03 /* Sources */, 241 | 4C93A392C18C8CF6FB25BEF356978ABF /* Frameworks */, 242 | 2A51CC27A15A6585AED5CA34702D885E /* Headers */, 243 | ); 244 | buildRules = ( 245 | ); 246 | dependencies = ( 247 | B8F59FC2BE1BE10F5A215E550367D3F9 /* PBXTargetDependency */, 248 | ); 249 | name = "Pods-Example"; 250 | productName = "Pods-Example"; 251 | productReference = C1C12E7C4ACC49A24B3C034B5688DDDA /* Pods_Example.framework */; 252 | productType = "com.apple.product-type.framework"; 253 | }; 254 | /* End PBXNativeTarget section */ 255 | 256 | /* Begin PBXProject section */ 257 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 258 | isa = PBXProject; 259 | attributes = { 260 | LastSwiftUpdateCheck = 0730; 261 | LastUpgradeCheck = 0700; 262 | }; 263 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 264 | compatibilityVersion = "Xcode 3.2"; 265 | developmentRegion = English; 266 | hasScannedForEncodings = 0; 267 | knownRegions = ( 268 | en, 269 | ); 270 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 271 | productRefGroup = 5C20DD4283C1D04AB0AE0FC06AB071DC /* Products */; 272 | projectDirPath = ""; 273 | projectRoot = ""; 274 | targets = ( 275 | 8A4E2BF18A8E98B1117807DF1315E4F9 /* FluentLayout */, 276 | A57D51516A5B8ABAEF0E97FB14D47EB4 /* Pods-Example */, 277 | ); 278 | }; 279 | /* End PBXProject section */ 280 | 281 | /* Begin PBXSourcesBuildPhase section */ 282 | 9E6EA87D7B360118DA36324A3236256C /* Sources */ = { 283 | isa = PBXSourcesBuildPhase; 284 | buildActionMask = 2147483647; 285 | files = ( 286 | 82380B201821DC8BCB7A008E74969E4A /* FluentLayout-dummy.m in Sources */, 287 | 6DD5E95463D4721C82415F66DB71774E /* Layout.swift in Sources */, 288 | BBB5CC5F5335B818EC4862E3EA24EB60 /* LayoutConstraints.swift in Sources */, 289 | 207F2E3DCB7B8F2731DE37FF8246AC3B /* LayoutDefaultControlCreator.swift in Sources */, 290 | E6A566B6C472F67F620DED9B9745DCBC /* LayoutDefaultControls.swift in Sources */, 291 | EF130FAAEB561B9CBA4738D49755C119 /* LayoutDefaults.swift in Sources */, 292 | CCBF0CF3711B7B5941ACF55747D2F5E2 /* LayoutExtensions.swift in Sources */, 293 | 70D9FD212E14C5FB927628AEA2B9E336 /* LayoutOwner.swift in Sources */, 294 | BCD558EFEEB5D2AA72BA12B71D15DF8E /* LayoutScrollable.swift in Sources */, 295 | AA0EBE9EAA213F3D7F3B248EB9DB4B64 /* LayoutSection.swift in Sources */, 296 | 5B87F06F5EEB2D2328C30139FA5F200A /* LayoutViewController.swift in Sources */, 297 | ); 298 | runOnlyForDeploymentPostprocessing = 0; 299 | }; 300 | FDB4B5E32AE69FA44D1F621292A53F03 /* Sources */ = { 301 | isa = PBXSourcesBuildPhase; 302 | buildActionMask = 2147483647; 303 | files = ( 304 | A5D44702F3C4B6C13D7A36F579843241 /* Pods-Example-dummy.m in Sources */, 305 | ); 306 | runOnlyForDeploymentPostprocessing = 0; 307 | }; 308 | /* End PBXSourcesBuildPhase section */ 309 | 310 | /* Begin PBXTargetDependency section */ 311 | B8F59FC2BE1BE10F5A215E550367D3F9 /* PBXTargetDependency */ = { 312 | isa = PBXTargetDependency; 313 | name = FluentLayout; 314 | target = 8A4E2BF18A8E98B1117807DF1315E4F9 /* FluentLayout */; 315 | targetProxy = DBEE62D336801C2224787CFD4494EA1E /* PBXContainerItemProxy */; 316 | }; 317 | /* End PBXTargetDependency section */ 318 | 319 | /* Begin XCBuildConfiguration section */ 320 | 41080C1D53B3E45675166363C5647546 /* Debug */ = { 321 | isa = XCBuildConfiguration; 322 | baseConfigurationReference = 8713C548E9BFFE4C7424180A7D357F3A /* FluentLayout.xcconfig */; 323 | buildSettings = { 324 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 325 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 326 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 327 | CURRENT_PROJECT_VERSION = 1; 328 | DEBUG_INFORMATION_FORMAT = dwarf; 329 | DEFINES_MODULE = YES; 330 | DYLIB_COMPATIBILITY_VERSION = 1; 331 | DYLIB_CURRENT_VERSION = 1; 332 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 333 | ENABLE_STRICT_OBJC_MSGSEND = YES; 334 | GCC_NO_COMMON_BLOCKS = YES; 335 | GCC_PREFIX_HEADER = "Target Support Files/FluentLayout/FluentLayout-prefix.pch"; 336 | INFOPLIST_FILE = "Target Support Files/FluentLayout/Info.plist"; 337 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 338 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 339 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 340 | MODULEMAP_FILE = "Target Support Files/FluentLayout/FluentLayout.modulemap"; 341 | MTL_ENABLE_DEBUG_INFO = YES; 342 | PRODUCT_NAME = FluentLayout; 343 | SDKROOT = iphoneos; 344 | SKIP_INSTALL = YES; 345 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 346 | SWIFT_VERSION = 3.0; 347 | TARGETED_DEVICE_FAMILY = "1,2"; 348 | VERSIONING_SYSTEM = "apple-generic"; 349 | VERSION_INFO_PREFIX = ""; 350 | }; 351 | name = Debug; 352 | }; 353 | 52F44298E58F918341BB937A247A6868 /* Release */ = { 354 | isa = XCBuildConfiguration; 355 | baseConfigurationReference = 8713C548E9BFFE4C7424180A7D357F3A /* FluentLayout.xcconfig */; 356 | buildSettings = { 357 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 358 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 359 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 360 | CURRENT_PROJECT_VERSION = 1; 361 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 362 | DEFINES_MODULE = YES; 363 | DYLIB_COMPATIBILITY_VERSION = 1; 364 | DYLIB_CURRENT_VERSION = 1; 365 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 366 | ENABLE_STRICT_OBJC_MSGSEND = YES; 367 | GCC_NO_COMMON_BLOCKS = YES; 368 | GCC_PREFIX_HEADER = "Target Support Files/FluentLayout/FluentLayout-prefix.pch"; 369 | INFOPLIST_FILE = "Target Support Files/FluentLayout/Info.plist"; 370 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 371 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 372 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 373 | MODULEMAP_FILE = "Target Support Files/FluentLayout/FluentLayout.modulemap"; 374 | MTL_ENABLE_DEBUG_INFO = NO; 375 | PRODUCT_NAME = FluentLayout; 376 | SDKROOT = iphoneos; 377 | SKIP_INSTALL = YES; 378 | SWIFT_VERSION = 3.0; 379 | TARGETED_DEVICE_FAMILY = "1,2"; 380 | VERSIONING_SYSTEM = "apple-generic"; 381 | VERSION_INFO_PREFIX = ""; 382 | }; 383 | name = Release; 384 | }; 385 | 60811369A3E92D53FB7DEA8679752098 /* Debug */ = { 386 | isa = XCBuildConfiguration; 387 | baseConfigurationReference = 149054C495E8EC590CAB4C524133016F /* Pods-Example.debug.xcconfig */; 388 | buildSettings = { 389 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 390 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 391 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 392 | CURRENT_PROJECT_VERSION = 1; 393 | DEBUG_INFORMATION_FORMAT = dwarf; 394 | DEFINES_MODULE = YES; 395 | DYLIB_COMPATIBILITY_VERSION = 1; 396 | DYLIB_CURRENT_VERSION = 1; 397 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 398 | ENABLE_STRICT_OBJC_MSGSEND = YES; 399 | GCC_NO_COMMON_BLOCKS = YES; 400 | INFOPLIST_FILE = "Target Support Files/Pods-Example/Info.plist"; 401 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 402 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 403 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 404 | MACH_O_TYPE = staticlib; 405 | MODULEMAP_FILE = "Target Support Files/Pods-Example/Pods-Example.modulemap"; 406 | MTL_ENABLE_DEBUG_INFO = YES; 407 | OTHER_LDFLAGS = ""; 408 | OTHER_LIBTOOLFLAGS = ""; 409 | PODS_ROOT = "$(SRCROOT)"; 410 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 411 | PRODUCT_NAME = Pods_Example; 412 | SDKROOT = iphoneos; 413 | SKIP_INSTALL = YES; 414 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 415 | TARGETED_DEVICE_FAMILY = "1,2"; 416 | VERSIONING_SYSTEM = "apple-generic"; 417 | VERSION_INFO_PREFIX = ""; 418 | }; 419 | name = Debug; 420 | }; 421 | 673254EEAF0B5BF4596080C749645884 /* Release */ = { 422 | isa = XCBuildConfiguration; 423 | buildSettings = { 424 | ALWAYS_SEARCH_USER_PATHS = NO; 425 | CLANG_ANALYZER_NONNULL = YES; 426 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 427 | CLANG_CXX_LIBRARY = "libc++"; 428 | CLANG_ENABLE_MODULES = YES; 429 | CLANG_ENABLE_OBJC_ARC = YES; 430 | CLANG_WARN_BOOL_CONVERSION = YES; 431 | CLANG_WARN_CONSTANT_CONVERSION = YES; 432 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 433 | CLANG_WARN_EMPTY_BODY = YES; 434 | CLANG_WARN_ENUM_CONVERSION = YES; 435 | CLANG_WARN_INT_CONVERSION = YES; 436 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 437 | CLANG_WARN_UNREACHABLE_CODE = YES; 438 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 439 | CODE_SIGNING_REQUIRED = NO; 440 | COPY_PHASE_STRIP = YES; 441 | ENABLE_NS_ASSERTIONS = NO; 442 | GCC_C_LANGUAGE_STANDARD = gnu99; 443 | GCC_PREPROCESSOR_DEFINITIONS = ( 444 | "POD_CONFIGURATION_RELEASE=1", 445 | "$(inherited)", 446 | ); 447 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 448 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 449 | GCC_WARN_UNDECLARED_SELECTOR = YES; 450 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 451 | GCC_WARN_UNUSED_FUNCTION = YES; 452 | GCC_WARN_UNUSED_VARIABLE = YES; 453 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 454 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 455 | STRIP_INSTALLED_PRODUCT = NO; 456 | SYMROOT = "${SRCROOT}/../build"; 457 | VALIDATE_PRODUCT = YES; 458 | }; 459 | name = Release; 460 | }; 461 | E4F26E6EB105713A6A7E7E2E283AC2DF /* Debug */ = { 462 | isa = XCBuildConfiguration; 463 | buildSettings = { 464 | ALWAYS_SEARCH_USER_PATHS = NO; 465 | CLANG_ANALYZER_NONNULL = YES; 466 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 467 | CLANG_CXX_LIBRARY = "libc++"; 468 | CLANG_ENABLE_MODULES = YES; 469 | CLANG_ENABLE_OBJC_ARC = YES; 470 | CLANG_WARN_BOOL_CONVERSION = YES; 471 | CLANG_WARN_CONSTANT_CONVERSION = YES; 472 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 473 | CLANG_WARN_EMPTY_BODY = YES; 474 | CLANG_WARN_ENUM_CONVERSION = YES; 475 | CLANG_WARN_INT_CONVERSION = YES; 476 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 477 | CLANG_WARN_UNREACHABLE_CODE = YES; 478 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 479 | CODE_SIGNING_REQUIRED = NO; 480 | COPY_PHASE_STRIP = NO; 481 | ENABLE_TESTABILITY = YES; 482 | GCC_C_LANGUAGE_STANDARD = gnu99; 483 | GCC_DYNAMIC_NO_PIC = NO; 484 | GCC_OPTIMIZATION_LEVEL = 0; 485 | GCC_PREPROCESSOR_DEFINITIONS = ( 486 | "POD_CONFIGURATION_DEBUG=1", 487 | "DEBUG=1", 488 | "$(inherited)", 489 | ); 490 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 491 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 492 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 493 | GCC_WARN_UNDECLARED_SELECTOR = YES; 494 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 495 | GCC_WARN_UNUSED_FUNCTION = YES; 496 | GCC_WARN_UNUSED_VARIABLE = YES; 497 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 498 | ONLY_ACTIVE_ARCH = YES; 499 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 500 | STRIP_INSTALLED_PRODUCT = NO; 501 | SYMROOT = "${SRCROOT}/../build"; 502 | }; 503 | name = Debug; 504 | }; 505 | F56DCEC5A633090BEFB1351AB997AD63 /* Release */ = { 506 | isa = XCBuildConfiguration; 507 | baseConfigurationReference = E512A5F985F876750237FD237C3AEEDA /* Pods-Example.release.xcconfig */; 508 | buildSettings = { 509 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 510 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 511 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 512 | CURRENT_PROJECT_VERSION = 1; 513 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 514 | DEFINES_MODULE = YES; 515 | DYLIB_COMPATIBILITY_VERSION = 1; 516 | DYLIB_CURRENT_VERSION = 1; 517 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 518 | ENABLE_STRICT_OBJC_MSGSEND = YES; 519 | GCC_NO_COMMON_BLOCKS = YES; 520 | INFOPLIST_FILE = "Target Support Files/Pods-Example/Info.plist"; 521 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 522 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 523 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 524 | MACH_O_TYPE = staticlib; 525 | MODULEMAP_FILE = "Target Support Files/Pods-Example/Pods-Example.modulemap"; 526 | MTL_ENABLE_DEBUG_INFO = NO; 527 | OTHER_LDFLAGS = ""; 528 | OTHER_LIBTOOLFLAGS = ""; 529 | PODS_ROOT = "$(SRCROOT)"; 530 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 531 | PRODUCT_NAME = Pods_Example; 532 | SDKROOT = iphoneos; 533 | SKIP_INSTALL = YES; 534 | TARGETED_DEVICE_FAMILY = "1,2"; 535 | VERSIONING_SYSTEM = "apple-generic"; 536 | VERSION_INFO_PREFIX = ""; 537 | }; 538 | name = Release; 539 | }; 540 | /* End XCBuildConfiguration section */ 541 | 542 | /* Begin XCConfigurationList section */ 543 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 544 | isa = XCConfigurationList; 545 | buildConfigurations = ( 546 | E4F26E6EB105713A6A7E7E2E283AC2DF /* Debug */, 547 | 673254EEAF0B5BF4596080C749645884 /* Release */, 548 | ); 549 | defaultConfigurationIsVisible = 0; 550 | defaultConfigurationName = Release; 551 | }; 552 | 61E8CA123EA5EC198144649A830B7269 /* Build configuration list for PBXNativeTarget "Pods-Example" */ = { 553 | isa = XCConfigurationList; 554 | buildConfigurations = ( 555 | 60811369A3E92D53FB7DEA8679752098 /* Debug */, 556 | F56DCEC5A633090BEFB1351AB997AD63 /* Release */, 557 | ); 558 | defaultConfigurationIsVisible = 0; 559 | defaultConfigurationName = Release; 560 | }; 561 | DCF8905659CA113A15E4C51AC0209D94 /* Build configuration list for PBXNativeTarget "FluentLayout" */ = { 562 | isa = XCConfigurationList; 563 | buildConfigurations = ( 564 | 41080C1D53B3E45675166363C5647546 /* Debug */, 565 | 52F44298E58F918341BB937A247A6868 /* Release */, 566 | ); 567 | defaultConfigurationIsVisible = 0; 568 | defaultConfigurationName = Release; 569 | }; 570 | /* End XCConfigurationList section */ 571 | }; 572 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 573 | } 574 | -------------------------------------------------------------------------------- /Examples/Example/Pods/Target Support Files/FluentLayout/FluentLayout-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_FluentLayout : NSObject 3 | @end 4 | @implementation PodsDummy_FluentLayout 5 | @end 6 | -------------------------------------------------------------------------------- /Examples/Example/Pods/Target Support Files/FluentLayout/FluentLayout-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Examples/Example/Pods/Target Support Files/FluentLayout/FluentLayout-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "FluentLayout.h" 6 | 7 | FOUNDATION_EXPORT double FluentLayoutVersionNumber; 8 | FOUNDATION_EXPORT const unsigned char FluentLayoutVersionString[]; 9 | 10 | -------------------------------------------------------------------------------- /Examples/Example/Pods/Target Support Files/FluentLayout/FluentLayout.modulemap: -------------------------------------------------------------------------------- 1 | framework module FluentLayout { 2 | umbrella header "FluentLayout-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Examples/Example/Pods/Target Support Files/FluentLayout/FluentLayout.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/FluentLayout 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Examples/Example/Pods/Target Support Files/FluentLayout/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 | 0.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Examples/Example/Pods/Target Support Files/Pods-Example/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 | -------------------------------------------------------------------------------- /Examples/Example/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## FluentLayout 5 | 6 | MIT License 7 | 8 | Copyright (c) 2017 Wesley Wickwire 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | Generated by CocoaPods - https://cocoapods.org 29 | -------------------------------------------------------------------------------- /Examples/Example/Pods/Target Support Files/Pods-Example/Pods-Example-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 | MIT License 18 | 19 | Copyright (c) 2017 Wesley Wickwire 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | License 40 | MIT 41 | Title 42 | FluentLayout 43 | Type 44 | PSGroupSpecifier 45 | 46 | 47 | FooterText 48 | Generated by CocoaPods - https://cocoapods.org 49 | Title 50 | 51 | Type 52 | PSGroupSpecifier 53 | 54 | 55 | StringsTable 56 | Acknowledgements 57 | Title 58 | Acknowledgements 59 | 60 | 61 | -------------------------------------------------------------------------------- /Examples/Example/Pods/Target Support Files/Pods-Example/Pods-Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Examples/Example/Pods/Target Support Files/Pods-Example/Pods-Example-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 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | 86 | if [[ "$CONFIGURATION" == "Debug" ]]; then 87 | install_framework "$BUILT_PRODUCTS_DIR/FluentLayout/FluentLayout.framework" 88 | fi 89 | if [[ "$CONFIGURATION" == "Release" ]]; then 90 | install_framework "$BUILT_PRODUCTS_DIR/FluentLayout/FluentLayout.framework" 91 | fi 92 | -------------------------------------------------------------------------------- /Examples/Example/Pods/Target Support Files/Pods-Example/Pods-Example-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 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | *) 22 | TARGET_DEVICE_ARGS="--target-device mac" 23 | ;; 24 | esac 25 | 26 | install_resource() 27 | { 28 | if [[ "$1" = /* ]] ; then 29 | RESOURCE_PATH="$1" 30 | else 31 | RESOURCE_PATH="${PODS_ROOT}/$1" 32 | fi 33 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 34 | cat << EOM 35 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 36 | EOM 37 | exit 1 38 | fi 39 | case $RESOURCE_PATH in 40 | *.storyboard) 41 | 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}" 42 | 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} 43 | ;; 44 | *.xib) 45 | 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}" 46 | 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} 47 | ;; 48 | *.framework) 49 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 50 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 51 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 52 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 53 | ;; 54 | *.xcdatamodel) 55 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 56 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 57 | ;; 58 | *.xcdatamodeld) 59 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 60 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 61 | ;; 62 | *.xcmappingmodel) 63 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 64 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 65 | ;; 66 | *.xcassets) 67 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 68 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 69 | ;; 70 | *) 71 | echo "$RESOURCE_PATH" 72 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 73 | ;; 74 | esac 75 | } 76 | 77 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 78 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 79 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 80 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 82 | fi 83 | rm -f "$RESOURCES_TO_COPY" 84 | 85 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 86 | then 87 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 88 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 89 | while read line; do 90 | if [[ $line != "${PODS_ROOT}*" ]]; then 91 | XCASSET_FILES+=("$line") 92 | fi 93 | done <<<"$OTHER_XCASSETS" 94 | 95 | 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}" 96 | fi 97 | -------------------------------------------------------------------------------- /Examples/Example/Pods/Target Support Files/Pods-Example/Pods-Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double Pods_ExampleVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char Pods_ExampleVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Examples/Example/Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/FluentLayout" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/FluentLayout/FluentLayout.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "FluentLayout" 8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 9 | PODS_BUILD_DIR = $BUILD_DIR 10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Examples/Example/Pods/Target Support Files/Pods-Example/Pods-Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_Example { 2 | umbrella header "Pods-Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Examples/Example/Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/FluentLayout" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/FluentLayout/FluentLayout.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "FluentLayout" 8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 9 | PODS_BUILD_DIR = $BUILD_DIR 10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Examples/ExampleScreenShot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wickwirew/FluentLayout/27efbe76d89b2a65352fd554d483ab63d7bb3624/Examples/ExampleScreenShot.png -------------------------------------------------------------------------------- /Examples/ProfileHeader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wickwirew/FluentLayout/27efbe76d89b2a65352fd554d483ab63d7bb3624/Examples/ProfileHeader.png -------------------------------------------------------------------------------- /FluentLayout.podspec: -------------------------------------------------------------------------------- 1 | 2 | Pod::Spec.new do |s| 3 | 4 | s.name = "FluentLayout" 5 | s.version = "0.1.0" 6 | s.summary = "Simple, readable way to write UI code in Swift" 7 | s.description = <<-DESC 8 | FluentLayout's primary goal is to provide a simple, readable way to write UI code in Swift. 9 | DESC 10 | 11 | s.homepage = "https://github.com/wickwirew/FluentLayout" 12 | s.license = "MIT" 13 | s.author = { "Wesley Wickwire" => "wickwirew@gmail.com" } 14 | s.platform = :ios, "9.0" 15 | s.source = { :git => "https://github.com/wickwirew/FluentLayout.git", :tag => "0.1.0" } 16 | s.source_files = "FluentLayout", "FluentLayout/**/*.{swift}" 17 | 18 | end 19 | -------------------------------------------------------------------------------- /FluentLayout.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | F74D46E11E8711BF00EC4BAC /* Layout.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74D46D71E8711BF00EC4BAC /* Layout.swift */; }; 11 | F74D46E21E8711BF00EC4BAC /* LayoutConstraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74D46D81E8711BF00EC4BAC /* LayoutConstraints.swift */; }; 12 | F74D46E31E8711BF00EC4BAC /* LayoutDefaultControlCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74D46D91E8711BF00EC4BAC /* LayoutDefaultControlCreator.swift */; }; 13 | F74D46E41E8711BF00EC4BAC /* LayoutDefaultControls.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74D46DA1E8711BF00EC4BAC /* LayoutDefaultControls.swift */; }; 14 | F74D46E51E8711BF00EC4BAC /* LayoutDefaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74D46DB1E8711BF00EC4BAC /* LayoutDefaults.swift */; }; 15 | F74D46E61E8711BF00EC4BAC /* LayoutExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74D46DC1E8711BF00EC4BAC /* LayoutExtensions.swift */; }; 16 | F74D46E71E8711BF00EC4BAC /* LayoutOwner.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74D46DD1E8711BF00EC4BAC /* LayoutOwner.swift */; }; 17 | F74D46E81E8711BF00EC4BAC /* LayoutScrollable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74D46DE1E8711BF00EC4BAC /* LayoutScrollable.swift */; }; 18 | F74D46E91E8711BF00EC4BAC /* LayoutSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74D46DF1E8711BF00EC4BAC /* LayoutSection.swift */; }; 19 | F74D46EA1E8711BF00EC4BAC /* LayoutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74D46E01E8711BF00EC4BAC /* LayoutViewController.swift */; }; 20 | F7F9A44D1E8710E600E5C50E /* FluentLayout.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7F9A4431E8710E600E5C50E /* FluentLayout.framework */; }; 21 | F7F9A4521E8710E600E5C50E /* FluentLayoutTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7F9A4511E8710E600E5C50E /* FluentLayoutTests.swift */; }; 22 | F7F9A4541E8710E600E5C50E /* FluentLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = F7F9A4461E8710E600E5C50E /* FluentLayout.h */; settings = {ATTRIBUTES = (Public, ); }; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXContainerItemProxy section */ 26 | F7F9A44E1E8710E600E5C50E /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = F7F9A43A1E8710E600E5C50E /* Project object */; 29 | proxyType = 1; 30 | remoteGlobalIDString = F7F9A4421E8710E600E5C50E; 31 | remoteInfo = FluentLayout; 32 | }; 33 | /* End PBXContainerItemProxy section */ 34 | 35 | /* Begin PBXFileReference section */ 36 | F74D46D71E8711BF00EC4BAC /* Layout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Layout.swift; sourceTree = ""; }; 37 | F74D46D81E8711BF00EC4BAC /* LayoutConstraints.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutConstraints.swift; sourceTree = ""; }; 38 | F74D46D91E8711BF00EC4BAC /* LayoutDefaultControlCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutDefaultControlCreator.swift; sourceTree = ""; }; 39 | F74D46DA1E8711BF00EC4BAC /* LayoutDefaultControls.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutDefaultControls.swift; sourceTree = ""; }; 40 | F74D46DB1E8711BF00EC4BAC /* LayoutDefaults.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutDefaults.swift; sourceTree = ""; }; 41 | F74D46DC1E8711BF00EC4BAC /* LayoutExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutExtensions.swift; sourceTree = ""; }; 42 | F74D46DD1E8711BF00EC4BAC /* LayoutOwner.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutOwner.swift; sourceTree = ""; }; 43 | F74D46DE1E8711BF00EC4BAC /* LayoutScrollable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutScrollable.swift; sourceTree = ""; }; 44 | F74D46DF1E8711BF00EC4BAC /* LayoutSection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutSection.swift; sourceTree = ""; }; 45 | F74D46E01E8711BF00EC4BAC /* LayoutViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutViewController.swift; sourceTree = ""; }; 46 | F7F9A4431E8710E600E5C50E /* FluentLayout.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FluentLayout.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | F7F9A4461E8710E600E5C50E /* FluentLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FluentLayout.h; sourceTree = ""; }; 48 | F7F9A4471E8710E600E5C50E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | F7F9A44C1E8710E600E5C50E /* FluentLayoutTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FluentLayoutTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | F7F9A4511E8710E600E5C50E /* FluentLayoutTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FluentLayoutTests.swift; sourceTree = ""; }; 51 | F7F9A4531E8710E600E5C50E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | /* End PBXFileReference section */ 53 | 54 | /* Begin PBXFrameworksBuildPhase section */ 55 | F7F9A43F1E8710E600E5C50E /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | ); 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | F7F9A4491E8710E600E5C50E /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | F7F9A44D1E8710E600E5C50E /* FluentLayout.framework in Frameworks */, 67 | ); 68 | runOnlyForDeploymentPostprocessing = 0; 69 | }; 70 | /* End PBXFrameworksBuildPhase section */ 71 | 72 | /* Begin PBXGroup section */ 73 | F7F9A4391E8710E600E5C50E = { 74 | isa = PBXGroup; 75 | children = ( 76 | F7F9A4451E8710E600E5C50E /* FluentLayout */, 77 | F7F9A4501E8710E600E5C50E /* FluentLayoutTests */, 78 | F7F9A4441E8710E600E5C50E /* Products */, 79 | ); 80 | sourceTree = ""; 81 | }; 82 | F7F9A4441E8710E600E5C50E /* Products */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | F7F9A4431E8710E600E5C50E /* FluentLayout.framework */, 86 | F7F9A44C1E8710E600E5C50E /* FluentLayoutTests.xctest */, 87 | ); 88 | name = Products; 89 | sourceTree = ""; 90 | }; 91 | F7F9A4451E8710E600E5C50E /* FluentLayout */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | F74D46D71E8711BF00EC4BAC /* Layout.swift */, 95 | F74D46D81E8711BF00EC4BAC /* LayoutConstraints.swift */, 96 | F74D46D91E8711BF00EC4BAC /* LayoutDefaultControlCreator.swift */, 97 | F74D46DA1E8711BF00EC4BAC /* LayoutDefaultControls.swift */, 98 | F74D46DB1E8711BF00EC4BAC /* LayoutDefaults.swift */, 99 | F74D46DC1E8711BF00EC4BAC /* LayoutExtensions.swift */, 100 | F74D46DD1E8711BF00EC4BAC /* LayoutOwner.swift */, 101 | F74D46DE1E8711BF00EC4BAC /* LayoutScrollable.swift */, 102 | F74D46DF1E8711BF00EC4BAC /* LayoutSection.swift */, 103 | F74D46E01E8711BF00EC4BAC /* LayoutViewController.swift */, 104 | F7F9A4461E8710E600E5C50E /* FluentLayout.h */, 105 | F7F9A4471E8710E600E5C50E /* Info.plist */, 106 | ); 107 | path = FluentLayout; 108 | sourceTree = ""; 109 | }; 110 | F7F9A4501E8710E600E5C50E /* FluentLayoutTests */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | F7F9A4511E8710E600E5C50E /* FluentLayoutTests.swift */, 114 | F7F9A4531E8710E600E5C50E /* Info.plist */, 115 | ); 116 | path = FluentLayoutTests; 117 | sourceTree = ""; 118 | }; 119 | /* End PBXGroup section */ 120 | 121 | /* Begin PBXHeadersBuildPhase section */ 122 | F7F9A4401E8710E600E5C50E /* Headers */ = { 123 | isa = PBXHeadersBuildPhase; 124 | buildActionMask = 2147483647; 125 | files = ( 126 | F7F9A4541E8710E600E5C50E /* FluentLayout.h in Headers */, 127 | ); 128 | runOnlyForDeploymentPostprocessing = 0; 129 | }; 130 | /* End PBXHeadersBuildPhase section */ 131 | 132 | /* Begin PBXNativeTarget section */ 133 | F7F9A4421E8710E600E5C50E /* FluentLayout */ = { 134 | isa = PBXNativeTarget; 135 | buildConfigurationList = F7F9A4571E8710E600E5C50E /* Build configuration list for PBXNativeTarget "FluentLayout" */; 136 | buildPhases = ( 137 | F7F9A43E1E8710E600E5C50E /* Sources */, 138 | F7F9A43F1E8710E600E5C50E /* Frameworks */, 139 | F7F9A4401E8710E600E5C50E /* Headers */, 140 | F7F9A4411E8710E600E5C50E /* Resources */, 141 | ); 142 | buildRules = ( 143 | ); 144 | dependencies = ( 145 | ); 146 | name = FluentLayout; 147 | productName = FluentLayout; 148 | productReference = F7F9A4431E8710E600E5C50E /* FluentLayout.framework */; 149 | productType = "com.apple.product-type.framework"; 150 | }; 151 | F7F9A44B1E8710E600E5C50E /* FluentLayoutTests */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = F7F9A45A1E8710E600E5C50E /* Build configuration list for PBXNativeTarget "FluentLayoutTests" */; 154 | buildPhases = ( 155 | F7F9A4481E8710E600E5C50E /* Sources */, 156 | F7F9A4491E8710E600E5C50E /* Frameworks */, 157 | F7F9A44A1E8710E600E5C50E /* Resources */, 158 | ); 159 | buildRules = ( 160 | ); 161 | dependencies = ( 162 | F7F9A44F1E8710E600E5C50E /* PBXTargetDependency */, 163 | ); 164 | name = FluentLayoutTests; 165 | productName = FluentLayoutTests; 166 | productReference = F7F9A44C1E8710E600E5C50E /* FluentLayoutTests.xctest */; 167 | productType = "com.apple.product-type.bundle.unit-test"; 168 | }; 169 | /* End PBXNativeTarget section */ 170 | 171 | /* Begin PBXProject section */ 172 | F7F9A43A1E8710E600E5C50E /* Project object */ = { 173 | isa = PBXProject; 174 | attributes = { 175 | LastSwiftUpdateCheck = 0820; 176 | LastUpgradeCheck = 0820; 177 | ORGANIZATIONNAME = weswickwire; 178 | TargetAttributes = { 179 | F7F9A4421E8710E600E5C50E = { 180 | CreatedOnToolsVersion = 8.2.1; 181 | DevelopmentTeam = HSE59E2Q5U; 182 | LastSwiftMigration = 0820; 183 | ProvisioningStyle = Automatic; 184 | }; 185 | F7F9A44B1E8710E600E5C50E = { 186 | CreatedOnToolsVersion = 8.2.1; 187 | DevelopmentTeam = HSE59E2Q5U; 188 | ProvisioningStyle = Automatic; 189 | }; 190 | }; 191 | }; 192 | buildConfigurationList = F7F9A43D1E8710E600E5C50E /* Build configuration list for PBXProject "FluentLayout" */; 193 | compatibilityVersion = "Xcode 3.2"; 194 | developmentRegion = English; 195 | hasScannedForEncodings = 0; 196 | knownRegions = ( 197 | en, 198 | ); 199 | mainGroup = F7F9A4391E8710E600E5C50E; 200 | productRefGroup = F7F9A4441E8710E600E5C50E /* Products */; 201 | projectDirPath = ""; 202 | projectRoot = ""; 203 | targets = ( 204 | F7F9A4421E8710E600E5C50E /* FluentLayout */, 205 | F7F9A44B1E8710E600E5C50E /* FluentLayoutTests */, 206 | ); 207 | }; 208 | /* End PBXProject section */ 209 | 210 | /* Begin PBXResourcesBuildPhase section */ 211 | F7F9A4411E8710E600E5C50E /* Resources */ = { 212 | isa = PBXResourcesBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | }; 218 | F7F9A44A1E8710E600E5C50E /* Resources */ = { 219 | isa = PBXResourcesBuildPhase; 220 | buildActionMask = 2147483647; 221 | files = ( 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | }; 225 | /* End PBXResourcesBuildPhase section */ 226 | 227 | /* Begin PBXSourcesBuildPhase section */ 228 | F7F9A43E1E8710E600E5C50E /* Sources */ = { 229 | isa = PBXSourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | F74D46EA1E8711BF00EC4BAC /* LayoutViewController.swift in Sources */, 233 | F74D46E21E8711BF00EC4BAC /* LayoutConstraints.swift in Sources */, 234 | F74D46E61E8711BF00EC4BAC /* LayoutExtensions.swift in Sources */, 235 | F74D46E91E8711BF00EC4BAC /* LayoutSection.swift in Sources */, 236 | F74D46E81E8711BF00EC4BAC /* LayoutScrollable.swift in Sources */, 237 | F74D46E41E8711BF00EC4BAC /* LayoutDefaultControls.swift in Sources */, 238 | F74D46E51E8711BF00EC4BAC /* LayoutDefaults.swift in Sources */, 239 | F74D46E31E8711BF00EC4BAC /* LayoutDefaultControlCreator.swift in Sources */, 240 | F74D46E11E8711BF00EC4BAC /* Layout.swift in Sources */, 241 | F74D46E71E8711BF00EC4BAC /* LayoutOwner.swift in Sources */, 242 | ); 243 | runOnlyForDeploymentPostprocessing = 0; 244 | }; 245 | F7F9A4481E8710E600E5C50E /* Sources */ = { 246 | isa = PBXSourcesBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | F7F9A4521E8710E600E5C50E /* FluentLayoutTests.swift in Sources */, 250 | ); 251 | runOnlyForDeploymentPostprocessing = 0; 252 | }; 253 | /* End PBXSourcesBuildPhase section */ 254 | 255 | /* Begin PBXTargetDependency section */ 256 | F7F9A44F1E8710E600E5C50E /* PBXTargetDependency */ = { 257 | isa = PBXTargetDependency; 258 | target = F7F9A4421E8710E600E5C50E /* FluentLayout */; 259 | targetProxy = F7F9A44E1E8710E600E5C50E /* PBXContainerItemProxy */; 260 | }; 261 | /* End PBXTargetDependency section */ 262 | 263 | /* Begin XCBuildConfiguration section */ 264 | F7F9A4551E8710E600E5C50E /* Debug */ = { 265 | isa = XCBuildConfiguration; 266 | buildSettings = { 267 | ALWAYS_SEARCH_USER_PATHS = NO; 268 | CLANG_ANALYZER_NONNULL = YES; 269 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 270 | CLANG_CXX_LIBRARY = "libc++"; 271 | CLANG_ENABLE_MODULES = YES; 272 | CLANG_ENABLE_OBJC_ARC = YES; 273 | CLANG_WARN_BOOL_CONVERSION = YES; 274 | CLANG_WARN_CONSTANT_CONVERSION = YES; 275 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 276 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 277 | CLANG_WARN_EMPTY_BODY = YES; 278 | CLANG_WARN_ENUM_CONVERSION = YES; 279 | CLANG_WARN_INFINITE_RECURSION = YES; 280 | CLANG_WARN_INT_CONVERSION = YES; 281 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 282 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 283 | CLANG_WARN_UNREACHABLE_CODE = YES; 284 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 285 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 286 | COPY_PHASE_STRIP = NO; 287 | CURRENT_PROJECT_VERSION = 1; 288 | DEBUG_INFORMATION_FORMAT = dwarf; 289 | ENABLE_STRICT_OBJC_MSGSEND = YES; 290 | ENABLE_TESTABILITY = YES; 291 | GCC_C_LANGUAGE_STANDARD = gnu99; 292 | GCC_DYNAMIC_NO_PIC = NO; 293 | GCC_NO_COMMON_BLOCKS = YES; 294 | GCC_OPTIMIZATION_LEVEL = 0; 295 | GCC_PREPROCESSOR_DEFINITIONS = ( 296 | "DEBUG=1", 297 | "$(inherited)", 298 | ); 299 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 300 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 301 | GCC_WARN_UNDECLARED_SELECTOR = YES; 302 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 303 | GCC_WARN_UNUSED_FUNCTION = YES; 304 | GCC_WARN_UNUSED_VARIABLE = YES; 305 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 306 | MTL_ENABLE_DEBUG_INFO = YES; 307 | ONLY_ACTIVE_ARCH = YES; 308 | SDKROOT = iphoneos; 309 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 310 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 311 | TARGETED_DEVICE_FAMILY = "1,2"; 312 | VERSIONING_SYSTEM = "apple-generic"; 313 | VERSION_INFO_PREFIX = ""; 314 | }; 315 | name = Debug; 316 | }; 317 | F7F9A4561E8710E600E5C50E /* Release */ = { 318 | isa = XCBuildConfiguration; 319 | buildSettings = { 320 | ALWAYS_SEARCH_USER_PATHS = NO; 321 | CLANG_ANALYZER_NONNULL = YES; 322 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 323 | CLANG_CXX_LIBRARY = "libc++"; 324 | CLANG_ENABLE_MODULES = YES; 325 | CLANG_ENABLE_OBJC_ARC = YES; 326 | CLANG_WARN_BOOL_CONVERSION = YES; 327 | CLANG_WARN_CONSTANT_CONVERSION = YES; 328 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 329 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 330 | CLANG_WARN_EMPTY_BODY = YES; 331 | CLANG_WARN_ENUM_CONVERSION = YES; 332 | CLANG_WARN_INFINITE_RECURSION = YES; 333 | CLANG_WARN_INT_CONVERSION = YES; 334 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 335 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 336 | CLANG_WARN_UNREACHABLE_CODE = YES; 337 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 338 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 339 | COPY_PHASE_STRIP = NO; 340 | CURRENT_PROJECT_VERSION = 1; 341 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 342 | ENABLE_NS_ASSERTIONS = NO; 343 | ENABLE_STRICT_OBJC_MSGSEND = YES; 344 | GCC_C_LANGUAGE_STANDARD = gnu99; 345 | GCC_NO_COMMON_BLOCKS = YES; 346 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 347 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 348 | GCC_WARN_UNDECLARED_SELECTOR = YES; 349 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 350 | GCC_WARN_UNUSED_FUNCTION = YES; 351 | GCC_WARN_UNUSED_VARIABLE = YES; 352 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 353 | MTL_ENABLE_DEBUG_INFO = NO; 354 | SDKROOT = iphoneos; 355 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 356 | TARGETED_DEVICE_FAMILY = "1,2"; 357 | VALIDATE_PRODUCT = YES; 358 | VERSIONING_SYSTEM = "apple-generic"; 359 | VERSION_INFO_PREFIX = ""; 360 | }; 361 | name = Release; 362 | }; 363 | F7F9A4581E8710E600E5C50E /* Debug */ = { 364 | isa = XCBuildConfiguration; 365 | buildSettings = { 366 | CLANG_ENABLE_MODULES = YES; 367 | CODE_SIGN_IDENTITY = ""; 368 | DEFINES_MODULE = YES; 369 | DEVELOPMENT_TEAM = HSE59E2Q5U; 370 | DYLIB_COMPATIBILITY_VERSION = 1; 371 | DYLIB_CURRENT_VERSION = 1; 372 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 373 | INFOPLIST_FILE = FluentLayout/Info.plist; 374 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 375 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 376 | PRODUCT_BUNDLE_IDENTIFIER = com.weswickwire.FluentLayout; 377 | PRODUCT_NAME = "$(TARGET_NAME)"; 378 | SKIP_INSTALL = YES; 379 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 380 | SWIFT_VERSION = 3.0; 381 | }; 382 | name = Debug; 383 | }; 384 | F7F9A4591E8710E600E5C50E /* Release */ = { 385 | isa = XCBuildConfiguration; 386 | buildSettings = { 387 | CLANG_ENABLE_MODULES = YES; 388 | CODE_SIGN_IDENTITY = ""; 389 | DEFINES_MODULE = YES; 390 | DEVELOPMENT_TEAM = HSE59E2Q5U; 391 | DYLIB_COMPATIBILITY_VERSION = 1; 392 | DYLIB_CURRENT_VERSION = 1; 393 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 394 | INFOPLIST_FILE = FluentLayout/Info.plist; 395 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 396 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 397 | PRODUCT_BUNDLE_IDENTIFIER = com.weswickwire.FluentLayout; 398 | PRODUCT_NAME = "$(TARGET_NAME)"; 399 | SKIP_INSTALL = YES; 400 | SWIFT_VERSION = 3.0; 401 | }; 402 | name = Release; 403 | }; 404 | F7F9A45B1E8710E600E5C50E /* Debug */ = { 405 | isa = XCBuildConfiguration; 406 | buildSettings = { 407 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 408 | DEVELOPMENT_TEAM = HSE59E2Q5U; 409 | INFOPLIST_FILE = FluentLayoutTests/Info.plist; 410 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 411 | PRODUCT_BUNDLE_IDENTIFIER = com.weswickwire.FluentLayoutTests; 412 | PRODUCT_NAME = "$(TARGET_NAME)"; 413 | SWIFT_VERSION = 3.0; 414 | }; 415 | name = Debug; 416 | }; 417 | F7F9A45C1E8710E600E5C50E /* Release */ = { 418 | isa = XCBuildConfiguration; 419 | buildSettings = { 420 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 421 | DEVELOPMENT_TEAM = HSE59E2Q5U; 422 | INFOPLIST_FILE = FluentLayoutTests/Info.plist; 423 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 424 | PRODUCT_BUNDLE_IDENTIFIER = com.weswickwire.FluentLayoutTests; 425 | PRODUCT_NAME = "$(TARGET_NAME)"; 426 | SWIFT_VERSION = 3.0; 427 | }; 428 | name = Release; 429 | }; 430 | /* End XCBuildConfiguration section */ 431 | 432 | /* Begin XCConfigurationList section */ 433 | F7F9A43D1E8710E600E5C50E /* Build configuration list for PBXProject "FluentLayout" */ = { 434 | isa = XCConfigurationList; 435 | buildConfigurations = ( 436 | F7F9A4551E8710E600E5C50E /* Debug */, 437 | F7F9A4561E8710E600E5C50E /* Release */, 438 | ); 439 | defaultConfigurationIsVisible = 0; 440 | defaultConfigurationName = Release; 441 | }; 442 | F7F9A4571E8710E600E5C50E /* Build configuration list for PBXNativeTarget "FluentLayout" */ = { 443 | isa = XCConfigurationList; 444 | buildConfigurations = ( 445 | F7F9A4581E8710E600E5C50E /* Debug */, 446 | F7F9A4591E8710E600E5C50E /* Release */, 447 | ); 448 | defaultConfigurationIsVisible = 0; 449 | defaultConfigurationName = Release; 450 | }; 451 | F7F9A45A1E8710E600E5C50E /* Build configuration list for PBXNativeTarget "FluentLayoutTests" */ = { 452 | isa = XCConfigurationList; 453 | buildConfigurations = ( 454 | F7F9A45B1E8710E600E5C50E /* Debug */, 455 | F7F9A45C1E8710E600E5C50E /* Release */, 456 | ); 457 | defaultConfigurationIsVisible = 0; 458 | defaultConfigurationName = Release; 459 | }; 460 | /* End XCConfigurationList section */ 461 | }; 462 | rootObject = F7F9A43A1E8710E600E5C50E /* Project object */; 463 | } 464 | -------------------------------------------------------------------------------- /FluentLayout.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FluentLayout/FluentLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // FluentLayout.h 3 | // FluentLayout 4 | // 5 | // Created by Wes on 3/25/17. 6 | // Copyright © 2017 weswickwire. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for FluentLayout. 12 | FOUNDATION_EXPORT double FluentLayoutVersionNumber; 13 | 14 | //! Project version string for FluentLayout. 15 | FOUNDATION_EXPORT const unsigned char FluentLayoutVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /FluentLayout/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 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /FluentLayout/Layout.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | 5 | open class Layout: UIStackView { 6 | 7 | public init() { 8 | super.init(frame: .zero) 9 | initializeView() 10 | } 11 | 12 | public override init(frame: CGRect) { 13 | super.init(frame: frame) 14 | } 15 | 16 | public required init(coder: NSCoder) { 17 | fatalError("init(coder:) has not been implemented") 18 | } 19 | 20 | internal func initializeView() { 21 | 22 | axis = .vertical 23 | alignment = .fill 24 | distribution = .fill 25 | spacing = LayoutDefaults.spacing 26 | } 27 | 28 | 29 | // Serves no other purpose as a syntax helper 30 | public func create(axis: UILayoutConstraintAxis = .vertical, alignment: UIStackViewAlignment = .fill, distribution: UIStackViewDistribution = .fill, spacing: CGFloat = LayoutDefaults.spacing, create: ((Layout) -> Void)?) { 31 | 32 | self.axis = axis 33 | self.alignment = alignment 34 | self.distribution = distribution 35 | self.spacing = spacing 36 | 37 | if let c = create { 38 | c(self) 39 | } 40 | } 41 | 42 | 43 | 44 | // MARK: Sections 45 | 46 | public func addSection(title: String? = nil, axis: UILayoutConstraintAxis = .vertical, alignment: UIStackViewAlignment = .fill, distribution: UIStackViewDistribution = .fill, spacing: CGFloat = LayoutDefaults.sectionSpacing, create: ((LayoutSection) -> Void)? = nil) { 47 | 48 | let section = LayoutSection() 49 | section.layout.axis = axis 50 | section.layout.alignment = alignment 51 | section.layout.distribution = distribution 52 | section.layout.spacing = spacing 53 | 54 | if let t = title { 55 | section.addTitleLabel(text: t) 56 | } 57 | 58 | if let c = create { 59 | c(section) 60 | } 61 | 62 | addArrangedSubview(section) 63 | } 64 | 65 | 66 | 67 | 68 | // MARK: UI Components 69 | 70 | @discardableResult 71 | public func add(view: TView) -> TView { 72 | 73 | addArrangedSubview(view) 74 | return view 75 | } 76 | 77 | @discardableResult 78 | public func addLabel(text: String) -> UILabel { 79 | 80 | let label = LayoutDefaults.defaultControls.createLabel() 81 | label.text = text 82 | addArrangedSubview(label) 83 | return label 84 | } 85 | 86 | @discardableResult 87 | public func addTitleLabel(text: String) -> UILabel { 88 | 89 | let label = LayoutDefaults.defaultControls.createTitleLabel() 90 | label.text = text 91 | return add(view: label) 92 | } 93 | 94 | @discardableResult 95 | public func addTextField(text: String? = nil, placeholder: String? = nil) -> UITextField { 96 | 97 | let field = LayoutDefaults.defaultControls.createTextField() 98 | field.text = text 99 | field.placeholder = placeholder 100 | return add(view: field) 101 | } 102 | 103 | @discardableResult 104 | public func addButton(title: String? = nil, image: String? = nil) -> UIButton { 105 | 106 | let button = LayoutDefaults.defaultControls.createButton() 107 | 108 | if let t = title { 109 | button.setTitle(t, for: .normal) 110 | } 111 | 112 | if let i = image { 113 | button.setImage(UIImage(named: i), for: .normal) 114 | } 115 | 116 | return add(view: button) 117 | } 118 | 119 | @discardableResult 120 | public func addImage(named: String? = nil, contentMode: UIViewContentMode = .scaleAspectFit) -> UIImageView { 121 | 122 | let image = LayoutDefaults.defaultControls.createImage() 123 | image.contentMode = contentMode 124 | add(view: image) 125 | 126 | if let i = named { 127 | image.image = UIImage(named: i) 128 | } 129 | 130 | return image 131 | } 132 | 133 | @discardableResult 134 | public func addTextView() -> UITextView { 135 | 136 | let text = LayoutDefaults.defaultControls.createTextView() 137 | return add(view: text) 138 | } 139 | 140 | @discardableResult 141 | public func addFelxibleSpacing() -> UIView { 142 | 143 | let spacing = UIView() 144 | spacing.clipsToBounds = true 145 | spacing.backgroundColor = .clear 146 | spacing.setContentCompressionResistancePriority(1, for: .horizontal) 147 | spacing.setContentCompressionResistancePriority(1, for: .vertical) 148 | return add(view: spacing) 149 | } 150 | 151 | 152 | 153 | 154 | // MARK: Stacks 155 | 156 | @discardableResult 157 | public func addStack(axis: UILayoutConstraintAxis = .horizontal, alignment: UIStackViewAlignment = .fill, distribution: UIStackViewDistribution = .fill, spacing: CGFloat = LayoutDefaults.spacing, create: ((Layout) -> Void)?) -> Layout { 158 | 159 | let group = Layout() 160 | group.axis = axis 161 | group.alignment = alignment 162 | group.distribution = distribution 163 | group.spacing = spacing 164 | add(view: group) 165 | 166 | if let c = create { 167 | c(group) 168 | } 169 | 170 | return group 171 | } 172 | } 173 | -------------------------------------------------------------------------------- /FluentLayout/LayoutConstraints.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | 5 | public extension UIView { 6 | 7 | // MARK: Autolayout Extensions 8 | 9 | @discardableResult 10 | func pinToSuperview(top: CGFloat? = nil, bottom: CGFloat? = nil, left: CGFloat? = nil, right: CGFloat? = nil) -> UIView { 11 | 12 | if (self.superview == nil) { 13 | return self 14 | } 15 | 16 | self.translatesAutoresizingMaskIntoConstraints = false 17 | 18 | if let constant = top { 19 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 20 | attribute: .top, 21 | relatedBy: .equal, 22 | toItem: self.superview, 23 | attribute: .top, 24 | multiplier: 1, 25 | constant: constant)) 26 | } 27 | 28 | if let constant = bottom { 29 | self.superview!.addConstraint(NSLayoutConstraint(item: self.superview!, 30 | attribute: .bottom, 31 | relatedBy: .equal, 32 | toItem: self, 33 | attribute: .bottom, 34 | multiplier: 1, 35 | constant: constant)) 36 | } 37 | 38 | if let constant = left { 39 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 40 | attribute: .left, 41 | relatedBy: .equal, 42 | toItem: self.superview, 43 | attribute: .left, 44 | multiplier: 1, 45 | constant: constant)) 46 | } 47 | 48 | if let constant = right { 49 | self.superview!.addConstraint(NSLayoutConstraint(item: self.superview!, 50 | attribute: .right, 51 | relatedBy: .equal, 52 | toItem: self, 53 | attribute: .right, 54 | multiplier: 1, 55 | constant: constant)) 56 | } 57 | 58 | return self 59 | } 60 | 61 | @discardableResult 62 | func equalWidthTo(view: UIView) -> UIView { 63 | 64 | self.translatesAutoresizingMaskIntoConstraints = false 65 | 66 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 67 | attribute: .width, 68 | relatedBy: .equal, 69 | toItem: view, 70 | attribute: .width, 71 | multiplier: 1, 72 | constant: 0)) 73 | 74 | return self 75 | } 76 | 77 | @discardableResult 78 | func equalHeightTo(view: UIView) -> UIView { 79 | 80 | self.translatesAutoresizingMaskIntoConstraints = false 81 | 82 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 83 | attribute: .height, 84 | relatedBy: .equal, 85 | toItem: view, 86 | attribute: .height, 87 | multiplier: 1, 88 | constant: 0)) 89 | 90 | return self 91 | } 92 | 93 | @discardableResult 94 | func pin(aspectRatio: CGFloat) -> UIView { 95 | 96 | self.translatesAutoresizingMaskIntoConstraints = false 97 | 98 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 99 | attribute: .height, 100 | relatedBy: .equal, 101 | toItem: self, 102 | attribute: .width, 103 | multiplier: aspectRatio, 104 | constant: 0)) 105 | 106 | return self 107 | } 108 | 109 | @discardableResult 110 | func pin(size: CGSize) -> UIView { 111 | 112 | self.pin(width: size.width) 113 | self.pin(height: size.height) 114 | return self 115 | } 116 | 117 | @discardableResult 118 | func pin(width: CGFloat) -> UIView { 119 | 120 | self.translatesAutoresizingMaskIntoConstraints = false 121 | 122 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 123 | attribute: .width, 124 | relatedBy: .equal, 125 | toItem: nil, 126 | attribute: .notAnAttribute, 127 | multiplier: 1, 128 | constant: width)) 129 | 130 | return self 131 | } 132 | 133 | @discardableResult 134 | func pin(height: CGFloat) -> UIView { 135 | 136 | self.translatesAutoresizingMaskIntoConstraints = false 137 | 138 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 139 | attribute: .height, 140 | relatedBy: .equal, 141 | toItem: nil, 142 | attribute: .notAnAttribute, 143 | multiplier: 1, 144 | constant: height)) 145 | 146 | return self 147 | } 148 | 149 | @discardableResult 150 | func pinToLeftOf(view: UIView, constant: CGFloat = 0) -> UIView { 151 | 152 | self.translatesAutoresizingMaskIntoConstraints = false 153 | 154 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 155 | attribute: .right, 156 | relatedBy: .equal, 157 | toItem: view, 158 | attribute: .left, 159 | multiplier: 1, 160 | constant: constant)) 161 | 162 | return self 163 | } 164 | 165 | @discardableResult 166 | func pinToRightOf(view: UIView, constant: CGFloat = 0) -> UIView { 167 | 168 | self.translatesAutoresizingMaskIntoConstraints = false 169 | 170 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 171 | attribute: .left, 172 | relatedBy: .equal, 173 | toItem: view, 174 | attribute: .right, 175 | multiplier: 1, 176 | constant: constant)) 177 | 178 | return self 179 | } 180 | 181 | @discardableResult 182 | func pinAbove(view: UIView, constant: CGFloat = 0) -> UIView { 183 | 184 | self.translatesAutoresizingMaskIntoConstraints = false 185 | 186 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 187 | attribute: .bottom, 188 | relatedBy: .equal, 189 | toItem: view, 190 | attribute: .top, 191 | multiplier: 1, 192 | constant: constant)) 193 | 194 | return self 195 | } 196 | 197 | @discardableResult 198 | func pinBelow(view: UIView, constant: CGFloat = 0) -> UIView { 199 | 200 | self.translatesAutoresizingMaskIntoConstraints = false 201 | 202 | self.superview!.addConstraint(NSLayoutConstraint(item: view, 203 | attribute: .bottom, 204 | relatedBy: .equal, 205 | toItem: self, 206 | attribute: .top, 207 | multiplier: 1, 208 | constant: constant)) 209 | 210 | return self 211 | } 212 | 213 | @discardableResult 214 | func alignCenterXTo(view: UIView, constant: CGFloat = 0) -> UIView { 215 | 216 | self.translatesAutoresizingMaskIntoConstraints = false 217 | 218 | self.superview!.addConstraint(NSLayoutConstraint(item: view, 219 | attribute: .centerX, 220 | relatedBy: .equal, 221 | toItem: self, 222 | attribute: .centerX, 223 | multiplier: 1, 224 | constant: constant)) 225 | 226 | return self 227 | } 228 | 229 | @discardableResult 230 | func alignCenterYTo(view: UIView, constant: CGFloat = 0) -> UIView { 231 | 232 | self.translatesAutoresizingMaskIntoConstraints = false 233 | 234 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 235 | attribute: .centerY, 236 | relatedBy: .equal, 237 | toItem: view, 238 | attribute: .centerY, 239 | multiplier: 1, 240 | constant: constant)) 241 | 242 | return self 243 | } 244 | 245 | @discardableResult 246 | func align(_ selfAttribute: NSLayoutAttribute, toView: UIView, attribute: NSLayoutAttribute) -> UIView { 247 | 248 | self.translatesAutoresizingMaskIntoConstraints = false 249 | 250 | self.superview!.addConstraint(NSLayoutConstraint(item: self, 251 | attribute: selfAttribute, 252 | relatedBy: .equal, 253 | toItem: toView, 254 | attribute: attribute, 255 | multiplier: 1, 256 | constant: 0)) 257 | 258 | return self 259 | } 260 | 261 | @discardableResult 262 | func alignCenterTo(view: UIView) -> UIView { 263 | self.alignCenterXTo(view: view) 264 | self.alignCenterYTo(view: view) 265 | return self 266 | } 267 | 268 | 269 | // MARK: UIView property extensions 270 | 271 | @discardableResult 272 | func setCompressionResistance(horizontal: Float? = nil, vertical: Float? = nil) -> UIView { 273 | 274 | if let h = horizontal { 275 | self.setContentCompressionResistancePriority(h, for: .horizontal) 276 | } 277 | 278 | if let v = vertical { 279 | self.setContentCompressionResistancePriority(v, for: .vertical) 280 | } 281 | 282 | return self 283 | } 284 | 285 | @discardableResult 286 | func setContentHugging(horizontal: Float? = nil, vertical: Float? = nil) -> UIView { 287 | 288 | if let h = horizontal { 289 | self.setContentHuggingPriority(h, for: .horizontal) 290 | } 291 | 292 | if let v = vertical { 293 | self.setContentHuggingPriority(v, for: .vertical) 294 | } 295 | 296 | return self 297 | } 298 | } 299 | 300 | 301 | 302 | public extension UIImageView { 303 | 304 | @discardableResult 305 | func pinImageAspectRatio() -> UIImageView { 306 | 307 | if (self.image != nil && self.image!.size.width != 0) { 308 | self.pin(aspectRatio: self.image!.size.height / self.image!.size.width) 309 | } 310 | 311 | return self 312 | } 313 | 314 | } 315 | -------------------------------------------------------------------------------- /FluentLayout/LayoutDefaultControlCreator.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | 5 | internal class LayoutDefaultControlCreator: LayoutDefaultControls { 6 | 7 | func createLabel() -> UILabel { 8 | let label = UILabel() 9 | label.font = UIFont.systemFont(ofSize: 15, weight: UIFontWeightLight) 10 | label.numberOfLines = 0 11 | label.lineBreakMode = .byCharWrapping 12 | return label 13 | } 14 | 15 | func createTitleLabel() -> UILabel { 16 | let label = UILabel() 17 | label.font = UIFont.systemFont(ofSize: 17, weight: UIFontWeightRegular) 18 | return label 19 | } 20 | 21 | func createTextField() -> UITextField { 22 | let textField = LayoutTextField() 23 | textField.backgroundColor = UIColor(colorLiteralRed: 0.94, green: 0.94, blue: 0.94, alpha: 1.0) 24 | textField.layer.cornerRadius = 4 25 | return textField 26 | } 27 | 28 | func createButton() -> UIButton { 29 | let button = UIButton() 30 | button.backgroundColor = .gray 31 | button.layer.cornerRadius = 4 32 | button.setTitleColor(.white, for: .normal) 33 | return button 34 | } 35 | 36 | func createTextView() -> UITextView { 37 | let textView = UITextView() 38 | textView.backgroundColor = UIColor(colorLiteralRed: 0.94, green: 0.94, blue: 0.94, alpha: 1.0) 39 | textView.layer.cornerRadius = 4 40 | return textView 41 | } 42 | 43 | func createImage() -> UIImageView { 44 | return UIImageView() 45 | } 46 | 47 | } 48 | 49 | 50 | 51 | 52 | private class LayoutTextField: UITextField { 53 | 54 | let padding = UIEdgeInsets(top: 5, left: 5, bottom: 5, right: 5); 55 | 56 | override func textRect(forBounds bounds: CGRect) -> CGRect { 57 | return UIEdgeInsetsInsetRect(bounds, padding) 58 | } 59 | 60 | override func placeholderRect(forBounds bounds: CGRect) -> CGRect { 61 | return UIEdgeInsetsInsetRect(bounds, padding) 62 | } 63 | 64 | override func editingRect(forBounds bounds: CGRect) -> CGRect { 65 | return UIEdgeInsetsInsetRect(bounds, padding) 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /FluentLayout/LayoutDefaultControls.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import UIKit 3 | 4 | 5 | 6 | public protocol LayoutDefaultControls { 7 | 8 | func createLabel() -> UILabel 9 | 10 | func createTitleLabel() -> UILabel 11 | 12 | func createTextField() -> UITextField 13 | 14 | func createTextView() -> UITextView 15 | 16 | func createButton() -> UIButton 17 | 18 | func createImage() -> UIImageView 19 | 20 | } 21 | -------------------------------------------------------------------------------- /FluentLayout/LayoutDefaults.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | 5 | public class LayoutDefaults { 6 | 7 | public static var defaultControls: LayoutDefaultControls = LayoutDefaultControlCreator() 8 | 9 | 10 | // MARK: Colors 11 | 12 | public static var backgroundColor: UIColor = .init(colorLiteralRed: 0.96, green: 0.96, blue: 0.96, alpha: 1.0) 13 | 14 | public static var sectionBackgroundColor: UIColor = .white 15 | 16 | public static var sectionBorderColor: UIColor = .init(colorLiteralRed: 0.9, green: 0.9, blue: 0.9, alpha: 1.0) 17 | 18 | 19 | // MARK: Layout Valibles 20 | 21 | public static var padding: UIEdgeInsets = UIEdgeInsetsMake(12, 12, 12, 12) 22 | 23 | public static var sectionPadding: UIEdgeInsets = UIEdgeInsetsMake(8, 8, 8, 8) 24 | 25 | public static var spacing: CGFloat = 12 26 | 27 | public static var sectionBorderWidth: CGFloat = 1 28 | 29 | public static var sectionSpacing: CGFloat = 4 30 | } 31 | -------------------------------------------------------------------------------- /FluentLayout/LayoutExtensions.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | /* 5 | There are views that own a layout object. Without these they would have to do .layout 6 | Having them as extensions centralizes them. 7 | As of now these are used by LayoutScrollable and LayoutSection 8 | 9 | Note: addSection is not in here on purpose. As of now seems useless 10 | to have the sections be able to add sections 11 | */ 12 | extension LayoutOwner { 13 | 14 | public func create(axis: UILayoutConstraintAxis = .vertical, alignment: UIStackViewAlignment = .fill, distribution: UIStackViewDistribution = .fill, spacing: CGFloat = LayoutDefaults.spacing, create: ((Layout) -> Void)?) { 15 | self.layout.create(axis: axis, alignment: alignment, distribution: distribution, spacing: spacing, create: create) 16 | } 17 | 18 | @discardableResult 19 | public func add(view: TView) -> TView { 20 | return self.layout.add(view: view) 21 | } 22 | 23 | @discardableResult 24 | public func addLabel(text: String) -> UILabel { 25 | return self.layout.addLabel(text: text) 26 | } 27 | 28 | @discardableResult 29 | public func addTitleLabel(text: String) -> UILabel { 30 | return self.layout.addTitleLabel(text: text) 31 | } 32 | 33 | @discardableResult 34 | public func addTextField() -> UITextField { 35 | return self.layout.addTextField() 36 | } 37 | 38 | @discardableResult 39 | public func addStack(axis: UILayoutConstraintAxis = .horizontal, alignment: UIStackViewAlignment = .fill, distribution: UIStackViewDistribution = .fill, spacing: CGFloat = 8, create: ((Layout) -> Void)?) -> Layout { 40 | return self.layout.addStack(axis: axis, alignment: alignment, distribution: distribution, spacing: spacing, create: create) 41 | } 42 | 43 | @discardableResult 44 | public func addButton(title: String) -> UIButton { 45 | return self.layout.addButton(title: title) 46 | } 47 | 48 | @discardableResult 49 | public func addImage(named: String? = nil) -> UIImageView { 50 | return self.layout.addImage(named: named) 51 | } 52 | 53 | @discardableResult 54 | public func addTextView() -> UITextView { 55 | return self.layout.addTextView() 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /FluentLayout/LayoutOwner.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | /* 5 | For Views that have a layout object. Allows use of extension methods for easier 6 | access to the layout object 7 | */ 8 | public protocol LayoutOwner { 9 | 10 | var layout: Layout { get set } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /FluentLayout/LayoutScrollable.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | 5 | open class LayoutScrollable: UIScrollView, LayoutOwner { 6 | 7 | // From LayoutOwner protocol 8 | public var layout: Layout = Layout() 9 | 10 | // ScrollView content view 11 | let contentView = UIView() 12 | 13 | // Contraints for the layout. Modified by layoutInsets 14 | var topConstraint: NSLayoutConstraint? = nil 15 | var bottomConstraint: NSLayoutConstraint? = nil 16 | var leftConstraint: NSLayoutConstraint? = nil 17 | var rightConstraint: NSLayoutConstraint? = nil 18 | 19 | 20 | 21 | public init() { 22 | super.init(frame: .zero) 23 | initializeView() 24 | } 25 | 26 | public override init(frame: CGRect) { 27 | super.init(frame: frame) 28 | } 29 | 30 | public required init?(coder aDecoder: NSCoder) { 31 | super.init(coder: aDecoder) 32 | } 33 | 34 | 35 | 36 | public var _layoutInsets: UIEdgeInsets = LayoutDefaults.padding 37 | public var layoutInsets: UIEdgeInsets { 38 | set { 39 | _layoutInsets = newValue 40 | applyLayoutInsets() 41 | } 42 | get { 43 | return _layoutInsets 44 | } 45 | } 46 | 47 | 48 | 49 | private func initializeView() { 50 | 51 | contentView.backgroundColor = .clear 52 | backgroundColor = LayoutDefaults.backgroundColor 53 | 54 | addSubview(contentView) 55 | contentView.addSubview(layout) 56 | 57 | contentView.pinToSuperview(top: 0, bottom: 0, left: 0, right: 0) 58 | .equalWidthTo(view: self) 59 | 60 | layout.translatesAutoresizingMaskIntoConstraints = false 61 | 62 | topConstraint = NSLayoutConstraint(item: layout, 63 | attribute: .top, 64 | relatedBy: .equal, 65 | toItem: contentView, 66 | attribute: .top, 67 | multiplier: 1, 68 | constant: layoutInsets.top) 69 | 70 | bottomConstraint = NSLayoutConstraint(item: contentView, 71 | attribute: .bottom, 72 | relatedBy: .greaterThanOrEqual, 73 | toItem: layout, 74 | attribute: .bottom, 75 | multiplier: 1, 76 | constant: layoutInsets.bottom) 77 | 78 | leftConstraint = NSLayoutConstraint(item: layout, 79 | attribute: .left, 80 | relatedBy: .equal, 81 | toItem: contentView, 82 | attribute: .left, 83 | multiplier: 1, 84 | constant: layoutInsets.left) 85 | 86 | rightConstraint = NSLayoutConstraint(item: contentView, 87 | attribute: .right, 88 | relatedBy: .equal, 89 | toItem: layout, 90 | attribute: .right, 91 | multiplier: 1, 92 | constant: layoutInsets.right) 93 | 94 | contentView.addConstraints([topConstraint!, bottomConstraint!, leftConstraint!, rightConstraint!]) 95 | } 96 | 97 | private func applyLayoutInsets() { 98 | topConstraint?.constant = layoutInsets.top 99 | bottomConstraint?.constant = layoutInsets.bottom 100 | leftConstraint?.constant = layoutInsets.left 101 | rightConstraint?.constant = layoutInsets.right 102 | } 103 | 104 | public func addSection(title: String? = nil, create: ((LayoutSection) -> Void)? = nil) { 105 | layout.addSection(title: title, create: create) 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /FluentLayout/LayoutSection.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | /* 4 | Layout sections are 'blocks' in the UI that are separated from the rest. 5 | Usually have a differnt background color than its superview 6 | */ 7 | open class LayoutSection: UIView, LayoutOwner { 8 | 9 | public var layout: Layout = Layout() 10 | 11 | public override init(frame: CGRect) { 12 | super.init(frame: frame) 13 | 14 | addSubview(layout) 15 | 16 | layout.pinToSuperview(top: LayoutDefaults.sectionPadding.top, 17 | bottom: LayoutDefaults.sectionPadding.bottom, 18 | left: LayoutDefaults.sectionPadding.left, 19 | right: LayoutDefaults.sectionPadding.right) 20 | 21 | backgroundColor = LayoutDefaults.sectionBackgroundColor 22 | layer.borderColor = LayoutDefaults.sectionBorderColor.cgColor 23 | layer.borderWidth = LayoutDefaults.sectionBorderWidth 24 | } 25 | 26 | public required init?(coder aDecoder: NSCoder) { 27 | fatalError("init(coder:) has not been implemented") 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /FluentLayout/LayoutViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | 4 | 5 | /* 6 | View controller class where the view of the view controller is a LayoutScrollable object 7 | */ 8 | open class LayoutViewController: UIViewController { 9 | 10 | public let layout = LayoutScrollable() 11 | 12 | override open func loadView() { 13 | self.view = layout 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /FluentLayoutTests/FluentLayoutTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FluentLayoutTests.swift 3 | // FluentLayoutTests 4 | // 5 | // Created by Wes on 3/25/17. 6 | // Copyright © 2017 weswickwire. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import FluentLayout 11 | 12 | class FluentLayoutTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /FluentLayoutTests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Wesley Wickwire 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 | # FluentLayout 2 | 3 | ![Swift 3.0.1](https://img.shields.io/badge/Swift-3.0.1-green.svg) 4 | [![CocoaPods compatible](https://img.shields.io/cocoapods/v/FluentLayout.svg)](#cocoapods) 5 | [![License](http://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org) 6 | 7 | ## Overview 8 | 9 | FluentLayout's primary goal is to provide a simple, readable way to write UI code in Swift. Not using storyboards and doing all UI work all in code can be very daunting and get very complex very quickly. 10 | 11 | A `Layout` is just a UIStackView under the covers with some nicer syntax and helpers on top. 12 | 13 | In FluentLayout there is the concept of a section in the UI. All a section is, is just a simple way of breaking up a section to the UI of related items into it's own part with a different background color. 14 | 15 | ## Usage 16 | 17 | For example if we were creating a new social media app and at the top of the want the following profile header: 18 | 19 | 20 | 21 | First we would create the layout and controls. Then add the layout to the view and add constraints for its top, left, and right edges. 22 | Note: the controls are not added to the layout yet. 23 | 24 | ```swift 25 | let layout = Layout() 26 | view.addSubview(layout) 27 | layout.pinToSuperview(top: 12, left: 12, right: 12) 28 | 29 | let profilePicture = UIImageView() 30 | profilePicture = UIImage(named: "ProfilePicture") 31 | 32 | let name = UILabel() 33 | name.text = "Wes Wickwire" 34 | name.font = UIFont.systemFont(ofSize: 15) 35 | 36 | let title = UILabel() 37 | title.text = "Last online 8 hrs ago" 38 | title.textColor = .lightGray 39 | title.font = UIFont.systemFont(ofSize: 13, weight: UIFontWeightLight) 40 | ``` 41 | 42 | On the layout we can call `layout.addSection` then in a closure layout the section. 43 | 44 | ```swift 45 | layout.addSection { 46 | $0.addStack(axis: .horizontal, alignment: .top, spacing: 8) { 47 | 48 | $0.add(view: profilePicture).pin(size: CGSize(width: 50, height: 50)) 49 | 50 | $0.addStack(axis: .vertical, spacing: 0) { 51 | $0.add(view: name) 52 | $0.add(view: title) 53 | } 54 | } 55 | } 56 | ``` 57 | 58 | All default colors, spacings, and insets can be changed from the `LayoutDefaults` class. 59 | 60 | For customizing the default controls (e.g. using methods like `layout.addLabel(text:)`) create a new class that conforms to the protocol `LayoutDefaultControls` and set `LayoutDefaults.defaultControls` to an instance of your new class. It will then use that to create all controls. Use of this class is not needed at all, provided as a ease of use to quickly add UI elements. 61 | 62 | ## Example 63 | 64 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 65 | 66 | In the exmaple project, the following view is created. 67 | 68 | 69 | 70 | The code below creates the view above. 71 | 72 | ```swift 73 | layout.create(spacing: 12) { 74 | 75 | // Top Title 76 | $0.addSection(title: "Lorem Ipsum") 77 | 78 | // Main Image, keep ratio of image 79 | $0.addImage(named: "snow.png").pinImageAspectRatio() 80 | 81 | // This section holds post information 82 | $0.addSection { 83 | 84 | // Group to contain the title, time stamp and heart 85 | $0.addStack(alignment: .center, spacing: 0) { 86 | 87 | // Title and time stamp should be on top of each other 88 | $0.addStack(axis: .vertical, spacing: 0) { 89 | $0.addTitleLabel(text: "Neque Porro Quisquam") 90 | 91 | // Add custom label 92 | $0.add(view: createdTime) 93 | } 94 | 95 | // Add heart button but pin width to 44 96 | $0.add(view: heartButton).pin(width: 44) 97 | } 98 | 99 | // add post body 100 | $0.addLabel(text: loremIpsum) 101 | } 102 | } 103 | ``` 104 | 105 | ## Requirements 106 | * Xcode 8.0 107 | * Swift 3.0+ 108 | 109 | ## Installation 110 | 111 | FluentLayout is available through [CocoaPods](http://cocoapods.org). To install 112 | it, simply add the following line to your Podfile: 113 | 114 | ```ruby 115 | pod 'FluentLayout' 116 | ``` 117 | ## Contributions 118 | 119 | Contributions are welcome and encouraged! 120 | 121 | ## Author 122 | 123 | Wesley Wickwire, wickwirew@gmail.com 124 | 125 | ## License 126 | 127 | FluentLayout is available under the MIT license. See the LICENSE file for more info. 128 | --------------------------------------------------------------------------------