├── .gitignore ├── .travis.yml ├── Geometry.podspec ├── Geometry.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ ├── Geometry iOS.xcscheme │ └── Geometry tvOS.xcscheme ├── Geometry ├── Geometry.h ├── Info.plist └── UIView+Geometry.swift ├── GeometryTests ├── GeometryTests.swift └── Info.plist ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | DerivedData 3 | 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | 14 | *.xccheckout 15 | *.moved-aside 16 | *.xcuserstate 17 | *.xcscmblueprint 18 | 19 | *.hmap 20 | *.ipa 21 | 22 | Pods/ 23 | Carthage/Build -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode8.1 3 | env: 4 | global: 5 | - LC_CTYPE=en_US.UTF-8 6 | - LANG=en_US.UTF-8 7 | - PROJECT=Geometry.xcodeproj 8 | - IOS_FRAMEWORK_SCHEME="Geometry iOS" 9 | - TVOS_FRAMEWORK_SCHEME="Geometry tvOS" 10 | - IOS_SDK=iphonesimulator10.1 11 | - TVOS_SDK=appletvsimulator10.0 12 | 13 | matrix: 14 | - DESTINATION="OS=9.3,name=iPhone 4s" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" POD_LINT="YES" 15 | - DESTINATION="OS=10.1,name=iPhone 5" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" POD_LINT="NO" 16 | - DESTINATION="OS=10.1,name=iPhone 6" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" POD_LINT="NO" 17 | - DESTINATION="OS=10.1,name=iPhone 7" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" POD_LINT="NO" 18 | - DESTINATION="OS=10.0,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" SDK="$TVOS_SDK" RUN_TESTS="YES" POD_LINT="NO" 19 | 20 | before_install: 21 | - gem install slather -N 22 | - gem install cocoapods --pre --no-rdoc --no-ri --no-document --quiet 23 | 24 | script: 25 | - set -o pipefail 26 | - xcodebuild -version 27 | - xcodebuild -showsdks 28 | - instruments -s devices 29 | 30 | - if [ $RUN_TESTS == "YES" ]; then 31 | xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty; 32 | else 33 | xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; 34 | fi 35 | 36 | - if [ $RUN_TESTS == "YES" ]; then 37 | xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty; 38 | else 39 | xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty; 40 | fi 41 | 42 | - if [ $POD_LINT == "YES" ]; then 43 | pod lib lint; 44 | fi 45 | 46 | after_success: 47 | - ./coveralls.rb -x swift -e "HexColor iOS" 48 | 49 | notifications: 50 | email: false 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /Geometry.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'Geometry' 3 | s.version = '3.0.0' 4 | s.license = 'MIT' 5 | s.summary = 'Geometry is a UIView and CGRect extension that lets you work with view and rect geometry easier.' 6 | s.homepage = 'https://github.com/artman/Geometry' 7 | s.social_media_url = 'http://twitter.com/artman' 8 | s.authors = { 'Tuomas Artman' => 'tuomas@artman.fi' } 9 | s.source = { :git => 'https://github.com/artman/Geometry.git', :tag => s.version } 10 | 11 | s.ios.deployment_target = '8.0' 12 | s.tvos.deployment_target = '9.0' 13 | 14 | s.source_files = 'Geometry/*.swift' 15 | 16 | s.requires_arc = true 17 | end 18 | -------------------------------------------------------------------------------- /Geometry.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 725B95F41DFDEF58006118CA /* Geometry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 725B95EB1DFDEF58006118CA /* Geometry.framework */; }; 11 | 725B96101DFDEF77006118CA /* Geometry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 725B96071DFDEF77006118CA /* Geometry.framework */; }; 12 | 725B961E1DFDF055006118CA /* Geometry.h in Headers */ = {isa = PBXBuildFile; fileRef = 72879CBD19BD1F3B0015F977 /* Geometry.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 725B961F1DFDF055006118CA /* Geometry.h in Headers */ = {isa = PBXBuildFile; fileRef = 72879CBD19BD1F3B0015F977 /* Geometry.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14 | 725B96201DFDF05C006118CA /* UIView+Geometry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72879CD119BD1F480015F977 /* UIView+Geometry.swift */; }; 15 | 725B96211DFDF05D006118CA /* UIView+Geometry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72879CD119BD1F480015F977 /* UIView+Geometry.swift */; }; 16 | 725B96221DFDF060006118CA /* GeometryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72879CC719BD1F3B0015F977 /* GeometryTests.swift */; }; 17 | 725B96231DFDF061006118CA /* GeometryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72879CC719BD1F3B0015F977 /* GeometryTests.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | 725B95F51DFDEF58006118CA /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = 72879CAF19BD1F3A0015F977 /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = 725B95EA1DFDEF58006118CA; 26 | remoteInfo = "Geometry tvOS"; 27 | }; 28 | 725B96111DFDEF77006118CA /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = 72879CAF19BD1F3A0015F977 /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 725B96061DFDEF77006118CA; 33 | remoteInfo = "Geometry iOS"; 34 | }; 35 | /* End PBXContainerItemProxy section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | 7207F69D1BC076E20018256C /* Geometry.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = Geometry.podspec; sourceTree = ""; }; 39 | 725B95EB1DFDEF58006118CA /* Geometry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Geometry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 725B95F31DFDEF58006118CA /* Geometry tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Geometry tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 725B96071DFDEF77006118CA /* Geometry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Geometry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 725B960F1DFDEF77006118CA /* Geometry iOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Geometry iOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 72879CBC19BD1F3B0015F977 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 44 | 72879CBD19BD1F3B0015F977 /* Geometry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Geometry.h; sourceTree = ""; }; 45 | 72879CC619BD1F3B0015F977 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 46 | 72879CC719BD1F3B0015F977 /* GeometryTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeometryTests.swift; sourceTree = ""; }; 47 | 72879CD119BD1F480015F977 /* UIView+Geometry.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Geometry.swift"; sourceTree = ""; }; 48 | 72A3F8161B818AFD003A946C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 49 | 72A3F8181B818B02003A946C /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 725B95E71DFDEF58006118CA /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | ); 58 | runOnlyForDeploymentPostprocessing = 0; 59 | }; 60 | 725B95F01DFDEF58006118CA /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | 725B95F41DFDEF58006118CA /* Geometry.framework in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | 725B96031DFDEF77006118CA /* Frameworks */ = { 69 | isa = PBXFrameworksBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | 725B960C1DFDEF77006118CA /* Frameworks */ = { 76 | isa = PBXFrameworksBuildPhase; 77 | buildActionMask = 2147483647; 78 | files = ( 79 | 725B96101DFDEF77006118CA /* Geometry.framework in Frameworks */, 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | /* End PBXFrameworksBuildPhase section */ 84 | 85 | /* Begin PBXGroup section */ 86 | 7207F69C1BC076D40018256C /* Frameworks */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 72A3F8181B818B02003A946C /* UIKit.framework */, 90 | 72A3F8161B818AFD003A946C /* Foundation.framework */, 91 | ); 92 | name = Frameworks; 93 | sourceTree = ""; 94 | }; 95 | 72879CAE19BD1F3A0015F977 = { 96 | isa = PBXGroup; 97 | children = ( 98 | 7207F69D1BC076E20018256C /* Geometry.podspec */, 99 | 72879CBA19BD1F3B0015F977 /* Geometry */, 100 | 72879CC419BD1F3B0015F977 /* GeometryTests */, 101 | 7207F69C1BC076D40018256C /* Frameworks */, 102 | 72879CB919BD1F3B0015F977 /* Products */, 103 | ); 104 | sourceTree = ""; 105 | }; 106 | 72879CB919BD1F3B0015F977 /* Products */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 725B95EB1DFDEF58006118CA /* Geometry.framework */, 110 | 725B95F31DFDEF58006118CA /* Geometry tvOSTests.xctest */, 111 | 725B96071DFDEF77006118CA /* Geometry.framework */, 112 | 725B960F1DFDEF77006118CA /* Geometry iOS Tests.xctest */, 113 | ); 114 | name = Products; 115 | sourceTree = ""; 116 | }; 117 | 72879CBA19BD1F3B0015F977 /* Geometry */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 72879CBB19BD1F3B0015F977 /* Supporting Files */, 121 | 72879CBD19BD1F3B0015F977 /* Geometry.h */, 122 | 72879CD119BD1F480015F977 /* UIView+Geometry.swift */, 123 | ); 124 | path = Geometry; 125 | sourceTree = ""; 126 | }; 127 | 72879CBB19BD1F3B0015F977 /* Supporting Files */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 72879CBC19BD1F3B0015F977 /* Info.plist */, 131 | ); 132 | name = "Supporting Files"; 133 | sourceTree = ""; 134 | }; 135 | 72879CC419BD1F3B0015F977 /* GeometryTests */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 72879CC719BD1F3B0015F977 /* GeometryTests.swift */, 139 | 72879CC519BD1F3B0015F977 /* Supporting Files */, 140 | ); 141 | path = GeometryTests; 142 | sourceTree = ""; 143 | }; 144 | 72879CC519BD1F3B0015F977 /* Supporting Files */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 72879CC619BD1F3B0015F977 /* Info.plist */, 148 | ); 149 | name = "Supporting Files"; 150 | sourceTree = ""; 151 | }; 152 | /* End PBXGroup section */ 153 | 154 | /* Begin PBXHeadersBuildPhase section */ 155 | 725B95E81DFDEF58006118CA /* Headers */ = { 156 | isa = PBXHeadersBuildPhase; 157 | buildActionMask = 2147483647; 158 | files = ( 159 | 725B961F1DFDF055006118CA /* Geometry.h in Headers */, 160 | ); 161 | runOnlyForDeploymentPostprocessing = 0; 162 | }; 163 | 725B96041DFDEF77006118CA /* Headers */ = { 164 | isa = PBXHeadersBuildPhase; 165 | buildActionMask = 2147483647; 166 | files = ( 167 | 725B961E1DFDF055006118CA /* Geometry.h in Headers */, 168 | ); 169 | runOnlyForDeploymentPostprocessing = 0; 170 | }; 171 | /* End PBXHeadersBuildPhase section */ 172 | 173 | /* Begin PBXNativeTarget section */ 174 | 725B95EA1DFDEF58006118CA /* Geometry tvOS */ = { 175 | isa = PBXNativeTarget; 176 | buildConfigurationList = 725B96001DFDEF58006118CA /* Build configuration list for PBXNativeTarget "Geometry tvOS" */; 177 | buildPhases = ( 178 | 725B95E61DFDEF58006118CA /* Sources */, 179 | 725B95E71DFDEF58006118CA /* Frameworks */, 180 | 725B95E81DFDEF58006118CA /* Headers */, 181 | 725B95E91DFDEF58006118CA /* Resources */, 182 | ); 183 | buildRules = ( 184 | ); 185 | dependencies = ( 186 | ); 187 | name = "Geometry tvOS"; 188 | productName = "Geometry tvOS"; 189 | productReference = 725B95EB1DFDEF58006118CA /* Geometry.framework */; 190 | productType = "com.apple.product-type.framework"; 191 | }; 192 | 725B95F21DFDEF58006118CA /* Geometry tvOSTests */ = { 193 | isa = PBXNativeTarget; 194 | buildConfigurationList = 725B96011DFDEF58006118CA /* Build configuration list for PBXNativeTarget "Geometry tvOSTests" */; 195 | buildPhases = ( 196 | 725B95EF1DFDEF58006118CA /* Sources */, 197 | 725B95F01DFDEF58006118CA /* Frameworks */, 198 | 725B95F11DFDEF58006118CA /* Resources */, 199 | ); 200 | buildRules = ( 201 | ); 202 | dependencies = ( 203 | 725B95F61DFDEF58006118CA /* PBXTargetDependency */, 204 | ); 205 | name = "Geometry tvOSTests"; 206 | productName = "Geometry tvOSTests"; 207 | productReference = 725B95F31DFDEF58006118CA /* Geometry tvOSTests.xctest */; 208 | productType = "com.apple.product-type.bundle.unit-test"; 209 | }; 210 | 725B96061DFDEF77006118CA /* Geometry iOS */ = { 211 | isa = PBXNativeTarget; 212 | buildConfigurationList = 725B96181DFDEF77006118CA /* Build configuration list for PBXNativeTarget "Geometry iOS" */; 213 | buildPhases = ( 214 | 725B96021DFDEF77006118CA /* Sources */, 215 | 725B96031DFDEF77006118CA /* Frameworks */, 216 | 725B96041DFDEF77006118CA /* Headers */, 217 | 725B96051DFDEF77006118CA /* Resources */, 218 | ); 219 | buildRules = ( 220 | ); 221 | dependencies = ( 222 | ); 223 | name = "Geometry iOS"; 224 | productName = "Geometry iOS"; 225 | productReference = 725B96071DFDEF77006118CA /* Geometry.framework */; 226 | productType = "com.apple.product-type.framework"; 227 | }; 228 | 725B960E1DFDEF77006118CA /* Geometry iOS Tests */ = { 229 | isa = PBXNativeTarget; 230 | buildConfigurationList = 725B961B1DFDEF77006118CA /* Build configuration list for PBXNativeTarget "Geometry iOS Tests" */; 231 | buildPhases = ( 232 | 725B960B1DFDEF77006118CA /* Sources */, 233 | 725B960C1DFDEF77006118CA /* Frameworks */, 234 | 725B960D1DFDEF77006118CA /* Resources */, 235 | ); 236 | buildRules = ( 237 | ); 238 | dependencies = ( 239 | 725B96121DFDEF77006118CA /* PBXTargetDependency */, 240 | ); 241 | name = "Geometry iOS Tests"; 242 | productName = "Geometry iOSTests"; 243 | productReference = 725B960F1DFDEF77006118CA /* Geometry iOS Tests.xctest */; 244 | productType = "com.apple.product-type.bundle.unit-test"; 245 | }; 246 | /* End PBXNativeTarget section */ 247 | 248 | /* Begin PBXProject section */ 249 | 72879CAF19BD1F3A0015F977 /* Project object */ = { 250 | isa = PBXProject; 251 | attributes = { 252 | LastSwiftUpdateCheck = 0810; 253 | LastUpgradeCheck = 0810; 254 | ORGANIZATIONNAME = "Tuomas Artman"; 255 | TargetAttributes = { 256 | 725B95EA1DFDEF58006118CA = { 257 | CreatedOnToolsVersion = 8.1; 258 | ProvisioningStyle = Automatic; 259 | }; 260 | 725B95F21DFDEF58006118CA = { 261 | CreatedOnToolsVersion = 8.1; 262 | ProvisioningStyle = Automatic; 263 | }; 264 | 725B96061DFDEF77006118CA = { 265 | CreatedOnToolsVersion = 8.1; 266 | ProvisioningStyle = Automatic; 267 | }; 268 | 725B960E1DFDEF77006118CA = { 269 | CreatedOnToolsVersion = 8.1; 270 | ProvisioningStyle = Automatic; 271 | }; 272 | }; 273 | }; 274 | buildConfigurationList = 72879CB219BD1F3A0015F977 /* Build configuration list for PBXProject "Geometry" */; 275 | compatibilityVersion = "Xcode 3.2"; 276 | developmentRegion = English; 277 | hasScannedForEncodings = 0; 278 | knownRegions = ( 279 | en, 280 | ); 281 | mainGroup = 72879CAE19BD1F3A0015F977; 282 | productRefGroup = 72879CB919BD1F3B0015F977 /* Products */; 283 | projectDirPath = ""; 284 | projectRoot = ""; 285 | targets = ( 286 | 725B96061DFDEF77006118CA /* Geometry iOS */, 287 | 725B960E1DFDEF77006118CA /* Geometry iOS Tests */, 288 | 725B95EA1DFDEF58006118CA /* Geometry tvOS */, 289 | 725B95F21DFDEF58006118CA /* Geometry tvOSTests */, 290 | ); 291 | }; 292 | /* End PBXProject section */ 293 | 294 | /* Begin PBXResourcesBuildPhase section */ 295 | 725B95E91DFDEF58006118CA /* Resources */ = { 296 | isa = PBXResourcesBuildPhase; 297 | buildActionMask = 2147483647; 298 | files = ( 299 | ); 300 | runOnlyForDeploymentPostprocessing = 0; 301 | }; 302 | 725B95F11DFDEF58006118CA /* Resources */ = { 303 | isa = PBXResourcesBuildPhase; 304 | buildActionMask = 2147483647; 305 | files = ( 306 | ); 307 | runOnlyForDeploymentPostprocessing = 0; 308 | }; 309 | 725B96051DFDEF77006118CA /* Resources */ = { 310 | isa = PBXResourcesBuildPhase; 311 | buildActionMask = 2147483647; 312 | files = ( 313 | ); 314 | runOnlyForDeploymentPostprocessing = 0; 315 | }; 316 | 725B960D1DFDEF77006118CA /* Resources */ = { 317 | isa = PBXResourcesBuildPhase; 318 | buildActionMask = 2147483647; 319 | files = ( 320 | ); 321 | runOnlyForDeploymentPostprocessing = 0; 322 | }; 323 | /* End PBXResourcesBuildPhase section */ 324 | 325 | /* Begin PBXSourcesBuildPhase section */ 326 | 725B95E61DFDEF58006118CA /* Sources */ = { 327 | isa = PBXSourcesBuildPhase; 328 | buildActionMask = 2147483647; 329 | files = ( 330 | 725B96211DFDF05D006118CA /* UIView+Geometry.swift in Sources */, 331 | ); 332 | runOnlyForDeploymentPostprocessing = 0; 333 | }; 334 | 725B95EF1DFDEF58006118CA /* Sources */ = { 335 | isa = PBXSourcesBuildPhase; 336 | buildActionMask = 2147483647; 337 | files = ( 338 | 725B96231DFDF061006118CA /* GeometryTests.swift in Sources */, 339 | ); 340 | runOnlyForDeploymentPostprocessing = 0; 341 | }; 342 | 725B96021DFDEF77006118CA /* Sources */ = { 343 | isa = PBXSourcesBuildPhase; 344 | buildActionMask = 2147483647; 345 | files = ( 346 | 725B96201DFDF05C006118CA /* UIView+Geometry.swift in Sources */, 347 | ); 348 | runOnlyForDeploymentPostprocessing = 0; 349 | }; 350 | 725B960B1DFDEF77006118CA /* Sources */ = { 351 | isa = PBXSourcesBuildPhase; 352 | buildActionMask = 2147483647; 353 | files = ( 354 | 725B96221DFDF060006118CA /* GeometryTests.swift in Sources */, 355 | ); 356 | runOnlyForDeploymentPostprocessing = 0; 357 | }; 358 | /* End PBXSourcesBuildPhase section */ 359 | 360 | /* Begin PBXTargetDependency section */ 361 | 725B95F61DFDEF58006118CA /* PBXTargetDependency */ = { 362 | isa = PBXTargetDependency; 363 | target = 725B95EA1DFDEF58006118CA /* Geometry tvOS */; 364 | targetProxy = 725B95F51DFDEF58006118CA /* PBXContainerItemProxy */; 365 | }; 366 | 725B96121DFDEF77006118CA /* PBXTargetDependency */ = { 367 | isa = PBXTargetDependency; 368 | target = 725B96061DFDEF77006118CA /* Geometry iOS */; 369 | targetProxy = 725B96111DFDEF77006118CA /* PBXContainerItemProxy */; 370 | }; 371 | /* End PBXTargetDependency section */ 372 | 373 | /* Begin XCBuildConfiguration section */ 374 | 725B95FC1DFDEF58006118CA /* Debug */ = { 375 | isa = XCBuildConfiguration; 376 | buildSettings = { 377 | CLANG_ANALYZER_NONNULL = YES; 378 | CLANG_WARN_BOOL_CONVERSION = YES; 379 | CLANG_WARN_CONSTANT_CONVERSION = YES; 380 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 381 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 382 | CLANG_WARN_ENUM_CONVERSION = YES; 383 | CLANG_WARN_INT_CONVERSION = YES; 384 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 385 | CODE_SIGN_IDENTITY = ""; 386 | DEBUG_INFORMATION_FORMAT = dwarf; 387 | DEFINES_MODULE = YES; 388 | DYLIB_COMPATIBILITY_VERSION = 1; 389 | DYLIB_CURRENT_VERSION = 1; 390 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 391 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 392 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 393 | INFOPLIST_FILE = Geometry/Info.plist; 394 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 395 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 396 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.$(PRODUCT_NAME:rfc1034identifier)"; 397 | PRODUCT_NAME = Geometry; 398 | SDKROOT = appletvos; 399 | SKIP_INSTALL = YES; 400 | TARGETED_DEVICE_FAMILY = 3; 401 | TVOS_DEPLOYMENT_TARGET = 10.0; 402 | }; 403 | name = Debug; 404 | }; 405 | 725B95FD1DFDEF58006118CA /* Release */ = { 406 | isa = XCBuildConfiguration; 407 | buildSettings = { 408 | CLANG_ANALYZER_NONNULL = YES; 409 | CLANG_WARN_BOOL_CONVERSION = YES; 410 | CLANG_WARN_CONSTANT_CONVERSION = YES; 411 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 412 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 413 | CLANG_WARN_ENUM_CONVERSION = YES; 414 | CLANG_WARN_INT_CONVERSION = YES; 415 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 416 | CODE_SIGN_IDENTITY = ""; 417 | COPY_PHASE_STRIP = NO; 418 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 419 | DEFINES_MODULE = YES; 420 | DYLIB_COMPATIBILITY_VERSION = 1; 421 | DYLIB_CURRENT_VERSION = 1; 422 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 423 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 424 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 425 | INFOPLIST_FILE = Geometry/Info.plist; 426 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 427 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 428 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.$(PRODUCT_NAME:rfc1034identifier)"; 429 | PRODUCT_NAME = Geometry; 430 | SDKROOT = appletvos; 431 | SKIP_INSTALL = YES; 432 | TARGETED_DEVICE_FAMILY = 3; 433 | TVOS_DEPLOYMENT_TARGET = 10.0; 434 | }; 435 | name = Release; 436 | }; 437 | 725B95FE1DFDEF58006118CA /* Debug */ = { 438 | isa = XCBuildConfiguration; 439 | buildSettings = { 440 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 441 | CLANG_ANALYZER_NONNULL = YES; 442 | CLANG_WARN_BOOL_CONVERSION = YES; 443 | CLANG_WARN_CONSTANT_CONVERSION = YES; 444 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 445 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 446 | CLANG_WARN_ENUM_CONVERSION = YES; 447 | CLANG_WARN_INT_CONVERSION = YES; 448 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 449 | DEBUG_INFORMATION_FORMAT = dwarf; 450 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 451 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 452 | INFOPLIST_FILE = GeometryTests/Info.plist; 453 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 454 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.Geometry-tvOSTests"; 455 | PRODUCT_NAME = "$(TARGET_NAME)"; 456 | SDKROOT = appletvos; 457 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 458 | SWIFT_VERSION = 3.0; 459 | TVOS_DEPLOYMENT_TARGET = 10.0; 460 | }; 461 | name = Debug; 462 | }; 463 | 725B95FF1DFDEF58006118CA /* Release */ = { 464 | isa = XCBuildConfiguration; 465 | buildSettings = { 466 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 467 | CLANG_ANALYZER_NONNULL = YES; 468 | CLANG_WARN_BOOL_CONVERSION = YES; 469 | CLANG_WARN_CONSTANT_CONVERSION = YES; 470 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 471 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 472 | CLANG_WARN_ENUM_CONVERSION = YES; 473 | CLANG_WARN_INT_CONVERSION = YES; 474 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 475 | COPY_PHASE_STRIP = NO; 476 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 477 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 478 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 479 | INFOPLIST_FILE = GeometryTests/Info.plist; 480 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 481 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.Geometry-tvOSTests"; 482 | PRODUCT_NAME = "$(TARGET_NAME)"; 483 | SDKROOT = appletvos; 484 | SWIFT_VERSION = 3.0; 485 | TVOS_DEPLOYMENT_TARGET = 10.0; 486 | }; 487 | name = Release; 488 | }; 489 | 725B96191DFDEF77006118CA /* Debug */ = { 490 | isa = XCBuildConfiguration; 491 | buildSettings = { 492 | CLANG_ANALYZER_NONNULL = YES; 493 | CLANG_WARN_BOOL_CONVERSION = YES; 494 | CLANG_WARN_CONSTANT_CONVERSION = YES; 495 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 496 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 497 | CLANG_WARN_ENUM_CONVERSION = YES; 498 | CLANG_WARN_INT_CONVERSION = YES; 499 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 500 | CODE_SIGN_IDENTITY = ""; 501 | DEBUG_INFORMATION_FORMAT = dwarf; 502 | DEFINES_MODULE = YES; 503 | DYLIB_COMPATIBILITY_VERSION = 1; 504 | DYLIB_CURRENT_VERSION = 1; 505 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 506 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 507 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 508 | INFOPLIST_FILE = Geometry/Info.plist; 509 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 510 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 511 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.Geometry-iOS"; 512 | PRODUCT_NAME = Geometry; 513 | SKIP_INSTALL = YES; 514 | }; 515 | name = Debug; 516 | }; 517 | 725B961A1DFDEF77006118CA /* Release */ = { 518 | isa = XCBuildConfiguration; 519 | buildSettings = { 520 | CLANG_ANALYZER_NONNULL = YES; 521 | CLANG_WARN_BOOL_CONVERSION = YES; 522 | CLANG_WARN_CONSTANT_CONVERSION = YES; 523 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 524 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 525 | CLANG_WARN_ENUM_CONVERSION = YES; 526 | CLANG_WARN_INT_CONVERSION = YES; 527 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 528 | CODE_SIGN_IDENTITY = ""; 529 | COPY_PHASE_STRIP = NO; 530 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 531 | DEFINES_MODULE = YES; 532 | DYLIB_COMPATIBILITY_VERSION = 1; 533 | DYLIB_CURRENT_VERSION = 1; 534 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 535 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 536 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 537 | INFOPLIST_FILE = Geometry/Info.plist; 538 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 539 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 540 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.Geometry-iOS"; 541 | PRODUCT_NAME = Geometry; 542 | SKIP_INSTALL = YES; 543 | }; 544 | name = Release; 545 | }; 546 | 725B961C1DFDEF77006118CA /* Debug */ = { 547 | isa = XCBuildConfiguration; 548 | buildSettings = { 549 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 550 | CLANG_ANALYZER_NONNULL = YES; 551 | CLANG_WARN_BOOL_CONVERSION = YES; 552 | CLANG_WARN_CONSTANT_CONVERSION = YES; 553 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 554 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 555 | CLANG_WARN_ENUM_CONVERSION = YES; 556 | CLANG_WARN_INT_CONVERSION = YES; 557 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 558 | DEBUG_INFORMATION_FORMAT = dwarf; 559 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 560 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 561 | INFOPLIST_FILE = GeometryTests/Info.plist; 562 | IPHONEOS_DEPLOYMENT_TARGET = 10.1; 563 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 564 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.Geometry-iOSTests"; 565 | PRODUCT_NAME = "$(TARGET_NAME)"; 566 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 567 | SWIFT_VERSION = 3.0; 568 | }; 569 | name = Debug; 570 | }; 571 | 725B961D1DFDEF77006118CA /* Release */ = { 572 | isa = XCBuildConfiguration; 573 | buildSettings = { 574 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 575 | CLANG_ANALYZER_NONNULL = YES; 576 | CLANG_WARN_BOOL_CONVERSION = YES; 577 | CLANG_WARN_CONSTANT_CONVERSION = YES; 578 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 579 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 580 | CLANG_WARN_ENUM_CONVERSION = YES; 581 | CLANG_WARN_INT_CONVERSION = YES; 582 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 583 | COPY_PHASE_STRIP = NO; 584 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 585 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 586 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 587 | INFOPLIST_FILE = GeometryTests/Info.plist; 588 | IPHONEOS_DEPLOYMENT_TARGET = 10.1; 589 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 590 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.Geometry-iOSTests"; 591 | PRODUCT_NAME = "$(TARGET_NAME)"; 592 | SWIFT_VERSION = 3.0; 593 | }; 594 | name = Release; 595 | }; 596 | 72879CC919BD1F3B0015F977 /* Debug */ = { 597 | isa = XCBuildConfiguration; 598 | buildSettings = { 599 | ALWAYS_SEARCH_USER_PATHS = NO; 600 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 601 | CLANG_CXX_LIBRARY = "libc++"; 602 | CLANG_ENABLE_MODULES = YES; 603 | CLANG_ENABLE_OBJC_ARC = YES; 604 | CLANG_WARN_ASSIGN_ENUM = YES; 605 | CLANG_WARN_EMPTY_BODY = YES; 606 | CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; 607 | CLANG_WARN_INFINITE_RECURSION = YES; 608 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; 609 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 610 | CLANG_WARN_UNREACHABLE_CODE = YES; 611 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 612 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 613 | COPY_PHASE_STRIP = NO; 614 | CURRENT_PROJECT_VERSION = 1; 615 | ENABLE_STRICT_OBJC_MSGSEND = YES; 616 | ENABLE_TESTABILITY = YES; 617 | GCC_C_LANGUAGE_STANDARD = gnu99; 618 | GCC_DYNAMIC_NO_PIC = NO; 619 | GCC_NO_COMMON_BLOCKS = YES; 620 | GCC_OPTIMIZATION_LEVEL = 0; 621 | GCC_PREPROCESSOR_DEFINITIONS = ( 622 | "DEBUG=1", 623 | "$(inherited)", 624 | ); 625 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 626 | GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; 627 | GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; 628 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 629 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 630 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 631 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 632 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 633 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; 634 | GCC_WARN_SIGN_COMPARE = YES; 635 | GCC_WARN_UNDECLARED_SELECTOR = YES; 636 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 637 | GCC_WARN_UNUSED_FUNCTION = YES; 638 | GCC_WARN_UNUSED_LABEL = YES; 639 | GCC_WARN_UNUSED_PARAMETER = YES; 640 | GCC_WARN_UNUSED_VARIABLE = YES; 641 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 642 | ONLY_ACTIVE_ARCH = YES; 643 | SDKROOT = iphoneos; 644 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 645 | SWIFT_VERSION = 3.0.1; 646 | TARGETED_DEVICE_FAMILY = "1,2"; 647 | VERSIONING_SYSTEM = "apple-generic"; 648 | VERSION_INFO_PREFIX = ""; 649 | }; 650 | name = Debug; 651 | }; 652 | 72879CCA19BD1F3B0015F977 /* Release */ = { 653 | isa = XCBuildConfiguration; 654 | buildSettings = { 655 | ALWAYS_SEARCH_USER_PATHS = NO; 656 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 657 | CLANG_CXX_LIBRARY = "libc++"; 658 | CLANG_ENABLE_MODULES = YES; 659 | CLANG_ENABLE_OBJC_ARC = YES; 660 | CLANG_WARN_ASSIGN_ENUM = YES; 661 | CLANG_WARN_EMPTY_BODY = YES; 662 | CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; 663 | CLANG_WARN_INFINITE_RECURSION = YES; 664 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; 665 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 666 | CLANG_WARN_UNREACHABLE_CODE = YES; 667 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 668 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 669 | COPY_PHASE_STRIP = YES; 670 | CURRENT_PROJECT_VERSION = 1; 671 | ENABLE_NS_ASSERTIONS = NO; 672 | ENABLE_STRICT_OBJC_MSGSEND = YES; 673 | GCC_C_LANGUAGE_STANDARD = gnu99; 674 | GCC_NO_COMMON_BLOCKS = YES; 675 | GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; 676 | GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; 677 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 678 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 679 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 680 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 681 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 682 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; 683 | GCC_WARN_SIGN_COMPARE = YES; 684 | GCC_WARN_UNDECLARED_SELECTOR = YES; 685 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 686 | GCC_WARN_UNUSED_FUNCTION = YES; 687 | GCC_WARN_UNUSED_LABEL = YES; 688 | GCC_WARN_UNUSED_PARAMETER = YES; 689 | GCC_WARN_UNUSED_VARIABLE = YES; 690 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 691 | SDKROOT = iphoneos; 692 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 693 | SWIFT_VERSION = 3.0.1; 694 | TARGETED_DEVICE_FAMILY = "1,2"; 695 | VALIDATE_PRODUCT = YES; 696 | VERSIONING_SYSTEM = "apple-generic"; 697 | VERSION_INFO_PREFIX = ""; 698 | }; 699 | name = Release; 700 | }; 701 | /* End XCBuildConfiguration section */ 702 | 703 | /* Begin XCConfigurationList section */ 704 | 725B96001DFDEF58006118CA /* Build configuration list for PBXNativeTarget "Geometry tvOS" */ = { 705 | isa = XCConfigurationList; 706 | buildConfigurations = ( 707 | 725B95FC1DFDEF58006118CA /* Debug */, 708 | 725B95FD1DFDEF58006118CA /* Release */, 709 | ); 710 | defaultConfigurationIsVisible = 0; 711 | defaultConfigurationName = Release; 712 | }; 713 | 725B96011DFDEF58006118CA /* Build configuration list for PBXNativeTarget "Geometry tvOSTests" */ = { 714 | isa = XCConfigurationList; 715 | buildConfigurations = ( 716 | 725B95FE1DFDEF58006118CA /* Debug */, 717 | 725B95FF1DFDEF58006118CA /* Release */, 718 | ); 719 | defaultConfigurationIsVisible = 0; 720 | defaultConfigurationName = Release; 721 | }; 722 | 725B96181DFDEF77006118CA /* Build configuration list for PBXNativeTarget "Geometry iOS" */ = { 723 | isa = XCConfigurationList; 724 | buildConfigurations = ( 725 | 725B96191DFDEF77006118CA /* Debug */, 726 | 725B961A1DFDEF77006118CA /* Release */, 727 | ); 728 | defaultConfigurationIsVisible = 0; 729 | defaultConfigurationName = Release; 730 | }; 731 | 725B961B1DFDEF77006118CA /* Build configuration list for PBXNativeTarget "Geometry iOS Tests" */ = { 732 | isa = XCConfigurationList; 733 | buildConfigurations = ( 734 | 725B961C1DFDEF77006118CA /* Debug */, 735 | 725B961D1DFDEF77006118CA /* Release */, 736 | ); 737 | defaultConfigurationIsVisible = 0; 738 | defaultConfigurationName = Release; 739 | }; 740 | 72879CB219BD1F3A0015F977 /* Build configuration list for PBXProject "Geometry" */ = { 741 | isa = XCConfigurationList; 742 | buildConfigurations = ( 743 | 72879CC919BD1F3B0015F977 /* Debug */, 744 | 72879CCA19BD1F3B0015F977 /* Release */, 745 | ); 746 | defaultConfigurationIsVisible = 0; 747 | defaultConfigurationName = Release; 748 | }; 749 | /* End XCConfigurationList section */ 750 | }; 751 | rootObject = 72879CAF19BD1F3A0015F977 /* Project object */; 752 | } 753 | -------------------------------------------------------------------------------- /Geometry.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Geometry.xcodeproj/xcshareddata/xcschemes/Geometry iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 34 | 40 | 41 | 42 | 43 | 44 | 50 | 51 | 52 | 53 | 54 | 55 | 65 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 84 | 90 | 91 | 92 | 93 | 95 | 96 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /Geometry.xcodeproj/xcshareddata/xcschemes/Geometry tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /Geometry/Geometry.h: -------------------------------------------------------------------------------- 1 | // 2 | // Geometry.h 3 | // Geometry 4 | // 5 | // Created by Tuomas Artman on 7.9.2014. 6 | // Copyright (c) 2014 Tuomas Artman. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Geometry. 12 | FOUNDATION_EXPORT double GeometryVersionNumber; 13 | 14 | //! Project version string for Geometry. 15 | FOUNDATION_EXPORT const unsigned char GeometryVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Geometry/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 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Geometry/UIView+Geometry.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Geometry.swift 3 | // Geometry 4 | // 5 | // Created by Tuomas Artman on 7.9.2014. 6 | // Copyright (c) 2014 Tuomas Artman. All rights reserved. 7 | // 8 | 9 | import CoreGraphics 10 | import Foundation 11 | import UIKit 12 | 13 | 14 | 15 | 16 | /// Extends CGRect with helper properties for positioning and setting dimensions 17 | 18 | extension CGRect: ExpressibleByStringLiteral { 19 | 20 | /// The top coordinate of the rect. 21 | public var top: CGFloat { 22 | get { 23 | return origin.y 24 | } 25 | set(value) { 26 | origin.y = value 27 | } 28 | } 29 | 30 | // The left-side coordinate of the rect. 31 | public var left: CGFloat { 32 | get { 33 | return origin.x 34 | } 35 | set(value) { 36 | origin.x = value 37 | } 38 | } 39 | 40 | // The bottom coordinate of the rect. Setting this will change origin.y of the rect according to 41 | // the height of the rect. 42 | public var bottom: CGFloat { 43 | get { 44 | return origin.y + size.height 45 | } 46 | set(value) { 47 | origin.y = value - size.height 48 | } 49 | } 50 | 51 | // The right-side coordinate of the rect. Setting this will change origin.x of the rect according to 52 | // the width of the rect. 53 | public var right: CGFloat { 54 | get { 55 | return origin.x + size.width 56 | } 57 | set(value) { 58 | origin.x = value - size.width 59 | } 60 | } 61 | 62 | // The center x coordinate of the rect. 63 | public var centerX: CGFloat { 64 | get { 65 | return origin.x + size.width / 2 66 | } 67 | set (value) { 68 | origin.x = value - size.width / 2 69 | } 70 | } 71 | 72 | // The center y coordinate of the rect. 73 | public var centerY: CGFloat { 74 | get { 75 | return origin.y + size.height / 2 76 | } 77 | set (value) { 78 | origin.y = value - size.height / 2 79 | } 80 | } 81 | 82 | // The center of the rect. 83 | public var center: CGPoint { 84 | get { 85 | return CGPoint(x: centerX, y: centerY) 86 | } 87 | set (value) { 88 | centerX = value.x 89 | centerY = value.y 90 | } 91 | } 92 | 93 | public typealias ExtendedGraphemeClusterLiteralType = StringLiteralType 94 | 95 | public init(stringLiteral value: StringLiteralType) { 96 | self.init() 97 | let rect: CGRect 98 | if value[value.startIndex] != "{" { 99 | let comp = value.components(separatedBy: ",") 100 | if comp.count == 4 { 101 | rect = CGRectFromString("{{\(comp[0]),\(comp[1])}, {\(comp[2]), \(comp[3])}}") 102 | } else { 103 | rect = CGRect.zero 104 | } 105 | } else { 106 | rect = CGRectFromString(value) 107 | } 108 | 109 | self.size = rect.size; 110 | self.origin = rect.origin; 111 | } 112 | 113 | public init(extendedGraphemeClusterLiteral value: ExtendedGraphemeClusterLiteralType) { 114 | self.init(stringLiteral: value) 115 | } 116 | 117 | public typealias UnicodeScalarLiteralType = StringLiteralType 118 | 119 | public init(unicodeScalarLiteral value: UnicodeScalarLiteralType) { 120 | self.init(stringLiteral: value) 121 | } 122 | } 123 | 124 | extension CGPoint: ExpressibleByStringLiteral { 125 | public typealias ExtendedGraphemeClusterLiteralType = StringLiteralType 126 | 127 | public init(stringLiteral value: StringLiteralType) { 128 | self.init() 129 | 130 | let point:CGPoint; 131 | if value[value.startIndex] != "{" { 132 | point = CGPointFromString("{\(value)}") 133 | } else { 134 | point = CGPointFromString(value) 135 | } 136 | self.x = point.x; 137 | self.y = point.y; 138 | } 139 | 140 | public init(extendedGraphemeClusterLiteral value: ExtendedGraphemeClusterLiteralType) { 141 | self.init(stringLiteral: value) 142 | } 143 | 144 | public typealias UnicodeScalarLiteralType = StringLiteralType 145 | 146 | public init(unicodeScalarLiteral value: UnicodeScalarLiteralType) { 147 | self.init(stringLiteral: value) 148 | } 149 | } 150 | 151 | extension UIView { 152 | 153 | /// The top coordinate of the UIView. 154 | public var top: CGFloat { 155 | get { 156 | return frame.top 157 | } 158 | set(value) { 159 | var frame = self.frame 160 | frame.top = value 161 | self.frame = frame 162 | } 163 | } 164 | 165 | /// The left coordinate of the UIView. 166 | public var left: CGFloat { 167 | get { 168 | return frame.left 169 | } 170 | set(value) { 171 | var frame = self.frame 172 | frame.left = value 173 | self.frame = frame 174 | } 175 | } 176 | 177 | /// The bottom coordinate of the UIView. 178 | public var bottom: CGFloat { 179 | get { 180 | return frame.bottom 181 | } 182 | set(value) { 183 | var frame = self.frame 184 | frame.bottom = value 185 | self.frame = frame 186 | } 187 | } 188 | 189 | /// The right coordinate of the UIView. 190 | public var right: CGFloat { 191 | get { 192 | return frame.right 193 | } 194 | set(value) { 195 | var frame = self.frame 196 | frame.right = value 197 | self.frame = frame 198 | } 199 | } 200 | 201 | // The width of the UIView. 202 | public var width: CGFloat { 203 | get { 204 | return frame.width 205 | } 206 | set(value) { 207 | var frame = self.frame 208 | frame.size.width = value 209 | self.frame = frame 210 | } 211 | } 212 | 213 | // The height of the UIView. 214 | public var height: CGFloat { 215 | get { 216 | return frame.height 217 | } 218 | set(value) { 219 | var frame = self.frame 220 | frame.size.height = value 221 | self.frame = frame 222 | } 223 | } 224 | 225 | /// The horizontal center coordinate of the UIView. 226 | public var centerX: CGFloat { 227 | get { 228 | return frame.centerX 229 | } 230 | set(value) { 231 | var frame = self.frame 232 | frame.centerX = value 233 | self.frame = frame 234 | } 235 | } 236 | 237 | /// The vertical center coordinate of the UIView. 238 | public var centerY: CGFloat { 239 | get { 240 | return frame.centerY 241 | } 242 | set(value) { 243 | var frame = self.frame 244 | frame.centerY = value 245 | self.frame = frame 246 | } 247 | } 248 | } 249 | -------------------------------------------------------------------------------- /GeometryTests/GeometryTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GeometryTests.swift 3 | // GeometryTests 4 | // 5 | // Created by Tuomas Artman on 7.9.2014. 6 | // Copyright (c) 2014 Tuomas Artman. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | import Geometry 12 | 13 | class GeometryTests: XCTestCase { 14 | 15 | func testRect() { 16 | var rect = CGRect(x: 10, y: 10, width: 20, height: 20) 17 | rect.top += 5 18 | XCTAssertEqual(rect, CGRect(x: 10, y: 15, width: 20, height: 20), "Should modified rect correctly") 19 | 20 | rect.left += 5 21 | XCTAssertEqual(rect, CGRect(x: 15, y: 15, width: 20, height: 20), "Should modified rect correctly") 22 | 23 | rect.bottom -= 10 24 | XCTAssertEqual(rect, CGRect(x: 15, y: 5, width: 20, height: 20), "Should modified rect correctly") 25 | 26 | rect.right -= 10 27 | XCTAssertEqual(rect, CGRect(x: 5, y: 5, width: 20, height: 20), "Should modified rect correctly") 28 | 29 | rect.size.width = 30 30 | rect.size.height = 40 31 | 32 | XCTAssertEqual(rect.center, CGPoint(x: 20, y: 25), "Should modified rect correctly") 33 | XCTAssertEqual(rect.centerX, 20, "Should modified rect correctly") 34 | XCTAssertEqual(rect.centerY, 25, "Should modified rect correctly") 35 | 36 | rect.centerX = 100 37 | XCTAssertEqual(rect, CGRect(x: 85, y: 5, width: 30, height: 40), "Should modified rect correctly") 38 | 39 | rect.centerY = 100 40 | XCTAssertEqual(rect, CGRect(x: 85, y: 80, width: 30, height: 40), "Should modified rect correctly") 41 | 42 | rect.center = CGPoint(x: 10, y:10) 43 | XCTAssertEqual(rect, CGRect(x: -5, y: -10, width: 30, height: 40), "Should modified rect correctly") 44 | } 45 | 46 | func testUIView() { 47 | let view = UIView(frame: "10, 10, 20, 20") 48 | 49 | view.top += 5 50 | XCTAssertEqual(view.frame, CGRect(x: 10, y: 15, width: 20, height: 20), "Should modified rect correctly") 51 | 52 | view.left += 5 53 | XCTAssertEqual(view.frame, CGRect(x: 15, y: 15, width: 20, height: 20), "Should modified rect correctly") 54 | 55 | view.bottom -= 10 56 | XCTAssertEqual(view.frame, CGRect(x: 15, y: 5, width: 20, height: 20), "Should modified rect correctly") 57 | 58 | view.right -= 10 59 | XCTAssertEqual(view.frame, CGRect(x: 5, y: 5, width: 20, height: 20), "Should modified rect correctly") 60 | 61 | view.width += 10 62 | XCTAssertEqual(view.frame, CGRect(x: 5, y: 5, width: 30, height: 20), "Should modified rect correctly") 63 | 64 | view.height += 20 65 | XCTAssertEqual(view.frame, CGRect(x: 5, y: 5, width: 30, height: 40), "Should modified rect correctly") 66 | 67 | XCTAssertEqual(view.center, CGPoint(x: 20, y: 25), "Should modified rect correctly") 68 | XCTAssertEqual(view.centerX, 20, "Should modified rect correctly") 69 | XCTAssertEqual(view.centerY, 25, "Should modified rect correctly") 70 | 71 | 72 | view.centerX = 100 73 | XCTAssertEqual(view.frame, CGRect(x: 85, y: 5, width: 30, height: 40), "Should modified rect correctly") 74 | 75 | view.centerY = 100 76 | XCTAssertEqual(view.frame, CGRect(x: 85, y: 80, width: 30, height: 40), "Should modified rect correctly") 77 | 78 | view.center = CGPoint(x: 10, y:10) 79 | XCTAssertEqual(view.frame, CGRect(x: -5, y: -10, width: 30, height: 40), "Should modified rect correctly") 80 | } 81 | 82 | func testRectStringConversion() { 83 | let rect: CGRect = "10, 20, 50, 60" 84 | XCTAssertEqual(rect, CGRect(x: 10, y: 20, width: 50, height: 60), "Should have create from string") 85 | 86 | let view = UIView(frame: "{{10, 20}, {50, 60}}") 87 | XCTAssertEqual(view.frame, CGRect(x: 10, y: 20, width: 50, height: 60), "Should have create from string") 88 | } 89 | 90 | func testPointStringConversion() { 91 | let point: CGPoint = "10, 20" 92 | XCTAssertEqual(point, CGPoint(x: 10, y: 20), "Should have create from string") 93 | 94 | let view = UIView(frame: "0, 0, 10, 10"); 95 | view.center = "10, 10" 96 | XCTAssertEqual(view.frame, CGRect(x: 5, y: 5, width: 10, height: 10), "Should have create from string") 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /GeometryTests/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 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Tuomas Artman 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 | # Geometry 2 | [![Build Status](https://travis-ci.org/artman/Geometry.svg?branch=master)](https://travis-ci.org/artman/Geometry) 3 | [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Geometry.svg)](https://cocoapods.org/pods/Geometry) 4 | [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 5 | ![License](https://img.shields.io/cocoapods/l/Geometry.svg?style=flat&color=gray) 6 | ![Platform](https://img.shields.io/cocoapods/p/Geometry.svg?style=flat) 7 | [![Twitter](https://img.shields.io/badge/twitter-@artman-blue.svg?style=flat)](http://twitter.com/artman) 8 | 9 | Geometry is a UIView and CGRect extension that lets you work with view and rect geometry easier. It adds the following properties to UIView: 10 | 11 | * top 12 | * left 13 | * bottom 14 | * right 15 | * width 16 | * height 17 | * centerX 18 | * centerY 19 | 20 | And it lets you define CGRectangles and CGPoints as strings. 21 | 22 | ## Requirements 23 | 24 | - iOS 7.0 / watchOS 2.0 / Mac OS X 10.9 25 | - Swift 3.0 26 | 27 | ## Installation 28 | 29 | To use Signals with a project targeting iOS 7, copy `Geometry.swift` into your project. 30 | 31 | #### CocoaPods 32 | 33 | To integrate Geometry into your project add the following to your `Podfile`: 34 | 35 | ```ruby 36 | platform :ios, '8.0' 37 | use_frameworks! 38 | 39 | pod 'Geometry', '~> 3.0' 40 | ``` 41 | 42 | #### Carthage 43 | 44 | To integrate Geometry into your project using Carthage add the following to your `Cartfile`: 45 | 46 | ```ruby 47 | github "artman/Geometry" ~> 3.0 48 | ``` 49 | 50 | 51 | ## Quick start 52 | 53 | ```Swift 54 | myView.frame = CGRect(x: 10, y: 10, width: 20, height: 20) 55 | myView.left = 20 // Frame is now {{20, 10}, {20, 20}} 56 | myView.width = 100 // Frame is now {{20, 10}, {100, 20}} 57 | myView.right = 150 // Frame is now {{50, 10}, {100, 20}} 58 | ``` 59 | 60 | This extension also provides StringLiteralConverters for both CGRect and CGPoint, so you can use Strings to initialize a CGRect: 61 | 62 | ```Swift 63 | myView.frame = "10, 10, 20, 20" 64 | myView.center = "50, 50" 65 | var rect: CGRect = "20, 25, 100, 100" 66 | ``` 67 | 68 | ## Contribute 69 | 70 | To contribute, just fork, branch & send a pull request. To get in touch, hit me up on Twitter [@artman](http://twitter.com/artman) 71 | 72 | ## License 73 | 74 | Geometry is released under an MIT license. See the LICENSE file for more information 75 | --------------------------------------------------------------------------------