diff --git a/Example/AppDelegate.swift b/Example/AppDelegate.swift index 0d21141..98f309e 100644 --- a/Example/AppDelegate.swift +++ b/Example/AppDelegate.swift @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } diff --git a/Sources/CAMediaTimingFunction+Windless.swift b/Sources/CAMediaTimingFunction+Windless.swift index 24bb3cb..8f65e4d 100644 --- a/Sources/CAMediaTimingFunction+Windless.swift +++ b/Sources/CAMediaTimingFunction+Windless.swift @@ -10,11 +10,11 @@ import UIKit public extension CAMediaTimingFunction { - static let linear = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear) + static let linear = CAMediaTimingFunction(name: CAMediaTimingFunctionName.linear) - static let easeIn = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseIn) + static let easeIn = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeIn) - static let easeOut = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut) + static let easeOut = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut) - static let easeInOut = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut) + static let easeInOut = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut) } diff --git a/Sources/Maker.swift b/Sources/Maker.swift index 696ebe2..5a9d3c9 100644 --- a/Sources/Maker.swift +++ b/Sources/Maker.swift @@ -28,7 +28,7 @@ struct Maker { static func makeNotWindlessableLayers(in container: UIView) -> [CALayer] { return container.subviewsHierarchy .filter{ !$0.isWindlessable && $0 != container } - .flatMap { + .compactMap { let copy = CALayer(layer: $0.layer) copy.contents = $0.layer.contents copy.contentsGravity = $0.layer.contentsGravity diff --git a/Sources/TransitionFactory.swift b/Sources/TransitionFactory.swift index 5842812..4a82f7f 100644 --- a/Sources/TransitionFactory.swift +++ b/Sources/TransitionFactory.swift @@ -12,7 +12,7 @@ class TransitionFactory { static func fade() -> CATransition { let transition = CATransition() - transition.type = kCATransitionFade + transition.type = CATransitionType.fade return transition } } diff --git a/Sources/WindlessContext.swift b/Sources/WindlessContext.swift index 11a1ce5..fe2cd1a 100644 --- a/Sources/WindlessContext.swift +++ b/Sources/WindlessContext.swift @@ -43,7 +43,7 @@ extension WindlessContext { animationLayer.endPoint = configuration.direction.location.end animationLayer.colors = [configuration.animationBackgroundColor, configuration.animationLayerColor.withAlphaComponent(configuration.animationLayerOpacity), - configuration.animationBackgroundColor].flatMap{ $0.cgColor } + configuration.animationBackgroundColor].compactMap{ $0.cgColor } animationLayer.locations = DefaultValue.Animation.Locations.from animationLayer.backgroundColor = configuration.animationBackgroundColor.cgColor } @@ -53,7 +53,7 @@ extension WindlessContext { appendMultilineLayersPathIfNeeded(on: path) let maskLayer = CAShapeLayer() maskLayer.path = path.cgPath - maskLayer.fillRule = kCAFillRuleEvenOdd + maskLayer.fillRule = CAShapeLayerFillRule.evenOdd coverLayer.mask = maskLayer } diff --git a/Windless.xcodeproj/project.pbxproj b/Windless.xcodeproj/project.pbxproj index 72a1ef0..f253cb3 100644 --- a/Windless.xcodeproj/project.pbxproj +++ b/Windless.xcodeproj/project.pbxproj @@ -295,16 +295,17 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = Windless; TargetAttributes = { 4A1C00B51FA102E5006DEA4C = { CreatedOnToolsVersion = 9.0; + LastSwiftMigration = 1010; ProvisioningStyle = Manual; }; 52D6D97B1BEFF229002C0205 = { CreatedOnToolsVersion = 7.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; 52D6D9851BEFF229002C0205 = { CreatedOnToolsVersion = 7.1; @@ -454,7 +455,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -480,7 +481,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -497,12 +498,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 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_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -535,7 +538,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -554,12 +557,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 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_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -584,7 +589,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -613,7 +618,7 @@ PRODUCT_NAME = Windless; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -637,7 +642,7 @@ PRODUCT_NAME = Windless; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -650,7 +655,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.Windless.Windless-iOS-Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -663,7 +668,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.Windless.Windless-iOS-Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; diff --git a/Windless.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Windless.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Windless.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Windless.xcodeproj/xcshareddata/xcschemes/Windless-iOS.xcscheme b/Windless.xcodeproj/xcshareddata/xcschemes/Windless-iOS.xcscheme index c1a5e07..1ed68bc 100644 --- a/Windless.xcodeproj/xcshareddata/xcschemes/Windless-iOS.xcscheme +++ b/Windless.xcodeproj/xcshareddata/xcschemes/Windless-iOS.xcscheme @@ -1,6 +1,6 @@ + codeCoverageEnabled = "YES" + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -57,7 +56,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO"