Skip to content

Commit a3d937f

Browse files
committed
Xcode 8.3 update
1 parent ca8a88e commit a3d937f

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

Spring/Misc.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public func htmlToAttributedString(text: String) -> NSAttributedString! {
4343
}
4444

4545
public func degreesToRadians(degrees: CGFloat) -> CGFloat {
46-
return degrees * CGFloat(M_PI / 180)
46+
return degrees * CGFloat(CGFloat.pi / 180)
4747
}
4848

4949
public func delay(delay:Double, closure: @escaping ()->()) {
@@ -202,7 +202,7 @@ public func timeAgoSinceDate(date: Date, numericDates: Bool) -> String {
202202
return "1w"
203203
}
204204
} else if (day >= 2) {
205-
return "\(components.day)d"
205+
return "\(components.day ?? 2)d"
206206
} else if (day >= 1){
207207
if (numericDates){
208208
return "1d"

Spring/Spring.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public class Spring : NSObject {
227227
scaleY = 2*force
228228
case .Fall:
229229
animateFrom = false
230-
rotate = 15 * CGFloat(M_PI/180)
230+
rotate = 15 * CGFloat(CGFloat.pi/180)
231231
y = 600*force
232232
case .Shake:
233233
let animation = CAKeyframeAnimation()
@@ -262,7 +262,7 @@ public class Spring : NSObject {
262262
animation.keyPath = "transform"
263263
animation.fromValue = NSValue(caTransform3D: CATransform3DMakeRotation(0, 0, 0, 0))
264264
animation.toValue = NSValue(caTransform3D:
265-
CATransform3DConcat(perspective, CATransform3DMakeRotation(CGFloat(M_PI), 0, 1, 0)))
265+
CATransform3DConcat(perspective, CATransform3DMakeRotation(CGFloat(CGFloat.pi), 0, 1, 0)))
266266
animation.duration = CFTimeInterval(duration)
267267
animation.beginTime = CACurrentMediaTime() + CFTimeInterval(delay)
268268
animation.timingFunction = getTimingFunction(curve: curve)
@@ -276,7 +276,7 @@ public class Spring : NSObject {
276276
animation.fromValue = NSValue(caTransform3D:
277277
CATransform3DMakeRotation(0, 0, 0, 0))
278278
animation.toValue = NSValue(caTransform3D:
279-
CATransform3DConcat(perspective,CATransform3DMakeRotation(CGFloat(M_PI), 1, 0, 0)))
279+
CATransform3DConcat(perspective,CATransform3DMakeRotation(CGFloat(CGFloat.pi), 1, 0, 0)))
280280
animation.duration = CFTimeInterval(duration)
281281
animation.beginTime = CACurrentMediaTime() + CFTimeInterval(delay)
282282
animation.timingFunction = getTimingFunction(curve: curve)

SpringApp.xcodeproj/project.pbxproj

+7-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@
408408
isa = PBXProject;
409409
attributes = {
410410
LastSwiftUpdateCheck = 0700;
411-
LastUpgradeCheck = 0800;
411+
LastUpgradeCheck = 0830;
412412
ORGANIZATIONNAME = "Meng To";
413413
TargetAttributes = {
414414
1A4FDA321A6E44780099D309 = {
@@ -598,6 +598,7 @@
598598
1A4FDA4D1A6E44780099D309 /* Debug */ = {
599599
isa = XCBuildConfiguration;
600600
buildSettings = {
601+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
601602
CURRENT_PROJECT_VERSION = 1;
602603
DEFINES_MODULE = YES;
603604
DYLIB_COMPATIBILITY_VERSION = 1;
@@ -624,6 +625,7 @@
624625
1A4FDA4E1A6E44780099D309 /* Release */ = {
625626
isa = XCBuildConfiguration;
626627
buildSettings = {
628+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
627629
CURRENT_PROJECT_VERSION = 1;
628630
DEFINES_MODULE = YES;
629631
DYLIB_COMPATIBILITY_VERSION = 1;
@@ -688,8 +690,10 @@
688690
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
689691
CLANG_WARN_EMPTY_BODY = YES;
690692
CLANG_WARN_ENUM_CONVERSION = YES;
693+
CLANG_WARN_INFINITE_RECURSION = YES;
691694
CLANG_WARN_INT_CONVERSION = YES;
692695
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
696+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
693697
CLANG_WARN_UNREACHABLE_CODE = YES;
694698
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
695699
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -732,8 +736,10 @@
732736
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
733737
CLANG_WARN_EMPTY_BODY = YES;
734738
CLANG_WARN_ENUM_CONVERSION = YES;
739+
CLANG_WARN_INFINITE_RECURSION = YES;
735740
CLANG_WARN_INT_CONVERSION = YES;
736741
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
742+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
737743
CLANG_WARN_UNREACHABLE_CODE = YES;
738744
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
739745
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";

SpringApp.xcodeproj/xcshareddata/xcschemes/Spring.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0800"
3+
LastUpgradeVersion = "0830"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

SpringApp.xcodeproj/xcshareddata/xcschemes/SpringApp.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0800"
3+
LastUpgradeVersion = "0830"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

0 commit comments

Comments
 (0)