Skip to content

Commit

Permalink
Merge pull request #7 from abema/swift51
Browse files Browse the repository at this point in the history
Support Xcode11.1 and Swift5.1
  • Loading branch information
yysskk authored Oct 15, 2019
2 parents 81b584e + e874ee6 commit 7e52c0e
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 40 deletions.
32 changes: 17 additions & 15 deletions Cheetah.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1000;
LastUpgradeCheck = 1000;
LastUpgradeCheck = 1110;
ORGANIZATIONNAME = "Suguru Namura";
TargetAttributes = {
6F96CF661B8436F80014443A = {
Expand All @@ -236,7 +236,7 @@
};
6F96CF701B8436F80014443A = {
CreatedOnToolsVersion = 7.0;
LastSwiftMigration = 1000;
LastSwiftMigration = 1110;
};
ED8C38122175D484006203F0 = {
CreatedOnToolsVersion = 10.0;
Expand All @@ -246,7 +246,7 @@
};
buildConfigurationList = 6F96CF611B8436F80014443A /* Build configuration list for PBXProject "Cheetah" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -397,7 +397,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand Down Expand Up @@ -449,7 +449,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -474,8 +474,8 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.2;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -495,8 +495,8 @@
PRODUCT_BUNDLE_IDENTIFIER = io.github.suguru.Cheetah;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.2;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -507,8 +507,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.github.suguru.CheetahTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.2;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -519,8 +519,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.github.suguru.CheetahTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.2;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down Expand Up @@ -560,7 +560,8 @@
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 4.2;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 11.0;
};
Expand Down Expand Up @@ -600,7 +601,8 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 11.0;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
LastUpgradeVersion = "1110"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -29,8 +29,6 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -51,8 +49,6 @@
ReferencedContainer = "container:Cheetah.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
24 changes: 10 additions & 14 deletions Cheetah.xcodeproj/xcshareddata/xcschemes/Cheetah.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
LastUpgradeVersion = "1110"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6F96CF661B8436F80014443A"
BuildableName = "Cheetah.framework"
BlueprintName = "Cheetah"
ReferencedContainer = "container:Cheetah.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6F96CF661B8436F80014443A"
BuildableName = "Cheetah.framework"
BlueprintName = "Cheetah"
ReferencedContainer = "container:Cheetah.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -70,8 +68,6 @@
ReferencedContainer = "container:Cheetah.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
6 changes: 3 additions & 3 deletions Cheetah/Bezier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ struct UnitBezier {
t2 = x
for _ in 0..<8 {
x2 = sampleCurveX(t2) - x
if fabs(x2) < epsilon {
if abs(x2) < epsilon {
return t2
}
d2 = sampleCurveDerivativeX(t2)
if fabs(x2) < 1e-6 {
if abs(x2) < 1e-6 {
break
}
t2 = t2 - x2 / d2
Expand All @@ -71,7 +71,7 @@ struct UnitBezier {

while t0 < t1 {
x2 = sampleCurveX(t2)
if fabs(x2 - x) < epsilon {
if abs(x2 - x) < epsilon {
return t2
}
if x > x2 {
Expand Down
2 changes: 1 addition & 1 deletion Cheetah/CheetahManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import UIKit

open class CheetahManager {

open static let sharedInstance = CheetahManager()
public static let sharedInstance = CheetahManager()

var cheetahs = [UInt32 : Cheetah]()
var counter: UInt32
Expand Down
2 changes: 1 addition & 1 deletion Cheetah/Easings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import UIKit

public typealias Easing = (_ t:CGFloat, _ b:CGFloat, _ c:CGFloat) -> CGFloat

private let F_PI = CGFloat(M_PI)
private let F_PI = CGFloat(Double.pi)

// Calculate cubic bezier curve
public struct Easings {
Expand Down
2 changes: 1 addition & 1 deletion Cheetah/UIView+CheetahAnimation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import UIKit

var cheetahAssociationKey = "cheetahAssociation"

public extension UIView {
extension UIView {

public var cheetah: Cheetah {
get {
Expand Down

0 comments on commit 7e52c0e

Please sign in to comment.