From 6ea9915ac6eae6d43ef83094958a9ebc0576184e Mon Sep 17 00:00:00 2001 From: Baris Sencan Date: Mon, 30 Mar 2015 12:51:57 -0700 Subject: [PATCH 01/11] Add CGRect+ManualLayout.swift --- ManualLayout.xcodeproj/project.pbxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ManualLayout.xcodeproj/project.pbxproj b/ManualLayout.xcodeproj/project.pbxproj index fd1d6e6..e8d095f 100644 --- a/ManualLayout.xcodeproj/project.pbxproj +++ b/ManualLayout.xcodeproj/project.pbxproj @@ -17,6 +17,7 @@ 5F67BC521A9FE35C00347483 /* HelperFunctionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F67BC511A9FE35C00347483 /* HelperFunctionTests.swift */; }; 5F875C691A9BE99F003CACDD /* CALayer+ManualLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F875C681A9BE99F003CACDD /* CALayer+ManualLayout.swift */; }; 5F875C6D1A9BFC7E003CACDD /* UIView+ManualLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F875C6C1A9BFC7E003CACDD /* UIView+ManualLayout.swift */; }; + 5F9134781AC9E0830001DBF8 /* CGRect+ManualLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F9134771AC9E0830001DBF8 /* CGRect+ManualLayout.swift */; }; 5FB4CBEF1A9BBE7500C2FB4F /* ManualLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FB4CBEE1A9BBE7500C2FB4F /* ManualLayout.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5FB4CBF51A9BBE7500C2FB4F /* ManualLayout.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5FB4CBE91A9BBE7500C2FB4F /* ManualLayout.framework */; }; /* End PBXBuildFile section */ @@ -42,6 +43,7 @@ 5F67BC511A9FE35C00347483 /* HelperFunctionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HelperFunctionTests.swift; sourceTree = ""; }; 5F875C681A9BE99F003CACDD /* CALayer+ManualLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CALayer+ManualLayout.swift"; sourceTree = ""; }; 5F875C6C1A9BFC7E003CACDD /* UIView+ManualLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+ManualLayout.swift"; sourceTree = ""; }; + 5F9134771AC9E0830001DBF8 /* CGRect+ManualLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CGRect+ManualLayout.swift"; sourceTree = ""; }; 5FB4CBE91A9BBE7500C2FB4F /* ManualLayout.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ManualLayout.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 5FB4CBED1A9BBE7500C2FB4F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5FB4CBEE1A9BBE7500C2FB4F /* ManualLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ManualLayout.h; sourceTree = ""; }; @@ -92,6 +94,7 @@ 5FB4CBEE1A9BBE7500C2FB4F /* ManualLayout.h */, 5F67BC4B1A9FAB4B00347483 /* SmartAssign.swift */, 5F67BC4F1A9FDDD900347483 /* HelperFunctions.swift */, + 5F9134771AC9E0830001DBF8 /* CGRect+ManualLayout.swift */, 5F875C681A9BE99F003CACDD /* CALayer+ManualLayout.swift */, 5F875C6C1A9BFC7E003CACDD /* UIView+ManualLayout.swift */, 5F3026911AAA3C6B00F65A20 /* UIScrollView+ManualLayout.swift */, @@ -236,6 +239,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 5F9134781AC9E0830001DBF8 /* CGRect+ManualLayout.swift in Sources */, 5F875C691A9BE99F003CACDD /* CALayer+ManualLayout.swift in Sources */, 5F67BC3F1A9E970300347483 /* UIViewController+ManualLayout.swift in Sources */, 5F67BC501A9FDDD900347483 /* HelperFunctions.swift in Sources */, From e2d9cb61370e03531ffa038fc7927a1e807537e8 Mon Sep 17 00:00:00 2001 From: Baris Sencan Date: Mon, 30 Mar 2015 12:57:30 -0700 Subject: [PATCH 02/11] Set code signing identities --- ManualLayout.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ManualLayout.xcodeproj/project.pbxproj b/ManualLayout.xcodeproj/project.pbxproj index e8d095f..ba5b658 100644 --- a/ManualLayout.xcodeproj/project.pbxproj +++ b/ManualLayout.xcodeproj/project.pbxproj @@ -288,7 +288,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -334,7 +334,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Distribution"; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = 1; ENABLE_NS_ASSERTIONS = NO; From 3c85a7ac416a2664f2776324449f77f3c883b2f4 Mon Sep 17 00:00:00 2001 From: Baris Sencan Date: Mon, 30 Mar 2015 13:10:04 -0700 Subject: [PATCH 03/11] Move simple example app inside the project --- Examples/SimpleExample/Cartfile | 1 - Examples/SimpleExample/Cartfile.resolved | 1 - .../SimpleExample.xcodeproj/project.pbxproj | 446 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/SimpleExample.xccheckout | 41 -- .../xcschemes/SimpleExample.xcscheme | 110 ----- ManualLayout.xcodeproj/project.pbxproj | 265 +++++++++++ ManualLayout/CGRect+ManualLayout.swift | 9 + .../AppDelegate.swift | 3 +- .../Base.lproj/LaunchScreen.xib | 0 .../ExampleViewController.swift | 10 +- .../AppIcon.appiconset/Contents.json | 0 .../Info.plist | 6 +- .../Info.plist | 2 +- .../SimpleExampleTests.swift | 2 +- 15 files changed, 285 insertions(+), 618 deletions(-) delete mode 100644 Examples/SimpleExample/Cartfile delete mode 100644 Examples/SimpleExample/Cartfile.resolved delete mode 100644 Examples/SimpleExample/SimpleExample.xcodeproj/project.pbxproj delete mode 100644 Examples/SimpleExample/SimpleExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 Examples/SimpleExample/SimpleExample.xcodeproj/project.xcworkspace/xcshareddata/SimpleExample.xccheckout delete mode 100644 Examples/SimpleExample/SimpleExample.xcodeproj/xcshareddata/xcschemes/SimpleExample.xcscheme create mode 100644 ManualLayout/CGRect+ManualLayout.swift rename {Examples/SimpleExample/SimpleExample => SimpleExample}/AppDelegate.swift (93%) rename {Examples/SimpleExample/SimpleExample => SimpleExample}/Base.lproj/LaunchScreen.xib (100%) rename {Examples/SimpleExample/SimpleExample => SimpleExample}/ExampleViewController.swift (89%) rename {Examples/SimpleExample/SimpleExample => SimpleExample}/Images.xcassets/AppIcon.appiconset/Contents.json (100%) rename {Examples/SimpleExample/SimpleExample => SimpleExample}/Info.plist (90%) rename {Examples/SimpleExample/SimpleExampleTests => SimpleExampleTests}/Info.plist (88%) rename {Examples/SimpleExample/SimpleExampleTests => SimpleExampleTests}/SimpleExampleTests.swift (95%) diff --git a/Examples/SimpleExample/Cartfile b/Examples/SimpleExample/Cartfile deleted file mode 100644 index 9202f74..0000000 --- a/Examples/SimpleExample/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "isair/ManualLayout" diff --git a/Examples/SimpleExample/Cartfile.resolved b/Examples/SimpleExample/Cartfile.resolved deleted file mode 100644 index 60b7fa5..0000000 --- a/Examples/SimpleExample/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "isair/ManualLayout" "0.2.1" diff --git a/Examples/SimpleExample/SimpleExample.xcodeproj/project.pbxproj b/Examples/SimpleExample/SimpleExample.xcodeproj/project.pbxproj deleted file mode 100644 index 653f93d..0000000 --- a/Examples/SimpleExample/SimpleExample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,446 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 5F67BC1A1A9D9F9200347483 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F67BC191A9D9F9200347483 /* AppDelegate.swift */; }; - 5F67BC1C1A9D9F9200347483 /* ExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F67BC1B1A9D9F9200347483 /* ExampleViewController.swift */; }; - 5F67BC211A9D9F9200347483 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5F67BC201A9D9F9200347483 /* Images.xcassets */; }; - 5F67BC241A9D9F9200347483 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5F67BC221A9D9F9200347483 /* LaunchScreen.xib */; }; - 5F67BC301A9D9F9200347483 /* SimpleExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F67BC2F1A9D9F9200347483 /* SimpleExampleTests.swift */; }; - 5F67BC3B1A9DB71100347483 /* ManualLayout.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F67BC3A1A9DB71100347483 /* ManualLayout.framework */; }; - 5F67BC3C1A9DB71100347483 /* ManualLayout.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 5F67BC3A1A9DB71100347483 /* ManualLayout.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 5F67BC2A1A9D9F9200347483 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 5F67BC0C1A9D9F9200347483 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 5F67BC131A9D9F9200347483; - remoteInfo = SimpleExample; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 5F67BC3D1A9DB71100347483 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 5F67BC3C1A9DB71100347483 /* ManualLayout.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 5F67BC141A9D9F9200347483 /* SimpleExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimpleExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 5F67BC181A9D9F9200347483 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5F67BC191A9D9F9200347483 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 5F67BC1B1A9D9F9200347483 /* ExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleViewController.swift; sourceTree = ""; }; - 5F67BC201A9D9F9200347483 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 5F67BC231A9D9F9200347483 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 5F67BC291A9D9F9200347483 /* SimpleExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SimpleExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 5F67BC2E1A9D9F9200347483 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5F67BC2F1A9D9F9200347483 /* SimpleExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimpleExampleTests.swift; sourceTree = ""; }; - 5F67BC3A1A9DB71100347483 /* ManualLayout.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ManualLayout.framework; path = Carthage/Build/iOS/ManualLayout.framework; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 5F67BC111A9D9F9200347483 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 5F67BC3B1A9DB71100347483 /* ManualLayout.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5F67BC261A9D9F9200347483 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 5F67BC0B1A9D9F9200347483 = { - isa = PBXGroup; - children = ( - 5F67BC3A1A9DB71100347483 /* ManualLayout.framework */, - 5F67BC161A9D9F9200347483 /* SimpleExample */, - 5F67BC2C1A9D9F9200347483 /* SimpleExampleTests */, - 5F67BC151A9D9F9200347483 /* Products */, - ); - sourceTree = ""; - }; - 5F67BC151A9D9F9200347483 /* Products */ = { - isa = PBXGroup; - children = ( - 5F67BC141A9D9F9200347483 /* SimpleExample.app */, - 5F67BC291A9D9F9200347483 /* SimpleExampleTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 5F67BC161A9D9F9200347483 /* SimpleExample */ = { - isa = PBXGroup; - children = ( - 5F67BC191A9D9F9200347483 /* AppDelegate.swift */, - 5F67BC1B1A9D9F9200347483 /* ExampleViewController.swift */, - 5F67BC391A9DA02800347483 /* Resources */, - 5F67BC171A9D9F9200347483 /* Supporting Files */, - ); - path = SimpleExample; - sourceTree = ""; - }; - 5F67BC171A9D9F9200347483 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 5F67BC181A9D9F9200347483 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 5F67BC2C1A9D9F9200347483 /* SimpleExampleTests */ = { - isa = PBXGroup; - children = ( - 5F67BC2F1A9D9F9200347483 /* SimpleExampleTests.swift */, - 5F67BC2D1A9D9F9200347483 /* Supporting Files */, - ); - path = SimpleExampleTests; - sourceTree = ""; - }; - 5F67BC2D1A9D9F9200347483 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 5F67BC2E1A9D9F9200347483 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 5F67BC391A9DA02800347483 /* Resources */ = { - isa = PBXGroup; - children = ( - 5F67BC221A9D9F9200347483 /* LaunchScreen.xib */, - 5F67BC201A9D9F9200347483 /* Images.xcassets */, - ); - name = Resources; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 5F67BC131A9D9F9200347483 /* SimpleExample */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5F67BC331A9D9F9200347483 /* Build configuration list for PBXNativeTarget "SimpleExample" */; - buildPhases = ( - 5F67BC101A9D9F9200347483 /* Sources */, - 5F67BC111A9D9F9200347483 /* Frameworks */, - 5F67BC121A9D9F9200347483 /* Resources */, - 5F67BC3D1A9DB71100347483 /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SimpleExample; - productName = SimpleExample; - productReference = 5F67BC141A9D9F9200347483 /* SimpleExample.app */; - productType = "com.apple.product-type.application"; - }; - 5F67BC281A9D9F9200347483 /* SimpleExampleTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5F67BC361A9D9F9200347483 /* Build configuration list for PBXNativeTarget "SimpleExampleTests" */; - buildPhases = ( - 5F67BC251A9D9F9200347483 /* Sources */, - 5F67BC261A9D9F9200347483 /* Frameworks */, - 5F67BC271A9D9F9200347483 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 5F67BC2B1A9D9F9200347483 /* PBXTargetDependency */, - ); - name = SimpleExampleTests; - productName = SimpleExampleTests; - productReference = 5F67BC291A9D9F9200347483 /* SimpleExampleTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 5F67BC0C1A9D9F9200347483 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0610; - ORGANIZATIONNAME = "Baris Sencan"; - TargetAttributes = { - 5F67BC131A9D9F9200347483 = { - CreatedOnToolsVersion = 6.1.1; - }; - 5F67BC281A9D9F9200347483 = { - CreatedOnToolsVersion = 6.1.1; - TestTargetID = 5F67BC131A9D9F9200347483; - }; - }; - }; - buildConfigurationList = 5F67BC0F1A9D9F9200347483 /* Build configuration list for PBXProject "SimpleExample" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 5F67BC0B1A9D9F9200347483; - productRefGroup = 5F67BC151A9D9F9200347483 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 5F67BC131A9D9F9200347483 /* SimpleExample */, - 5F67BC281A9D9F9200347483 /* SimpleExampleTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 5F67BC121A9D9F9200347483 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5F67BC241A9D9F9200347483 /* LaunchScreen.xib in Resources */, - 5F67BC211A9D9F9200347483 /* Images.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5F67BC271A9D9F9200347483 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 5F67BC101A9D9F9200347483 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5F67BC1C1A9D9F9200347483 /* ExampleViewController.swift in Sources */, - 5F67BC1A1A9D9F9200347483 /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5F67BC251A9D9F9200347483 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5F67BC301A9D9F9200347483 /* SimpleExampleTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 5F67BC2B1A9D9F9200347483 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 5F67BC131A9D9F9200347483 /* SimpleExample */; - targetProxy = 5F67BC2A1A9D9F9200347483 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 5F67BC221A9D9F9200347483 /* LaunchScreen.xib */ = { - isa = PBXVariantGroup; - children = ( - 5F67BC231A9D9F9200347483 /* Base */, - ); - name = LaunchScreen.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 5F67BC311A9D9F9200347483 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 5F67BC321A9D9F9200347483 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 5F67BC341A9D9F9200347483 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = SimpleExample/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 5F67BC351A9D9F9200347483 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = SimpleExample/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 5F67BC371A9D9F9200347483 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = SimpleExampleTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SimpleExample.app/SimpleExample"; - }; - name = Debug; - }; - 5F67BC381A9D9F9200347483 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - INFOPLIST_FILE = SimpleExampleTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SimpleExample.app/SimpleExample"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 5F67BC0F1A9D9F9200347483 /* Build configuration list for PBXProject "SimpleExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5F67BC311A9D9F9200347483 /* Debug */, - 5F67BC321A9D9F9200347483 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5F67BC331A9D9F9200347483 /* Build configuration list for PBXNativeTarget "SimpleExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5F67BC341A9D9F9200347483 /* Debug */, - 5F67BC351A9D9F9200347483 /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; - 5F67BC361A9D9F9200347483 /* Build configuration list for PBXNativeTarget "SimpleExampleTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5F67BC371A9D9F9200347483 /* Debug */, - 5F67BC381A9D9F9200347483 /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; -/* End XCConfigurationList section */ - }; - rootObject = 5F67BC0C1A9D9F9200347483 /* Project object */; -} diff --git a/Examples/SimpleExample/SimpleExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/SimpleExample/SimpleExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 0816af4..0000000 --- a/Examples/SimpleExample/SimpleExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Examples/SimpleExample/SimpleExample.xcodeproj/project.xcworkspace/xcshareddata/SimpleExample.xccheckout b/Examples/SimpleExample/SimpleExample.xcodeproj/project.xcworkspace/xcshareddata/SimpleExample.xccheckout deleted file mode 100644 index 8198d0c..0000000 --- a/Examples/SimpleExample/SimpleExample.xcodeproj/project.xcworkspace/xcshareddata/SimpleExample.xccheckout +++ /dev/null @@ -1,41 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - 4F736652-7A09-4AFF-A6FE-A75EBF90A7F1 - IDESourceControlProjectName - SimpleExample - IDESourceControlProjectOriginsDictionary - - 9A55608E5CD4363CECFDC3A8DD4BF9A298F03725 - github.com:isair/ManualLayout.git - - IDESourceControlProjectPath - Examples/SimpleExample/SimpleExample.xcodeproj - IDESourceControlProjectRelativeInstallPathDictionary - - 9A55608E5CD4363CECFDC3A8DD4BF9A298F03725 - ../../../.. - - IDESourceControlProjectURL - github.com:isair/ManualLayout.git - IDESourceControlProjectVersion - 111 - IDESourceControlProjectWCCIdentifier - 9A55608E5CD4363CECFDC3A8DD4BF9A298F03725 - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - 9A55608E5CD4363CECFDC3A8DD4BF9A298F03725 - IDESourceControlWCCName - ManualLayout - - - - diff --git a/Examples/SimpleExample/SimpleExample.xcodeproj/xcshareddata/xcschemes/SimpleExample.xcscheme b/Examples/SimpleExample/SimpleExample.xcodeproj/xcshareddata/xcschemes/SimpleExample.xcscheme deleted file mode 100644 index cd0699d..0000000 --- a/Examples/SimpleExample/SimpleExample.xcodeproj/xcshareddata/xcschemes/SimpleExample.xcscheme +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ManualLayout.xcodeproj/project.pbxproj b/ManualLayout.xcodeproj/project.pbxproj index ba5b658..481fc48 100644 --- a/ManualLayout.xcodeproj/project.pbxproj +++ b/ManualLayout.xcodeproj/project.pbxproj @@ -18,11 +18,31 @@ 5F875C691A9BE99F003CACDD /* CALayer+ManualLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F875C681A9BE99F003CACDD /* CALayer+ManualLayout.swift */; }; 5F875C6D1A9BFC7E003CACDD /* UIView+ManualLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F875C6C1A9BFC7E003CACDD /* UIView+ManualLayout.swift */; }; 5F9134781AC9E0830001DBF8 /* CGRect+ManualLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F9134771AC9E0830001DBF8 /* CGRect+ManualLayout.swift */; }; + 5F9134821AC9E1640001DBF8 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F9134811AC9E1640001DBF8 /* AppDelegate.swift */; }; + 5F9134841AC9E1640001DBF8 /* ExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F9134831AC9E1640001DBF8 /* ExampleViewController.swift */; }; + 5F9134891AC9E1640001DBF8 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5F9134881AC9E1640001DBF8 /* Images.xcassets */; }; + 5F91348C1AC9E1640001DBF8 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5F91348A1AC9E1640001DBF8 /* LaunchScreen.xib */; }; + 5F9134981AC9E1640001DBF8 /* SimpleExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F9134971AC9E1640001DBF8 /* SimpleExampleTests.swift */; }; + 5F9134A11AC9E3A00001DBF8 /* ManualLayout.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5FB4CBE91A9BBE7500C2FB4F /* ManualLayout.framework */; }; 5FB4CBEF1A9BBE7500C2FB4F /* ManualLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FB4CBEE1A9BBE7500C2FB4F /* ManualLayout.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5FB4CBF51A9BBE7500C2FB4F /* ManualLayout.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5FB4CBE91A9BBE7500C2FB4F /* ManualLayout.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + 5F9134921AC9E1640001DBF8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 5FB4CBE01A9BBE7500C2FB4F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 5F91347C1AC9E1630001DBF8; + remoteInfo = SimpleExample; + }; + 5F91349F1AC9E3980001DBF8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 5FB4CBE01A9BBE7500C2FB4F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 5FB4CBE81A9BBE7500C2FB4F; + remoteInfo = ManualLayout; + }; 5FB4CBF61A9BBE7500C2FB4F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 5FB4CBE01A9BBE7500C2FB4F /* Project object */; @@ -44,6 +64,15 @@ 5F875C681A9BE99F003CACDD /* CALayer+ManualLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CALayer+ManualLayout.swift"; sourceTree = ""; }; 5F875C6C1A9BFC7E003CACDD /* UIView+ManualLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+ManualLayout.swift"; sourceTree = ""; }; 5F9134771AC9E0830001DBF8 /* CGRect+ManualLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CGRect+ManualLayout.swift"; sourceTree = ""; }; + 5F91347D1AC9E1630001DBF8 /* SimpleExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimpleExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 5F9134801AC9E1630001DBF8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5F9134811AC9E1640001DBF8 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 5F9134831AC9E1640001DBF8 /* ExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleViewController.swift; sourceTree = ""; }; + 5F9134881AC9E1640001DBF8 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 5F91348B1AC9E1640001DBF8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 5F9134911AC9E1640001DBF8 /* SimpleExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SimpleExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 5F9134961AC9E1640001DBF8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5F9134971AC9E1640001DBF8 /* SimpleExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimpleExampleTests.swift; sourceTree = ""; }; 5FB4CBE91A9BBE7500C2FB4F /* ManualLayout.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ManualLayout.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 5FB4CBED1A9BBE7500C2FB4F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5FB4CBEE1A9BBE7500C2FB4F /* ManualLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ManualLayout.h; sourceTree = ""; }; @@ -52,6 +81,21 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 5F91347A1AC9E1630001DBF8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 5F9134A11AC9E3A00001DBF8 /* ManualLayout.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5F91348E1AC9E1640001DBF8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 5FB4CBE51A9BBE7500C2FB4F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -70,11 +114,50 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 5F91347E1AC9E1630001DBF8 /* SimpleExample */ = { + isa = PBXGroup; + children = ( + 5F9134811AC9E1640001DBF8 /* AppDelegate.swift */, + 5F9134831AC9E1640001DBF8 /* ExampleViewController.swift */, + 5F9134881AC9E1640001DBF8 /* Images.xcassets */, + 5F91348A1AC9E1640001DBF8 /* LaunchScreen.xib */, + 5F91347F1AC9E1630001DBF8 /* Supporting Files */, + ); + path = SimpleExample; + sourceTree = ""; + }; + 5F91347F1AC9E1630001DBF8 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 5F9134801AC9E1630001DBF8 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 5F9134941AC9E1640001DBF8 /* SimpleExampleTests */ = { + isa = PBXGroup; + children = ( + 5F9134971AC9E1640001DBF8 /* SimpleExampleTests.swift */, + 5F9134951AC9E1640001DBF8 /* Supporting Files */, + ); + path = SimpleExampleTests; + sourceTree = ""; + }; + 5F9134951AC9E1640001DBF8 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 5F9134961AC9E1640001DBF8 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; 5FB4CBDF1A9BBE7500C2FB4F = { isa = PBXGroup; children = ( 5FB4CBEB1A9BBE7500C2FB4F /* ManualLayout */, 5FB4CBF81A9BBE7500C2FB4F /* ManualLayoutTests */, + 5F91347E1AC9E1630001DBF8 /* SimpleExample */, + 5F9134941AC9E1640001DBF8 /* SimpleExampleTests */, 5FB4CBEA1A9BBE7500C2FB4F /* Products */, ); sourceTree = ""; @@ -84,6 +167,8 @@ children = ( 5FB4CBE91A9BBE7500C2FB4F /* ManualLayout.framework */, 5FB4CBF41A9BBE7500C2FB4F /* ManualLayoutTests.xctest */, + 5F91347D1AC9E1630001DBF8 /* SimpleExample.app */, + 5F9134911AC9E1640001DBF8 /* SimpleExampleTests.xctest */, ); name = Products; sourceTree = ""; @@ -146,6 +231,42 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 5F91347C1AC9E1630001DBF8 /* SimpleExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5F9134991AC9E1640001DBF8 /* Build configuration list for PBXNativeTarget "SimpleExample" */; + buildPhases = ( + 5F9134791AC9E1630001DBF8 /* Sources */, + 5F91347A1AC9E1630001DBF8 /* Frameworks */, + 5F91347B1AC9E1630001DBF8 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 5F9134A01AC9E3980001DBF8 /* PBXTargetDependency */, + ); + name = SimpleExample; + productName = SimpleExample; + productReference = 5F91347D1AC9E1630001DBF8 /* SimpleExample.app */; + productType = "com.apple.product-type.application"; + }; + 5F9134901AC9E1640001DBF8 /* SimpleExampleTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5F91349C1AC9E1640001DBF8 /* Build configuration list for PBXNativeTarget "SimpleExampleTests" */; + buildPhases = ( + 5F91348D1AC9E1640001DBF8 /* Sources */, + 5F91348E1AC9E1640001DBF8 /* Frameworks */, + 5F91348F1AC9E1640001DBF8 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 5F9134931AC9E1640001DBF8 /* PBXTargetDependency */, + ); + name = SimpleExampleTests; + productName = SimpleExampleTests; + productReference = 5F9134911AC9E1640001DBF8 /* SimpleExampleTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; 5FB4CBE81A9BBE7500C2FB4F /* ManualLayout */ = { isa = PBXNativeTarget; buildConfigurationList = 5FB4CBFF1A9BBE7500C2FB4F /* Build configuration list for PBXNativeTarget "ManualLayout" */; @@ -191,6 +312,13 @@ LastUpgradeCheck = 0610; ORGANIZATIONNAME = "Baris Sencan"; TargetAttributes = { + 5F91347C1AC9E1630001DBF8 = { + CreatedOnToolsVersion = 6.2; + }; + 5F9134901AC9E1640001DBF8 = { + CreatedOnToolsVersion = 6.2; + TestTargetID = 5F91347C1AC9E1630001DBF8; + }; 5FB4CBE81A9BBE7500C2FB4F = { CreatedOnToolsVersion = 6.1.1; }; @@ -205,6 +333,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = 5FB4CBDF1A9BBE7500C2FB4F; productRefGroup = 5FB4CBEA1A9BBE7500C2FB4F /* Products */; @@ -213,11 +342,29 @@ targets = ( 5FB4CBE81A9BBE7500C2FB4F /* ManualLayout */, 5FB4CBF31A9BBE7500C2FB4F /* ManualLayoutTests */, + 5F91347C1AC9E1630001DBF8 /* SimpleExample */, + 5F9134901AC9E1640001DBF8 /* SimpleExampleTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 5F91347B1AC9E1630001DBF8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5F91348C1AC9E1640001DBF8 /* LaunchScreen.xib in Resources */, + 5F9134891AC9E1640001DBF8 /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5F91348F1AC9E1640001DBF8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 5FB4CBE71A9BBE7500C2FB4F /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -235,6 +382,23 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 5F9134791AC9E1630001DBF8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5F9134841AC9E1640001DBF8 /* ExampleViewController.swift in Sources */, + 5F9134821AC9E1640001DBF8 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5F91348D1AC9E1640001DBF8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5F9134981AC9E1640001DBF8 /* SimpleExampleTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 5FB4CBE41A9BBE7500C2FB4F /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -263,6 +427,16 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + 5F9134931AC9E1640001DBF8 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 5F91347C1AC9E1630001DBF8 /* SimpleExample */; + targetProxy = 5F9134921AC9E1640001DBF8 /* PBXContainerItemProxy */; + }; + 5F9134A01AC9E3980001DBF8 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 5FB4CBE81A9BBE7500C2FB4F /* ManualLayout */; + targetProxy = 5F91349F1AC9E3980001DBF8 /* PBXContainerItemProxy */; + }; 5FB4CBF71A9BBE7500C2FB4F /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 5FB4CBE81A9BBE7500C2FB4F /* ManualLayout */; @@ -270,7 +444,82 @@ }; /* End PBXTargetDependency section */ +/* Begin PBXVariantGroup section */ + 5F91348A1AC9E1640001DBF8 /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 5F91348B1AC9E1640001DBF8 /* Base */, + ); + name = LaunchScreen.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + /* Begin XCBuildConfiguration section */ + 5F91349A1AC9E1640001DBF8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = SimpleExample/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 5F91349B1AC9E1640001DBF8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + COPY_PHASE_STRIP = NO; + INFOPLIST_FILE = SimpleExample/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 5F91349D1AC9E1640001DBF8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = SimpleExampleTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SimpleExample.app/SimpleExample"; + }; + name = Debug; + }; + 5F91349E1AC9E1640001DBF8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + INFOPLIST_FILE = SimpleExampleTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SimpleExample.app/SimpleExample"; + }; + name = Release; + }; 5FB4CBFD1A9BBE7500C2FB4F /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -424,6 +673,22 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 5F9134991AC9E1640001DBF8 /* Build configuration list for PBXNativeTarget "SimpleExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5F91349A1AC9E1640001DBF8 /* Debug */, + 5F91349B1AC9E1640001DBF8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 5F91349C1AC9E1640001DBF8 /* Build configuration list for PBXNativeTarget "SimpleExampleTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5F91349D1AC9E1640001DBF8 /* Debug */, + 5F91349E1AC9E1640001DBF8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; 5FB4CBE31A9BBE7500C2FB4F /* Build configuration list for PBXProject "ManualLayout" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/ManualLayout/CGRect+ManualLayout.swift b/ManualLayout/CGRect+ManualLayout.swift new file mode 100644 index 0000000..58b2887 --- /dev/null +++ b/ManualLayout/CGRect+ManualLayout.swift @@ -0,0 +1,9 @@ +// +// CGRect+ManualLayout.swift +// ManualLayout +// +// Created by Baris Sencan on 30/03/15. +// Copyright (c) 2015 Baris Sencan. All rights reserved. +// + +import Foundation diff --git a/Examples/SimpleExample/SimpleExample/AppDelegate.swift b/SimpleExample/AppDelegate.swift similarity index 93% rename from Examples/SimpleExample/SimpleExample/AppDelegate.swift rename to SimpleExample/AppDelegate.swift index 0d6a0ad..752b807 100644 --- a/Examples/SimpleExample/SimpleExample/AppDelegate.swift +++ b/SimpleExample/AppDelegate.swift @@ -2,7 +2,7 @@ // AppDelegate.swift // SimpleExample // -// Created by Baris Sencan on 24/02/15. +// Created by Baris Sencan on 30/03/15. // Copyright (c) 2015 Baris Sencan. All rights reserved. // @@ -21,4 +21,3 @@ class AppDelegate: UIResponder, UIApplicationDelegate { return true } } - diff --git a/Examples/SimpleExample/SimpleExample/Base.lproj/LaunchScreen.xib b/SimpleExample/Base.lproj/LaunchScreen.xib similarity index 100% rename from Examples/SimpleExample/SimpleExample/Base.lproj/LaunchScreen.xib rename to SimpleExample/Base.lproj/LaunchScreen.xib diff --git a/Examples/SimpleExample/SimpleExample/ExampleViewController.swift b/SimpleExample/ExampleViewController.swift similarity index 89% rename from Examples/SimpleExample/SimpleExample/ExampleViewController.swift rename to SimpleExample/ExampleViewController.swift index d328142..58a68c7 100644 --- a/Examples/SimpleExample/SimpleExample/ExampleViewController.swift +++ b/SimpleExample/ExampleViewController.swift @@ -2,7 +2,7 @@ // ExampleViewController.swift // SimpleExample // -// Created by Baris Sencan on 24/02/15. +// Created by Baris Sencan on 30/03/15. // Copyright (c) 2015 Baris Sencan. All rights reserved. // @@ -40,12 +40,12 @@ internal final class ExampleViewController: UIViewController { override func viewWillLayoutSubviews() { titleLabel.sizeToFit() titleLabel.top = top + 20 - titleLabel.centerX = view.centerX + titleLabel.centerX = centerX subtitleLabel.sizeToFit() subtitleLabel.top = titleLabel.bottom + 8 - subtitleLabel.centerX = view.centerX - yinView.top = view.height / 2 - yinView.right2 = view.width + subtitleLabel.centerX = centerX + yinView.top = height / 2 + yinView.right2 = right yinView.bottom2 = bottom } diff --git a/Examples/SimpleExample/SimpleExample/Images.xcassets/AppIcon.appiconset/Contents.json b/SimpleExample/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Examples/SimpleExample/SimpleExample/Images.xcassets/AppIcon.appiconset/Contents.json rename to SimpleExample/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/Examples/SimpleExample/SimpleExample/Info.plist b/SimpleExample/Info.plist similarity index 90% rename from Examples/SimpleExample/SimpleExample/Info.plist rename to SimpleExample/Info.plist index 232a7c2..636c87e 100644 --- a/Examples/SimpleExample/SimpleExample/Info.plist +++ b/SimpleExample/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - com.bsencan.ManualLayout.$(PRODUCT_NAME:rfc1034identifier) + com.bsencan.ManualLayout.SimpleExample.$(PRODUCT_NAME:rfc1034identifier) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + 1.1.0 CFBundleSignature ???? CFBundleVersion - 1 + 2 LSRequiresIPhoneOS UILaunchStoryboardName diff --git a/Examples/SimpleExample/SimpleExampleTests/Info.plist b/SimpleExampleTests/Info.plist similarity index 88% rename from Examples/SimpleExample/SimpleExampleTests/Info.plist rename to SimpleExampleTests/Info.plist index 0a22b38..c4e86f4 100644 --- a/Examples/SimpleExample/SimpleExampleTests/Info.plist +++ b/SimpleExampleTests/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - com.bsencan.ManualLayout.$(PRODUCT_NAME:rfc1034identifier) + com.bsencan.ManualLayout.SimpleExample.$(PRODUCT_NAME:rfc1034identifier) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Examples/SimpleExample/SimpleExampleTests/SimpleExampleTests.swift b/SimpleExampleTests/SimpleExampleTests.swift similarity index 95% rename from Examples/SimpleExample/SimpleExampleTests/SimpleExampleTests.swift rename to SimpleExampleTests/SimpleExampleTests.swift index 25e6f88..81e010b 100644 --- a/Examples/SimpleExample/SimpleExampleTests/SimpleExampleTests.swift +++ b/SimpleExampleTests/SimpleExampleTests.swift @@ -2,7 +2,7 @@ // SimpleExampleTests.swift // SimpleExampleTests // -// Created by Baris Sencan on 24/02/15. +// Created by Baris Sencan on 30/03/15. // Copyright (c) 2015 Baris Sencan. All rights reserved. // From 95f15943fdede29f70fae6b2ae56e016f5257d4d Mon Sep 17 00:00:00 2001 From: Baris Sencan Date: Mon, 30 Mar 2015 13:15:50 -0700 Subject: [PATCH 04/11] Make subtitle label multiple lines long --- SimpleExample/ExampleViewController.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SimpleExample/ExampleViewController.swift b/SimpleExample/ExampleViewController.swift index 58a68c7..41a4d76 100644 --- a/SimpleExample/ExampleViewController.swift +++ b/SimpleExample/ExampleViewController.swift @@ -20,8 +20,10 @@ internal final class ExampleViewController: UIViewController { string: "Hello World!", attributes: generateTextStyle()) subtitleLabel.attributedText = NSAttributedString( - string: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", + string: "Lorem ipsum dolor sit amet, pro eu epicurei oportere similique, everti postulant repudiandae ei nam.", attributes: generateTextStyle(smaller: true)) + subtitleLabel.textAlignment = .Center + subtitleLabel.numberOfLines = 3 yinView.backgroundColor = UIColor.blackColor() } @@ -41,7 +43,7 @@ internal final class ExampleViewController: UIViewController { titleLabel.sizeToFit() titleLabel.top = top + 20 titleLabel.centerX = centerX - subtitleLabel.sizeToFit() + subtitleLabel.sizeToFit(width - 40, height / 2 - titleLabel.bottom - 16) subtitleLabel.top = titleLabel.bottom + 8 subtitleLabel.centerX = centerX yinView.top = height / 2 From 91bd2a1055b47ecc7a557d791858197d278ee8e8 Mon Sep 17 00:00:00 2001 From: Baris Sencan Date: Mon, 30 Mar 2015 13:41:27 -0700 Subject: [PATCH 05/11] Base properties on CGRect, not CALayer --- ManualLayout/CALayer+ManualLayout.swift | 155 ++++---------------- ManualLayout/CGRect+ManualLayout.swift | 179 +++++++++++++++++++++++- 2 files changed, 207 insertions(+), 127 deletions(-) diff --git a/ManualLayout/CALayer+ManualLayout.swift b/ManualLayout/CALayer+ManualLayout.swift index 47fe2a0..67145ed 100644 --- a/ManualLayout/CALayer+ManualLayout.swift +++ b/ManualLayout/CALayer+ManualLayout.swift @@ -23,49 +23,23 @@ public extension CALayer { } public var x: CGFloat { - get { - return frame.origin.x - } - set { - frame.origin.x = snapToPixel(pointCoordinate: newValue) - } + get { return frame.x } + set { frame.x = newValue } } public var y: CGFloat { - get { - return frame.origin.y - } - set { - frame.origin.y = snapToPixel(pointCoordinate: newValue) - } - } - - public var center: CGPoint { - get { - return CGPoint(x: centerX, y: centerY) - } - set { - centerX = newValue.x - centerY = newValue.y - } + get { return frame.y } + set { frame.y = newValue } } public var centerX: CGFloat { - get { - return frame.origin.x + frame.size.width / 2 - } - set { - x = newValue - frame.size.width / 2 - } + get { return frame.centerX } + set { frame.centerX = newValue } } public var centerY: CGFloat { - get { - return frame.origin.y + frame.size.height / 2 - } - set { - y = newValue - frame.size.height / 2 - } + get { return frame.centerY } + set { frame.centerY = newValue } } // MARK: - Size @@ -81,127 +55,56 @@ public extension CALayer { } public var width: CGFloat { - get { - return frame.size.width - } - set { - frame.size.width = snapToPixel(pointCoordinate: newValue) - } + get { return frame.width } + set { frame.width = newValue } } public var height: CGFloat { - get { - return frame.size.height - } - set { - frame.size.height = snapToPixel(pointCoordinate: newValue) - } + get { return frame.height } + set { frame.height = newValue } } // MARK: - Edges public var top: CGFloat { - get { - return frame.origin.y - } - set { - y = newValue - } + get { return frame.top } + set { frame.top = newValue } } public var right: CGFloat { - get { - return frame.origin.x + frame.size.width - } - set { - x = newValue - frame.size.width - } + get { return frame.right } + set { frame.right = newValue } } public var bottom: CGFloat { - get { - return frame.origin.y + frame.size.height - } - set { - y = newValue - frame.size.height - } + get { return frame.bottom } + set { frame.bottom = newValue } } public var left: CGFloat { - get { - return frame.origin.x - } - set { - x = newValue - } + get { return frame.left } + set { frame.left = newValue } } // MARK: - Alternative Edges public var top2: CGFloat { - get { - return frame.origin.y - } - set { - if newValue <= bottom { - height += top - newValue - y = newValue - } else { - // Swap top with bottom. - let newTop = bottom - height = newValue - newTop - y = newTop - } - } + get { return frame.top2 } + set { frame.top2 = newValue } } public var right2: CGFloat { - get { - return frame.origin.x + frame.size.width - } - set { - if newValue >= left { - width += newValue - right - } else { - // Swap left with right. - let newRight = left - width = newRight - newValue - x = newValue - } - } + get { return frame.right2 } + set { frame.right2 = newValue } } public var bottom2: CGFloat { - get { - return frame.origin.y + frame.size.height - } - set { - if newValue >= top { - height += newValue - bottom - } else { - // Swap bottom with top. - let newBottom = top - height = newBottom - newValue - y = newValue - } - } + get { return frame.bottom2 } + set { frame.bottom2 = newValue } } public var left2: CGFloat { - get { - return frame.origin.x - } - set { - if newValue <= right { - width += left - newValue - x = newValue - } else { - // Orange is the new black. - // let newBlack = orange - let newLeft = right - width = newValue - newLeft - x = newLeft - } - } + get { return frame.left2 } + set { frame.left2 = newValue } } -} \ No newline at end of file +} diff --git a/ManualLayout/CGRect+ManualLayout.swift b/ManualLayout/CGRect+ManualLayout.swift index 58b2887..8b9a225 100644 --- a/ManualLayout/CGRect+ManualLayout.swift +++ b/ManualLayout/CGRect+ManualLayout.swift @@ -6,4 +6,181 @@ // Copyright (c) 2015 Baris Sencan. All rights reserved. // -import Foundation +import UIKit + +public extension CGRect { + + // MARK: - Position + + public var x: CGFloat { + get { + return origin.x + } + set { + origin.x = snapToPixel(pointCoordinate: newValue) + } + } + + public var y: CGFloat { + get { + return origin.y + } + set { + origin.y = snapToPixel(pointCoordinate: newValue) + } + } + + public var center: CGPoint { + get { + return CGPoint(x: centerX, y: centerY) + } + set { + centerX = newValue.x + centerY = newValue.y + } + } + + public var centerX: CGFloat { + get { + return origin.x + size.width / 2 + } + set { + x = newValue - size.width / 2 + } + } + + public var centerY: CGFloat { + get { + return origin.y + size.height / 2 + } + set { + y = newValue - size.height / 2 + } + } + + // MARK: - Size + + public var width: CGFloat { + get { + return size.width + } + set { + size.width = snapToPixel(pointCoordinate: newValue) + } + } + + public var height: CGFloat { + get { + return size.height + } + set { + size.height = snapToPixel(pointCoordinate: newValue) + } + } + + // MARK: - Edges + + public var top: CGFloat { + get { + return origin.y + } + set { + y = newValue + } + } + + public var right: CGFloat { + get { + return origin.x + size.width + } + set { + x = newValue - size.width + } + } + + public var bottom: CGFloat { + get { + return origin.y + size.height + } + set { + y = newValue - size.height + } + } + + public var left: CGFloat { + get { + return origin.x + } + set { + x = newValue + } + } + + // MARK: - Alternative Edges + + public var top2: CGFloat { + get { + return origin.y + } + set { + if newValue <= bottom { + height += top - newValue + y = newValue + } else { + // Swap top with bottom. + let newTop = bottom + height = newValue - newTop + y = newTop + } + } + } + + public var right2: CGFloat { + get { + return origin.x + size.width + } + set { + if newValue >= left { + width += newValue - right + } else { + // Swap left with right. + let newRight = left + width = newRight - newValue + x = newValue + } + } + } + + public var bottom2: CGFloat { + get { + return origin.y + size.height + } + set { + if newValue >= top { + height += newValue - bottom + } else { + // Swap bottom with top. + let newBottom = top + height = newBottom - newValue + y = newValue + } + } + } + + public var left2: CGFloat { + get { + return origin.x + } + set { + if newValue <= right { + width += left - newValue + x = newValue + } else { + // Swap right with left. + let newLeft = right + width = newValue - newLeft + x = newLeft + } + } + } +} From f92fdac0c6585055287111b8acc6738443fabc3c Mon Sep 17 00:00:00 2001 From: Baris Sencan Date: Mon, 30 Mar 2015 13:42:23 -0700 Subject: [PATCH 06/11] Add bounds property to view controllers --- ManualLayout/UIViewController+ManualLayout.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ManualLayout/UIViewController+ManualLayout.swift b/ManualLayout/UIViewController+ManualLayout.swift index d0e234b..32ed0f2 100644 --- a/ManualLayout/UIViewController+ManualLayout.swift +++ b/ManualLayout/UIViewController+ManualLayout.swift @@ -10,6 +10,10 @@ import UIKit public extension UIViewController { + public var bounds: CGRect { + return view.bounds + } + // MARK: - Center public var center: CGPoint { From 0ec389053a4d0ba6223c1ca3c05e6d1b3dedd900 Mon Sep 17 00:00:00 2001 From: Baris Sencan Date: Mon, 30 Mar 2015 17:25:19 -0700 Subject: [PATCH 07/11] Add back center property to CALayer --- ManualLayout/CALayer+ManualLayout.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ManualLayout/CALayer+ManualLayout.swift b/ManualLayout/CALayer+ManualLayout.swift index 67145ed..8d5642d 100644 --- a/ManualLayout/CALayer+ManualLayout.swift +++ b/ManualLayout/CALayer+ManualLayout.swift @@ -32,6 +32,11 @@ public extension CALayer { set { frame.y = newValue } } + public var center: CGPoint { + get { return frame.center } + set { frame.center = newValue } + } + public var centerX: CGFloat { get { return frame.centerX } set { frame.centerX = newValue } From 99097390e01bf0c9f47c1737bf21bb0f1185d5f7 Mon Sep 17 00:00:00 2001 From: Baris Sencan Date: Mon, 30 Mar 2015 17:37:02 -0700 Subject: [PATCH 08/11] Fix property definition collisions --- ManualLayout/CALayer+ManualLayout.swift | 16 ++++++++--- ManualLayout/CGRect+ManualLayout.swift | 38 ++++++------------------- 2 files changed, 21 insertions(+), 33 deletions(-) diff --git a/ManualLayout/CALayer+ManualLayout.swift b/ManualLayout/CALayer+ManualLayout.swift index 8d5642d..21bb538 100644 --- a/ManualLayout/CALayer+ManualLayout.swift +++ b/ManualLayout/CALayer+ManualLayout.swift @@ -60,13 +60,21 @@ public extension CALayer { } public var width: CGFloat { - get { return frame.width } - set { frame.width = newValue } + get { + return size.width + } + set { + size.width = snapToPixel(pointCoordinate: newValue) + } } public var height: CGFloat { - get { return frame.height } - set { frame.height = newValue } + get { + return size.height + } + set { + size.height = snapToPixel(pointCoordinate: newValue) + } } // MARK: - Edges diff --git a/ManualLayout/CGRect+ManualLayout.swift b/ManualLayout/CGRect+ManualLayout.swift index 8b9a225..059e8f9 100644 --- a/ManualLayout/CGRect+ManualLayout.swift +++ b/ManualLayout/CGRect+ManualLayout.swift @@ -58,26 +58,6 @@ public extension CGRect { } } - // MARK: - Size - - public var width: CGFloat { - get { - return size.width - } - set { - size.width = snapToPixel(pointCoordinate: newValue) - } - } - - public var height: CGFloat { - get { - return size.height - } - set { - size.height = snapToPixel(pointCoordinate: newValue) - } - } - // MARK: - Edges public var top: CGFloat { @@ -124,12 +104,12 @@ public extension CGRect { } set { if newValue <= bottom { - height += top - newValue + size.height += snapToPixel(pointCoordinate: top - newValue) y = newValue } else { // Swap top with bottom. let newTop = bottom - height = newValue - newTop + size.height = snapToPixel(pointCoordinate: newValue - newTop) y = newTop } } @@ -141,11 +121,11 @@ public extension CGRect { } set { if newValue >= left { - width += newValue - right + size.width += snapToPixel(pointCoordinate: newValue - right) } else { // Swap left with right. let newRight = left - width = newRight - newValue + size.width = snapToPixel(pointCoordinate: newRight - newValue) x = newValue } } @@ -157,11 +137,11 @@ public extension CGRect { } set { if newValue >= top { - height += newValue - bottom + size.height += snapToPixel(pointCoordinate: newValue - bottom) } else { // Swap bottom with top. let newBottom = top - height = newBottom - newValue + size.height = snapToPixel(pointCoordinate: newBottom - newValue) y = newValue } } @@ -173,12 +153,12 @@ public extension CGRect { } set { if newValue <= right { - width += left - newValue + size.width += snapToPixel(pointCoordinate: left - newValue) x = newValue } else { - // Swap right with left. + // Swap right with left. let newLeft = right - width = newValue - newLeft + size.width = snapToPixel(pointCoordinate: newValue - newLeft) x = newLeft } } From b2624cd39c22089978e8426dddefea7a588c335b Mon Sep 17 00:00:00 2001 From: Baris Sencan Date: Mon, 30 Mar 2015 17:45:44 -0700 Subject: [PATCH 09/11] Fix infinite loop --- ManualLayout/CALayer+ManualLayout.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ManualLayout/CALayer+ManualLayout.swift b/ManualLayout/CALayer+ManualLayout.swift index 21bb538..f047d2f 100644 --- a/ManualLayout/CALayer+ManualLayout.swift +++ b/ManualLayout/CALayer+ManualLayout.swift @@ -61,19 +61,19 @@ public extension CALayer { public var width: CGFloat { get { - return size.width + return frame.size.width } set { - size.width = snapToPixel(pointCoordinate: newValue) + frame.size.width = snapToPixel(pointCoordinate: newValue) } } public var height: CGFloat { get { - return size.height + return frame.size.height } set { - size.height = snapToPixel(pointCoordinate: newValue) + frame.size.height = snapToPixel(pointCoordinate: newValue) } } From dac43f6dfa137daa6c94675d729a6fd08a8af0f2 Mon Sep 17 00:00:00 2001 From: Baris Sencan Date: Thu, 2 Apr 2015 18:47:32 -0700 Subject: [PATCH 10/11] Update build parameters --- ManualLayout.xcodeproj/project.pbxproj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ManualLayout.xcodeproj/project.pbxproj b/ManualLayout.xcodeproj/project.pbxproj index 481fc48..4b89094 100644 --- a/ManualLayout.xcodeproj/project.pbxproj +++ b/ManualLayout.xcodeproj/project.pbxproj @@ -537,7 +537,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -583,7 +583,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Distribution"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = 1; ENABLE_NS_ASSERTIONS = NO; @@ -680,6 +680,7 @@ 5F91349B1AC9E1640001DBF8 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 5F91349C1AC9E1640001DBF8 /* Build configuration list for PBXNativeTarget "SimpleExampleTests" */ = { isa = XCConfigurationList; @@ -688,6 +689,7 @@ 5F91349E1AC9E1640001DBF8 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 5FB4CBE31A9BBE7500C2FB4F /* Build configuration list for PBXProject "ManualLayout" */ = { isa = XCConfigurationList; From 0ad18d01ce99208dd519126c9d21fa11ebd4f795 Mon Sep 17 00:00:00 2001 From: Baris Sencan Date: Thu, 2 Apr 2015 18:49:21 -0700 Subject: [PATCH 11/11] Set version number to 1.0.0 --- ManualLayout.podspec | 2 +- ManualLayout/Info.plist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ManualLayout.podspec b/ManualLayout.podspec index 7f60ec7..4bca342 100644 --- a/ManualLayout.podspec +++ b/ManualLayout.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'ManualLayout' - s.version = '0.4.1' + s.version = '1.0.0' s.license = { :type => 'MIT', :file => 'LICENSE' } s.summary = 'Easy to use and flexible AutoLayout alternative for iOS 8+. Supports AsyncDisplayKit.' diff --git a/ManualLayout/Info.plist b/ManualLayout/Info.plist index 7130fe1..9fa3f28 100644 --- a/ManualLayout/Info.plist +++ b/ManualLayout/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.4.1 + 1.0.0 CFBundleSignature ???? CFBundleVersion