diff --git a/.travis.yml b/.travis.yml index f624e43..2ba882c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: objective-c -osx_image: xcode7.3 +osx_image: xcode8 git: depth: 10 before_install: diff --git a/Example/GridLogo-example/GridLogo-example.xcodeproj/project.pbxproj b/Example/GridLogo-example/GridLogo-example.xcodeproj/project.pbxproj index 900b213..19fb327 100644 --- a/Example/GridLogo-example/GridLogo-example.xcodeproj/project.pbxproj +++ b/Example/GridLogo-example/GridLogo-example.xcodeproj/project.pbxproj @@ -105,15 +105,16 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0730; + LastUpgradeCheck = 0800; ORGANIZATIONNAME = "The Grid"; TargetAttributes = { 76D9B9281CD47391001A8ADF = { CreatedOnToolsVersion = 7.3; + LastSwiftMigration = 0800; }; }; }; - buildConfigurationList = 76D9B9241CD47391001A8ADF /* Build configuration list for PBXProject "GridLogo-Example" */; + buildConfigurationList = 76D9B9241CD47391001A8ADF /* Build configuration list for PBXProject "GridLogo-example" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; @@ -191,8 +192,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -237,8 +240,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -257,6 +262,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 9.3; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -270,6 +276,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "io.thegrid.GridLogo-Example"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -281,13 +288,14 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "io.thegrid.GridLogo-Example"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 76D9B9241CD47391001A8ADF /* Build configuration list for PBXProject "GridLogo-Example" */ = { + 76D9B9241CD47391001A8ADF /* Build configuration list for PBXProject "GridLogo-example" */ = { isa = XCConfigurationList; buildConfigurations = ( 76D9B9391CD47391001A8ADF /* Debug */, diff --git a/Example/GridLogo-example/GridLogo-example/AppDelegate.swift b/Example/GridLogo-example/GridLogo-example/AppDelegate.swift index 3a312a3..cd90d94 100644 --- a/Example/GridLogo-example/GridLogo-example/AppDelegate.swift +++ b/Example/GridLogo-example/GridLogo-example/AppDelegate.swift @@ -14,30 +14,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } - func applicationWillResignActive(application: UIApplication) { + func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } - func applicationDidEnterBackground(application: UIApplication) { + func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - func applicationWillEnterForeground(application: UIApplication) { + func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } - func applicationDidBecomeActive(application: UIApplication) { + func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - func applicationWillTerminate(application: UIApplication) { + func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } diff --git a/Example/GridLogo-example/GridLogo-example/ViewController.swift b/Example/GridLogo-example/GridLogo-example/ViewController.swift index d2da5b2..44cf138 100644 --- a/Example/GridLogo-example/GridLogo-example/ViewController.swift +++ b/Example/GridLogo-example/GridLogo-example/ViewController.swift @@ -15,29 +15,28 @@ class ViewController: UIViewController { required init?(coder aDecoder: NSCoder) { let size: CGFloat = 100 let duration: Double = 10 - logo = GridLogo(size: size, duration: duration, lineWidth: 1, bgColor: UIColor.grayColor(), fgColor: UIColor.whiteColor(), lineJoin: kCALineJoinMiter) + logo = GridLogo(size: size, duration: duration, lineWidth: 1, bgColor: UIColor.gray, fgColor: UIColor.white, lineJoin: kCALineJoinMiter) super.init(coder: aDecoder) - let dispatchTime: dispatch_time_t = dispatch_time(DISPATCH_TIME_NOW, Int64(duration * Double(NSEC_PER_SEC))) - dispatch_after(dispatchTime, dispatch_get_main_queue(), { - self.logo.updateLineProperties(bgColor: UIColor.greenColor(), fgColor: UIColor.purpleColor(), lineJoin: kCALineJoinBevel) + let dispatchTime: DispatchTime = DispatchTime.now() + Double(Int64(duration * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC) + DispatchQueue.main.asyncAfter(deadline: dispatchTime, execute: { + self.logo.updateLineProperties(bgColor: UIColor.green, fgColor: UIColor.purple, lineJoin: kCALineJoinBevel) }) } override func viewDidLoad() { super.viewDidLoad() - view.backgroundColor = UIColor.blackColor() + view.backgroundColor = UIColor.black - let screenSize: CGRect = UIScreen.mainScreen().bounds + let screenSize: CGRect = UIScreen.main.bounds let screenWidth = screenSize.width let screenHeight = screenSize.height - - logo.frame.offsetInPlace(dx: screenWidth/2, dy: screenHeight/2) + logo.frame.origin.x = screenWidth/2 logo.frame.origin.y = screenHeight/2 - logo.transform = CGAffineTransformMakeRotation(CGFloat(-45).degreesToRadians) + logo.transform = CGAffineTransform(rotationAngle: CGFloat(-45).degreesToRadians) view.addSubview(logo) } @@ -47,11 +46,11 @@ class ViewController: UIViewController { // Dispose of any resources that can be recreated. } - override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) { - coordinator.animateAlongsideTransition({ context in + override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { + coordinator.animate(alongsideTransition: { context in self.logo.frame.origin.x = size.width/2 self.logo.frame.origin.y = size.height/2 - }, completion: .None) + }, completion: .none) } } @@ -75,4 +74,4 @@ extension Float { var doubleValue: Double { return Double(self) } var degreesToRadians: Float { return Float(doubleValue * M_PI / 180) } var radiansToDegrees: Float { return Float(doubleValue * 180 / M_PI) } -} \ No newline at end of file +} diff --git a/GridLogo.xcodeproj/project.pbxproj b/GridLogo.xcodeproj/project.pbxproj index a69ade8..352cc2f 100644 --- a/GridLogo.xcodeproj/project.pbxproj +++ b/GridLogo.xcodeproj/project.pbxproj @@ -155,14 +155,16 @@ attributes = { LastSwiftMigration = 0700; LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0800; ORGANIZATIONNAME = "Rituwall, Inc."; TargetAttributes = { 01F378061B3F13DA0028211B = { CreatedOnToolsVersion = 6.3.2; + LastSwiftMigration = 0800; }; 01F378111B3F13DA0028211B = { CreatedOnToolsVersion = 6.3.2; + LastSwiftMigration = 0800; }; }; }; @@ -242,8 +244,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -292,8 +296,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -314,6 +320,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -327,6 +334,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -339,6 +347,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -348,6 +357,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -358,6 +368,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "io.thegrid.grid.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; }; name = Release; }; @@ -373,6 +384,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "io.thegrid.grid.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -384,6 +396,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "io.thegrid.grid.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; }; name = Release; }; diff --git a/GridLogo.xcodeproj/xcshareddata/xcschemes/GridLogo.xcscheme b/GridLogo.xcodeproj/xcshareddata/xcschemes/GridLogo.xcscheme index 73cef4a..82166a9 100644 --- a/GridLogo.xcodeproj/xcshareddata/xcschemes/GridLogo.xcscheme +++ b/GridLogo.xcodeproj/xcshareddata/xcschemes/GridLogo.xcscheme @@ -1,6 +1,6 @@ CAShapeLayer { - var curr = CGPointZero - var last = CGPointZero - var scalestep: CGFloat - let path = UIBezierPath() - path.moveToPoint(curr) - for i in 0 ..< turns { - scalestep = round((CGFloat(i) + 1) / 2.0) * CGFloat(size) - curr = CGPoint(x: CGFloat(last.x) + (scalestep * CGFloat(xstep[i % 4])), y: CGFloat(last.y) + (scalestep * CGFloat(ystep[i % 4]))) - if i + 1 == turns { - curr = CGPoint(x: CGFloat(curr.x) - (size * CGFloat(xstep[i % 4])), y: CGFloat(curr.y) - (size * CGFloat(ystep[i % 4]))) - } - path.addLineToPoint(curr) - last = curr - } - let shapeLayer = CAShapeLayer() - shapeLayer.path = path.CGPath - shapeLayer.strokeColor = strokeColor.CGColor - shapeLayer.fillColor = nil - shapeLayer.lineWidth = lineWidth - shapeLayer.lineJoin = lineJoin - return shapeLayer - } - - static func getCAAnimationGroup(duration: CFTimeInterval, repeatCount: Float) -> CAAnimationGroup { - - let pathAnimationIn = CABasicAnimation(keyPath: "strokeEnd") - let pathAnimationOut = CABasicAnimation(keyPath: "strokeStart") - let pathAnimationGroup = CAAnimationGroup() - let startPos: CGFloat = 0.0 - let endPos: CGFloat = 1.0 - - pathAnimationIn.fromValue = startPos - pathAnimationIn.toValue = endPos - pathAnimationIn.duration = duration / 2 - pathAnimationIn.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear) - - pathAnimationOut.fromValue = startPos - pathAnimationOut.toValue = endPos - pathAnimationOut.duration = duration / 2 - pathAnimationOut.beginTime = duration / 2 - pathAnimationOut.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear) - - pathAnimationGroup.animations = [pathAnimationIn, pathAnimationOut] - pathAnimationGroup.duration = duration - pathAnimationGroup.repeatCount = repeatCount - pathAnimationGroup.removedOnCompletion = false - pathAnimationGroup.fillMode = kCAFillModeBackwards - - return pathAnimationGroup - } - - private var turns: Int = 9 - private var size: CGFloat - private var reverses: Bool - private var lineWidth: CGFloat - private var bgLayer: CAShapeLayer? = .None - private let fgLayer: CAShapeLayer - - let fadeInAnimation: CABasicAnimation = { - let animation = CABasicAnimation(keyPath: "opacity") - animation.duration = 0.5 - animation.fillMode = kCAFillModeForwards; - animation.fromValue = 0 - return animation - }() - - let fadeOutAnimation: CABasicAnimation = { - let animation = CABasicAnimation(keyPath: "opacity") - animation.duration = 0.5 - animation.fillMode = kCAFillModeForwards; - animation.fromValue = 1 - return animation - }() - - public init( - size s: CGFloat, - duration: CFTimeInterval, - lineWidth lw: CGFloat = 1, - bgColor: UIColor = UIColor(red: 51/255, green: 51/255, blue: 48/255, alpha: 1), - fgColor: UIColor = UIColor(red: 1, green: 246/255, blue: 153/255, alpha: 1), - lineJoin: String = kCALineJoinMiter, - repeatCount: Float = 14.5, - showBackground: Bool = true - ) - { - lineWidth = lw - size = s/4 - reverses = false - fgLayer = GridLogo.shapeLayerWithLogoPath(fgColor, lineJoin: lineJoin, lineWidth: lineWidth, turns: turns, size: size) - let pathAnimationGroup = GridLogo.getCAAnimationGroup(duration, repeatCount: repeatCount) - fgLayer.addAnimation(pathAnimationGroup, forKey: "group") - super.init(frame: CGRectZero) - - userInteractionEnabled = false - layer.addSublayer(fgLayer) - - if showBackground { - bgLayer = GridLogo.shapeLayerWithLogoPath(bgColor, lineJoin: lineJoin, lineWidth: lineWidth, turns: turns, size: size) - } - guard let bgLayer = bgLayer else { return } - layer.insertSublayer(bgLayer, atIndex: 0) - } - - required public init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") + + static let xstep = [1,0,-1,0] + static let ystep = [0,1,0,-1] + + static func shapeLayerWithLogoPath( + _ strokeColor: UIColor, + lineJoin: String, + lineWidth: CGFloat, + turns: Int, + size: CGFloat + ) -> CAShapeLayer { + var curr = CGPoint.zero + var last = CGPoint.zero + var scalestep: CGFloat + let path = UIBezierPath() + path.move(to: curr) + for i in 0 ..< turns { + scalestep = round((CGFloat(i) + 1) / 2.0) * CGFloat(size) + curr = CGPoint(x: CGFloat(last.x) + (scalestep * CGFloat(xstep[i % 4])), y: CGFloat(last.y) + (scalestep * CGFloat(ystep[i % 4]))) + if i + 1 == turns { + curr = CGPoint(x: CGFloat(curr.x) - (size * CGFloat(xstep[i % 4])), y: CGFloat(curr.y) - (size * CGFloat(ystep[i % 4]))) + } + path.addLine(to: curr) + last = curr } - - public func updateLineProperties(bgColor bgColor: UIColor, fgColor: UIColor, lineJoin: String = kCALineJoinMiter) { - bgLayer?.strokeColor = bgColor.CGColor - bgLayer?.lineJoin = lineJoin - fgLayer.strokeColor = fgColor.CGColor - fgLayer.lineJoin = lineJoin + let shapeLayer = CAShapeLayer() + shapeLayer.path = path.cgPath + shapeLayer.strokeColor = strokeColor.cgColor + shapeLayer.fillColor = nil + shapeLayer.lineWidth = lineWidth + shapeLayer.lineJoin = lineJoin + return shapeLayer + } + + static func getCAAnimationGroup(_ duration: CFTimeInterval, repeatCount: Float) -> CAAnimationGroup { + + let pathAnimationIn = CABasicAnimation(keyPath: "strokeEnd") + let pathAnimationOut = CABasicAnimation(keyPath: "strokeStart") + let pathAnimationGroup = CAAnimationGroup() + let startPos: CGFloat = 0.0 + let endPos: CGFloat = 1.0 + + pathAnimationIn.fromValue = startPos + pathAnimationIn.toValue = endPos + pathAnimationIn.duration = duration / 2 + pathAnimationIn.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear) + + pathAnimationOut.fromValue = startPos + pathAnimationOut.toValue = endPos + pathAnimationOut.duration = duration / 2 + pathAnimationOut.beginTime = duration / 2 + pathAnimationOut.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear) + + pathAnimationGroup.animations = [pathAnimationIn, pathAnimationOut] + pathAnimationGroup.duration = duration + pathAnimationGroup.repeatCount = repeatCount + pathAnimationGroup.isRemovedOnCompletion = false + pathAnimationGroup.fillMode = kCAFillModeBackwards + + return pathAnimationGroup + } + + fileprivate var turns: Int = 9 + fileprivate var size: CGFloat + fileprivate var reverses: Bool + fileprivate var lineWidth: CGFloat + fileprivate var bgLayer: CAShapeLayer? = .none + fileprivate let fgLayer: CAShapeLayer + + let fadeInAnimation: CABasicAnimation = { + let animation = CABasicAnimation(keyPath: "opacity") + animation.duration = 0.5 + animation.fillMode = kCAFillModeForwards; + animation.fromValue = 0 + return animation + }() + + let fadeOutAnimation: CABasicAnimation = { + let animation = CABasicAnimation(keyPath: "opacity") + animation.duration = 0.5 + animation.fillMode = kCAFillModeForwards; + animation.fromValue = 1 + return animation + }() + + public init( + size s: CGFloat, + duration: CFTimeInterval, + lineWidth lw: CGFloat = 1, + bgColor: UIColor = UIColor(red: 51/255, green: 51/255, blue: 48/255, alpha: 1), + fgColor: UIColor = UIColor(red: 1, green: 246/255, blue: 153/255, alpha: 1), + lineJoin: String = kCALineJoinMiter, + repeatCount: Float = 14.5, + showBackground: Bool = true + ) + { + lineWidth = lw + size = s/4 + reverses = false + fgLayer = GridLogo.shapeLayerWithLogoPath(fgColor, lineJoin: lineJoin, lineWidth: lineWidth, turns: turns, size: size) + let pathAnimationGroup = GridLogo.getCAAnimationGroup(duration, repeatCount: repeatCount) + fgLayer.add(pathAnimationGroup, forKey: "group") + super.init(frame: CGRect.zero) + + isUserInteractionEnabled = false + layer.addSublayer(fgLayer) + + if showBackground { + bgLayer = GridLogo.shapeLayerWithLogoPath(bgColor, lineJoin: lineJoin, lineWidth: lineWidth, turns: turns, size: size) } -} \ No newline at end of file + guard let bgLayer = bgLayer else { return } + layer.insertSublayer(bgLayer, at: 0) + } + + required public init?(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + public func updateLineProperties(bgColor: UIColor, fgColor: UIColor, lineJoin: String = kCALineJoinMiter) { + bgLayer?.strokeColor = bgColor.cgColor + bgLayer?.lineJoin = lineJoin + fgLayer.strokeColor = fgColor.cgColor + fgLayer.lineJoin = lineJoin + } +} diff --git a/GridLogoTests/GridLogoTests.swift b/GridLogoTests/GridLogoTests.swift index ca622c3..79501cd 100644 --- a/GridLogoTests/GridLogoTests.swift +++ b/GridLogoTests/GridLogoTests.swift @@ -28,7 +28,7 @@ class GridLogoTests: XCTestCase { func testPerformanceExample() { // This is an example of a performance test case. - self.measureBlock() { + self.measure() { // Put the code you want to measure the time of here. } } diff --git a/GridSwiftLogo.podspec b/GridSwiftLogo.podspec index ea20dc6..317b588 100644 --- a/GridSwiftLogo.podspec +++ b/GridSwiftLogo.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "GridSwiftLogo" - s.version = "3.0.7" + s.version = "4.0.0" s.summary = "An animated Grid Logo helper." s.homepage = "https://github.com/the-grid/GridSwiftLogo" s.license = { :type => "MIT" } diff --git a/scripts/build.sh b/scripts/build.sh index f55b858..462cbd3 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -2,8 +2,8 @@ #!/bin/bash # **** Update me when new Xcode versions are released! **** -PLATFORM="platform=iOS Simulator,OS=9.3,name=iPhone 6" -SDK="iphonesimulator9.3" +PLATFORM="platform=iOS Simulator,OS=10.0,name=iPhone 6" +SDK="iphonesimulator10.0" # It is pitch black.