Skip to content

Commit

Permalink
feat: migrate to Swift 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
muyexi committed Nov 8, 2018
1 parent 15bdd83 commit 39f2e6d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
10 changes: 3 additions & 7 deletions Demo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
8D2797471D77E74C00BBAC45 /* StaticTableViewController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D2797401D77E74B00BBAC45 /* StaticTableViewController.framework */; };
8D2797481D77E74C00BBAC45 /* StaticTableViewController.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8D2797401D77E74B00BBAC45 /* StaticTableViewController.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
8D654C311F2C2D56005019EF /* DemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D654C301F2C2D56005019EF /* DemoTests.swift */; };
8D83AA391F2CCAF100294181 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8D83AA341F2CCAF100294181 /* Info.plist */; };
8D83AA3B1F2CCAF100294181 /* StaticTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D83AA351F2CCAF100294181 /* StaticTableViewController.swift */; };
8D83AA3C1F2CCAF100294181 /* StaticTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D83AA351F2CCAF100294181 /* StaticTableViewController.swift */; };
8D83AA3D1F2CCAF100294181 /* TableRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D83AA361F2CCAF100294181 /* TableRow.swift */; };
Expand Down Expand Up @@ -271,7 +270,7 @@
};
8DB921351D76A0C2006961FE = {
CreatedOnToolsVersion = 7.3;
LastSwiftMigration = 0940;
LastSwiftMigration = 1010;
};
};
};
Expand Down Expand Up @@ -314,7 +313,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D83AA391F2CCAF100294181 /* Info.plist in Resources */,
8DB921731D76BF0F006961FE /* Main.storyboard in Resources */,
8DB921711D76BF0F006961FE /* Assets.xcassets in Resources */,
8DB921721D76BF0F006961FE /* LaunchScreen.storyboard in Resources */,
Expand Down Expand Up @@ -609,8 +607,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = im.muyexi.Demo;
PRODUCT_NAME = Demo;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -624,8 +621,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = im.muyexi.Demo;
PRODUCT_NAME = Demo;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion Demo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

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

Expand Down
4 changes: 2 additions & 2 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ EXTERNAL SOURCES:
:path: "./"

SPEC CHECKSUMS:
StaticTableViewController: 5a16a9030718bba471ca4debddf5f38898b35518
StaticTableViewController: 1a9f58b6667f4d18753ac597f16f339820675111

PODFILE CHECKSUM: b87f909462710db4c678c5c56a4e6af55a5e5287

COCOAPODS: 1.2.1
COCOAPODS: 1.5.3
6 changes: 3 additions & 3 deletions Sources/StaticTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ open class StaticTableViewController: UITableViewController, TableViewConfig {

open var animateSectionHeaders = false

open var insertAnimation: UITableViewRowAnimation = .fade
open var deleteAnimation: UITableViewRowAnimation = .fade
open var reloadAnimation: UITableViewRowAnimation = .fade
open var insertAnimation: UITableView.RowAnimation = .fade
open var deleteAnimation: UITableView.RowAnimation = .fade
open var reloadAnimation: UITableView.RowAnimation = .fade

var tableViewWrapper: TableViewWrapper?

Expand Down
6 changes: 3 additions & 3 deletions Sources/TableViewWrapper.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import UIKit

protocol TableViewConfig {
var insertAnimation: UITableViewRowAnimation { get set }
var deleteAnimation: UITableViewRowAnimation { get set }
var reloadAnimation: UITableViewRowAnimation { get set }
var insertAnimation: UITableView.RowAnimation { get set }
var deleteAnimation: UITableView.RowAnimation { get set }
var reloadAnimation: UITableView.RowAnimation { get set }

var animateSectionHeaders: Bool { get set }
}
Expand Down

0 comments on commit 39f2e6d

Please sign in to comment.