Skip to content

Commit 0385f59

Browse files
author
jiaxiang.tan
committed
upgrade to swift5
modified: Example/JXPageControl.xcodeproj/project.pbxproj modified: Example/JXPageControl/AppDelegate.swift modified: Example/Pods/Pods.xcodeproj/project.pbxproj modified: JXPageControl.podspec modified: JXPageControl/Classes/Common/JXPageControlBase.swift modified: JXPageControl/Classes/Common/JXPageControlType.swift modified: JXPageControl/Classes/Transform/JXPageControlFill.swift new file: ReleaseNote.md
1 parent e9ac833 commit 0385f59

8 files changed

Lines changed: 23 additions & 18 deletions

File tree

Example/JXPageControl.xcodeproj/project.pbxproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
607FACE51AFB9204008FA782 /* JXPageControl_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JXPageControl_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
4949
607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5050
607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = "<group>"; };
51+
6E77405A26D77C380010175C /* ReleaseNote.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = ReleaseNote.md; path = ../ReleaseNote.md; sourceTree = "<group>"; };
5152
A8CB0AF3FED8097793856774 /* Pods-JXPageControl_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JXPageControl_Example.release.xcconfig"; path = "Target Support Files/Pods-JXPageControl_Example/Pods-JXPageControl_Example.release.xcconfig"; sourceTree = "<group>"; };
5253
AC47C10AF61EDBD42216C3D7 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
5354
C7A289031C73B4FF5F3F6399 /* Pods-JXPageControl_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JXPageControl_Example.debug.xcconfig"; path = "Target Support Files/Pods-JXPageControl_Example/Pods-JXPageControl_Example.debug.xcconfig"; sourceTree = "<group>"; };
@@ -160,6 +161,7 @@
160161
children = (
161162
43B346F57B28778FC3D9EDB8 /* JXPageControl.podspec */,
162163
AC47C10AF61EDBD42216C3D7 /* README.md */,
164+
6E77405A26D77C380010175C /* ReleaseNote.md */,
163165
2022475EB28DA4F7E79ECD61 /* LICENSE */,
164166
);
165167
name = "Podspec Metadata";
@@ -488,7 +490,7 @@
488490
SWIFT_OBJC_BRIDGING_HEADER = "JXPageControl/JXPageControl_Example-Bridging-Header.h";
489491
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
490492
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
491-
SWIFT_VERSION = 4.0;
493+
SWIFT_VERSION = 5.0;
492494
};
493495
name = Debug;
494496
};
@@ -506,7 +508,7 @@
506508
PRODUCT_NAME = "$(TARGET_NAME)";
507509
SWIFT_OBJC_BRIDGING_HEADER = "JXPageControl/JXPageControl_Example-Bridging-Header.h";
508510
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
509-
SWIFT_VERSION = 4.0;
511+
SWIFT_VERSION = 5.0;
510512
};
511513
name = Release;
512514
};

Example/JXPageControl/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1414
var window: UIWindow?
1515

1616

17-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
17+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1818
// Override point for customization after application launch.
1919
return true
2020
}

Example/Pods/Pods.xcodeproj/project.pbxproj

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

JXPageControl.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'JXPageControl'
11-
s.version = '0.1.3'
11+
s.version = '0.1.4'
1212
s.summary = 'Custom UIPageControl: supports multiple animations, layouts'
1313

1414
# This description is used to generate tags and improve search results.
@@ -30,7 +30,7 @@ Pod::Spec.new do |s|
3030

3131

3232
if s.respond_to? 'swift_version'
33-
s.swift_version = "4.0"
33+
s.swift_version = "5.0"
3434
end
3535

3636
if s.respond_to? 'swift_versions'

JXPageControl/Classes/Common/JXPageControlBase.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import UIKit
2424
addSubview(contentView)
2525
}
2626

27-
open override var contentMode: UIViewContentMode {
27+
open override var contentMode: UIView.ContentMode {
2828
didSet {
2929
switch contentMode {
3030

JXPageControl/Classes/Common/JXPageControlType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public protocol JXPageControlType {
7070
var contentAlignment: JXPageControlAlignment { get set }
7171

7272
/// The content location of the system UIView
73-
var contentMode: UIViewContentMode { get set }
73+
var contentMode: UIView.ContentMode { get set }
7474

7575
/// Inactive hollow figure
7676
var isInactiveHollow: Bool { get set }

JXPageControl/Classes/Transform/JXPageControlFill.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ extension JXPageControlFill {
226226
})
227227

228228
let mask = CAShapeLayer()
229-
mask.fillRule = kCAFillRuleEvenOdd
229+
mask.fillRule = CAShapeLayerFillRule.evenOdd
230230
let bounds = UIBezierPath(rect: layer.bounds)
231231
bounds.append(UIBezierPath(ovalIn: insetRect))
232232
mask.path = bounds.cgPath

ReleaseNote.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# JXPageControl release notes
2+
3+

0 commit comments

Comments
 (0)