Skip to content
This repository was archived by the owner on Apr 16, 2022. It is now read-only.

Commit a3847be

Browse files
authored
Merge pull request #106 from natmark/support-swift-4.2
Support swift 4.2
2 parents 7730d13 + 6da41b9 commit a3847be

7 files changed

Lines changed: 17 additions & 17 deletions

File tree

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0.2
1+
4.2.1

ProcessingKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "ProcessingKit"
3-
s.version = "1.2.0"
3+
s.version = "1.3.0"
44
s.summary = "Visual Designing library for iOS."
55
s.description = <<-DESC
66
ProcessingKit is a Visual Designing library for iOS.

ProcessingKit.xcodeproj/project.pbxproj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@
909909
SKIP_INSTALL = YES;
910910
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
911911
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
912-
SWIFT_VERSION = 4.0;
912+
SWIFT_VERSION = 4.2;
913913
};
914914
name = Debug;
915915
};
@@ -931,7 +931,7 @@
931931
PRODUCT_NAME = "$(TARGET_NAME)";
932932
SKIP_INSTALL = YES;
933933
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
934-
SWIFT_VERSION = 4.0;
934+
SWIFT_VERSION = 4.2;
935935
};
936936
name = Release;
937937
};
@@ -945,7 +945,7 @@
945945
PRODUCT_BUNDLE_IDENTIFIER = io.github.natmark.ProcessingKitTests;
946946
PRODUCT_NAME = "$(TARGET_NAME)";
947947
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
948-
SWIFT_VERSION = 4.0;
948+
SWIFT_VERSION = 4.2;
949949
};
950950
name = Debug;
951951
};
@@ -959,7 +959,7 @@
959959
PRODUCT_BUNDLE_IDENTIFIER = io.github.natmark.ProcessingKitTests;
960960
PRODUCT_NAME = "$(TARGET_NAME)";
961961
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
962-
SWIFT_VERSION = 4.0;
962+
SWIFT_VERSION = 4.2;
963963
};
964964
name = Release;
965965
};
@@ -984,7 +984,7 @@
984984
SKIP_INSTALL = YES;
985985
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
986986
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
987-
SWIFT_VERSION = 4.0;
987+
SWIFT_VERSION = 4.2;
988988
};
989989
name = Debug;
990990
};
@@ -1008,7 +1008,7 @@
10081008
PROVISIONING_PROFILE_SPECIFIER = "";
10091009
SKIP_INSTALL = YES;
10101010
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1011-
SWIFT_VERSION = 4.0;
1011+
SWIFT_VERSION = 4.2;
10121012
};
10131013
name = Release;
10141014
};
@@ -1042,7 +1042,7 @@
10421042
PRODUCT_NAME = "$(TARGET_NAME)";
10431043
SDKROOT = macosx;
10441044
SKIP_INSTALL = YES;
1045-
SWIFT_VERSION = 4.0;
1045+
SWIFT_VERSION = 4.2;
10461046
};
10471047
name = Debug;
10481048
};
@@ -1076,7 +1076,7 @@
10761076
PRODUCT_NAME = "$(TARGET_NAME)";
10771077
SDKROOT = macosx;
10781078
SKIP_INSTALL = YES;
1079-
SWIFT_VERSION = 4.0;
1079+
SWIFT_VERSION = 4.2;
10801080
};
10811081
name = Release;
10821082
};
@@ -1109,7 +1109,7 @@
11091109
PRODUCT_NAME = ProcessingKit;
11101110
SDKROOT = macosx;
11111111
SKIP_INSTALL = YES;
1112-
SWIFT_VERSION = 4.0;
1112+
SWIFT_VERSION = 4.2;
11131113
};
11141114
name = Debug;
11151115
};
@@ -1142,7 +1142,7 @@
11421142
PRODUCT_NAME = ProcessingKit;
11431143
SDKROOT = macosx;
11441144
SKIP_INSTALL = YES;
1145-
SWIFT_VERSION = 4.0;
1145+
SWIFT_VERSION = 4.2;
11461146
};
11471147
name = Release;
11481148
};

ProcessingKit/Core/Extensions/String.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Cocoa
1515
extension String {
1616
func height(withConstrainedWidth width: CGFloat, font: UIFont) -> CGFloat {
1717
let constraintRect = CGSize(width: width, height: .greatestFiniteMagnitude)
18-
let boundingBox = self.boundingRect(with: constraintRect, options: .usesLineFragmentOrigin, attributes: [NSAttributedStringKey.font: font], context: nil)
18+
let boundingBox = self.boundingRect(with: constraintRect, options: .usesLineFragmentOrigin, attributes: [NSAttributedString.Key.font: font], context: nil)
1919

2020
return ceil(boundingBox.height)
2121
}

ProcessingKit/Core/Input/Gesture.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public enum GestureEvent {
1919
case didTap
2020
case didRelease
2121
case didDrag
22-
case didSwipe(direction: UISwipeGestureRecognizerDirection)
22+
case didSwipe(direction: UISwipeGestureRecognizer.Direction)
2323
case didPinch(scale: CGFloat, velocity: CGFloat)
2424
case didRotate(rotation: CGFloat, velocity: CGFloat)
2525
case didLongPress

ProcessingKit/Core/Typography/Text.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public struct TextModel: TextModelContract {
7676
let paragraph = NSMutableParagraphStyle()
7777
paragraph.alignment = self.textComponents.textAlignX
7878

79-
let attributes: [NSAttributedStringKey: Any] = [NSAttributedStringKey.paragraphStyle: paragraph]
79+
let attributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.paragraphStyle: paragraph]
8080

8181
let attrString = NSMutableAttributedString(string: str, attributes: attributes)
8282

@@ -96,7 +96,7 @@ public struct TextModel: TextModelContract {
9696
}
9797

9898
public func textWidth(_ str: String) -> CGFloat {
99-
let size = str.size(withAttributes: [NSAttributedStringKey.font: self.textComponents.textFont])
99+
let size = str.size(withAttributes: [NSAttributedString.Key.font: self.textComponents.textFont])
100100
return size.width
101101
}
102102

ProcessingKit/ProcessingView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import Cocoa
2424
@objc optional func didTap()
2525
@objc optional func didRelease()
2626
@objc optional func didDrag() //Pan
27-
@objc optional func didSwipe(direction: UISwipeGestureRecognizerDirection)
27+
@objc optional func didSwipe(direction: UISwipeGestureRecognizer.Direction)
2828
@objc optional func didPinch(scale: CGFloat, velocity: CGFloat)
2929
@objc optional func didRotate(rotation: CGFloat, velocity: CGFloat)
3030
@objc optional func didLongPress()

0 commit comments

Comments
 (0)