diff --git a/DrapierLayout.xcodeproj/project.pbxproj b/DrapierLayout.xcodeproj/project.pbxproj index c14a67d..52cf7a3 100644 --- a/DrapierLayout.xcodeproj/project.pbxproj +++ b/DrapierLayout.xcodeproj/project.pbxproj @@ -161,7 +161,8 @@ E5323B8C1A9A38A400571CB2 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0630; + LastSwiftUpdateCheck = 0720; + LastUpgradeCheck = 0720; ORGANIZATIONNAME = "Justin Kolb"; TargetAttributes = { E5323B941A9A38A400571CB2 = { @@ -257,6 +258,7 @@ CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; @@ -276,7 +278,6 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_WHOLE_MODULE_OPTIMIZATION = YES; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -316,7 +317,6 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.3; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_WHOLE_MODULE_OPTIMIZATION = YES; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -335,6 +335,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "net.franticapparatus.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; }; @@ -351,6 +352,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "net.franticapparatus.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; }; @@ -359,16 +361,13 @@ E5323BAF1A9A38A400571CB2 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); INFOPLIST_FILE = DrapierLayoutTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "net.franticapparatus.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -376,12 +375,9 @@ E5323BB01A9A38A400571CB2 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); INFOPLIST_FILE = DrapierLayoutTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "net.franticapparatus.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; diff --git a/DrapierLayout.xcodeproj/xcshareddata/xcschemes/DrapierLayout.xcscheme b/DrapierLayout.xcodeproj/xcshareddata/xcschemes/DrapierLayout.xcscheme new file mode 100644 index 0000000..faf02fc --- /dev/null +++ b/DrapierLayout.xcodeproj/xcshareddata/xcschemes/DrapierLayout.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DrapierLayout/DrapierLayout.h b/DrapierLayout/DrapierLayout.h index 573407b..a0780ff 100644 --- a/DrapierLayout/DrapierLayout.h +++ b/DrapierLayout/DrapierLayout.h @@ -1,19 +1,24 @@ +// Copyright (c) 2016 Justin Kolb - http://franticapparatus.net // -// DrapierLayout.h -// DrapierLayout +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: // -// Created by Justin Kolb on 2/22/15. -// Copyright (c) 2015 Justin Kolb. All rights reserved. +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. // +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import -//! Project version number for DrapierLayout. FOUNDATION_EXPORT double DrapierLayoutVersionNumber; - -//! Project version string for DrapierLayout. FOUNDATION_EXPORT const unsigned char DrapierLayoutVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/DrapierLayout/Info.plist b/DrapierLayout/Info.plist index 0353b9e..9f4a4aa 100644 --- a/DrapierLayout/Info.plist +++ b/DrapierLayout/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - net.franticapparatus.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + 1.3.0 CFBundleSignature ???? CFBundleVersion diff --git a/DrapierLayout/Layout.swift b/DrapierLayout/Layout.swift index cb6c17a..93d2da3 100644 --- a/DrapierLayout/Layout.swift +++ b/DrapierLayout/Layout.swift @@ -1,8 +1,4 @@ -// -// Layout.swift -// DrapierLayout -// -// Copyright (c) 2014 Justin Kolb - http://franticapparatus.net +// Copyright (c) 2016 Justin Kolb - http://franticapparatus.net // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,7 +17,6 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -// import UIKit @@ -29,7 +24,7 @@ public let maximumLayoutValue = CGFloat(10_000.0) public extension CGSize { public func rect() -> CGRect { - return CGRect(origin: CGPoint.zeroPoint, size: self) + return CGRect(origin: CGPoint.zero, size: self) } public static func fixedWidth(width: CGFloat) -> CGSize { @@ -130,27 +125,27 @@ public extension CGRect { } } - public func baseline(# descender: CGFloat) -> CGFloat { + public func baseline(descender descender: CGFloat) -> CGFloat { return round(bottom + descender) } - public func baseline(# font: UIFont) -> CGFloat { + public func baseline(font font: UIFont) -> CGFloat { return baseline(descender: font.descender) } - public func firstBaseline(# ascender: CGFloat) -> CGFloat { + public func firstBaseline(ascender ascender: CGFloat) -> CGFloat { return round(top + ascender) } - public func firstBaseline(# font: UIFont) -> CGFloat { + public func firstBaseline(font font: UIFont) -> CGFloat { return firstBaseline(ascender: font.ascender) } - public func capline(# ascender: CGFloat, capHeight: CGFloat) -> CGFloat { + public func capline(ascender ascender: CGFloat, capHeight: CGFloat) -> CGFloat { return round(top + (ascender - capHeight)) } - public func capline(# font: UIFont) -> CGFloat { + public func capline(font font: UIFont) -> CGFloat { return capline(ascender: font.ascender, capHeight: font.capHeight) } diff --git a/DrapierLayoutTests/DrapierLayoutTests.swift b/DrapierLayoutTests/DrapierLayoutTests.swift index 53036c0..84db8fb 100644 --- a/DrapierLayoutTests/DrapierLayoutTests.swift +++ b/DrapierLayoutTests/DrapierLayoutTests.swift @@ -1,36 +1,25 @@ +// Copyright (c) 2016 Justin Kolb - http://franticapparatus.net // -// DrapierLayoutTests.swift -// DrapierLayoutTests +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: // -// Created by Justin Kolb on 10/30/14. -// Copyright (c) 2014 Justin Kolb. All rights reserved. +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. // +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. import UIKit import XCTest class DrapierLayoutTests: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // This is an example of a functional test case. - XCTAssert(true, "Pass") - } - - func testPerformanceExample() { - // This is an example of a performance test case. - self.measureBlock() { - // Put the code you want to measure the time of here. - } - } - } diff --git a/DrapierLayoutTests/Info.plist b/DrapierLayoutTests/Info.plist index 5873e8f..ba72822 100644 --- a/DrapierLayoutTests/Info.plist +++ b/DrapierLayoutTests/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - net.franticapparatus.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName