Skip to content

Commit 39f2e6d

Browse files
committed
feat: migrate to Swift 4.2
1 parent 15bdd83 commit 39f2e6d

5 files changed

Lines changed: 12 additions & 16 deletions

File tree

Demo.xcodeproj/project.pbxproj

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
8D2797471D77E74C00BBAC45 /* StaticTableViewController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D2797401D77E74B00BBAC45 /* StaticTableViewController.framework */; };
1212
8D2797481D77E74C00BBAC45 /* StaticTableViewController.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8D2797401D77E74B00BBAC45 /* StaticTableViewController.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1313
8D654C311F2C2D56005019EF /* DemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D654C301F2C2D56005019EF /* DemoTests.swift */; };
14-
8D83AA391F2CCAF100294181 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8D83AA341F2CCAF100294181 /* Info.plist */; };
1514
8D83AA3B1F2CCAF100294181 /* StaticTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D83AA351F2CCAF100294181 /* StaticTableViewController.swift */; };
1615
8D83AA3C1F2CCAF100294181 /* StaticTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D83AA351F2CCAF100294181 /* StaticTableViewController.swift */; };
1716
8D83AA3D1F2CCAF100294181 /* TableRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D83AA361F2CCAF100294181 /* TableRow.swift */; };
@@ -271,7 +270,7 @@
271270
};
272271
8DB921351D76A0C2006961FE = {
273272
CreatedOnToolsVersion = 7.3;
274-
LastSwiftMigration = 0940;
273+
LastSwiftMigration = 1010;
275274
};
276275
};
277276
};
@@ -314,7 +313,6 @@
314313
isa = PBXResourcesBuildPhase;
315314
buildActionMask = 2147483647;
316315
files = (
317-
8D83AA391F2CCAF100294181 /* Info.plist in Resources */,
318316
8DB921731D76BF0F006961FE /* Main.storyboard in Resources */,
319317
8DB921711D76BF0F006961FE /* Assets.xcassets in Resources */,
320318
8DB921721D76BF0F006961FE /* LaunchScreen.storyboard in Resources */,
@@ -609,8 +607,7 @@
609607
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
610608
PRODUCT_BUNDLE_IDENTIFIER = im.muyexi.Demo;
611609
PRODUCT_NAME = Demo;
612-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
613-
SWIFT_VERSION = 4.0;
610+
SWIFT_VERSION = 4.2;
614611
};
615612
name = Debug;
616613
};
@@ -624,8 +621,7 @@
624621
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
625622
PRODUCT_BUNDLE_IDENTIFIER = im.muyexi.Demo;
626623
PRODUCT_NAME = Demo;
627-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
628-
SWIFT_VERSION = 4.0;
624+
SWIFT_VERSION = 4.2;
629625
};
630626
name = Release;
631627
};

Demo/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
55

66
var window: UIWindow?
77

8-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
8+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
99
return true
1010
}
1111

Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ EXTERNAL SOURCES:
99
:path: "./"
1010

1111
SPEC CHECKSUMS:
12-
StaticTableViewController: 5a16a9030718bba471ca4debddf5f38898b35518
12+
StaticTableViewController: 1a9f58b6667f4d18753ac597f16f339820675111
1313

1414
PODFILE CHECKSUM: b87f909462710db4c678c5c56a4e6af55a5e5287
1515

16-
COCOAPODS: 1.2.1
16+
COCOAPODS: 1.5.3

Sources/StaticTableViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ open class StaticTableViewController: UITableViewController, TableViewConfig {
44

55
open var animateSectionHeaders = false
66

7-
open var insertAnimation: UITableViewRowAnimation = .fade
8-
open var deleteAnimation: UITableViewRowAnimation = .fade
9-
open var reloadAnimation: UITableViewRowAnimation = .fade
7+
open var insertAnimation: UITableView.RowAnimation = .fade
8+
open var deleteAnimation: UITableView.RowAnimation = .fade
9+
open var reloadAnimation: UITableView.RowAnimation = .fade
1010

1111
var tableViewWrapper: TableViewWrapper?
1212

Sources/TableViewWrapper.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import UIKit
22

33
protocol TableViewConfig {
4-
var insertAnimation: UITableViewRowAnimation { get set }
5-
var deleteAnimation: UITableViewRowAnimation { get set }
6-
var reloadAnimation: UITableViewRowAnimation { get set }
4+
var insertAnimation: UITableView.RowAnimation { get set }
5+
var deleteAnimation: UITableView.RowAnimation { get set }
6+
var reloadAnimation: UITableView.RowAnimation { get set }
77

88
var animateSectionHeaders: Bool { get set }
99
}

0 commit comments

Comments
 (0)