Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update swift 4.2 #145

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,12 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0800;
LastUpgradeCheck = 1000;
ORGANIZATIONNAME = "egg swift";
TargetAttributes = {
F690772C1D0D0AE300BE91FE = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 1000;
ProvisioningStyle = Automatic;
};
F692000B1CDB9A530029EF47 = {
Expand Down Expand Up @@ -465,6 +465,7 @@
F69077331D0D0AE300BE91FE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
Expand All @@ -478,7 +479,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.eggswift.ESPullToRefresh;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand All @@ -487,6 +488,7 @@
F69077341D0D0AE300BE91FE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
Expand All @@ -500,7 +502,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.eggswift.ESPullToRefresh;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand All @@ -516,14 +518,22 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -566,14 +576,22 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "1000"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Sources/Animator/ESRefreshFooterAnimator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ open class ESRefreshFooterAnimator: UIView, ESRefreshProtocol, ESRefreshAnimator
}()

fileprivate let indicatorView: UIActivityIndicatorView = {
let indicatorView = UIActivityIndicatorView.init(activityIndicatorStyle: .gray)
let indicatorView = UIActivityIndicatorView.init(style: .gray)
indicatorView.isHidden = true
return indicatorView
}()
Expand Down
6 changes: 3 additions & 3 deletions Sources/Animator/ESRefreshHeaderAnimator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ open class ESRefreshHeaderAnimator: UIView, ESRefreshProtocol, ESRefreshAnimator
}()

fileprivate let indicatorView: UIActivityIndicatorView = {
let indicatorView = UIActivityIndicatorView.init(activityIndicatorStyle: .gray)
let indicatorView = UIActivityIndicatorView.init(style: .gray)
indicatorView.isHidden = true
return indicatorView
}()
Expand Down Expand Up @@ -119,15 +119,15 @@ open class ESRefreshHeaderAnimator: UIView, ESRefreshProtocol, ESRefreshAnimator
titleLabel.text = releaseToRefreshDescription
self.setNeedsLayout()
self.impact()
UIView.animate(withDuration: 0.2, delay: 0.0, options: UIViewAnimationOptions(), animations: {
UIView.animate(withDuration: 0.2, delay: 0.0, options: UIView.AnimationOptions(), animations: {
[weak self] in
self?.imageView.transform = CGAffineTransform(rotationAngle: 0.000001 - CGFloat.pi)
}) { (animated) in }
break
case .pullToRefresh:
titleLabel.text = pullToRefreshDescription
self.setNeedsLayout()
UIView.animate(withDuration: 0.2, delay: 0.0, options: UIViewAnimationOptions(), animations: {
UIView.animate(withDuration: 0.2, delay: 0.0, options: UIView.AnimationOptions(), animations: {
[weak self] in
self?.imageView.transform = CGAffineTransform.identity
}) { (animated) in }
Expand Down
6 changes: 3 additions & 3 deletions Sources/ESPullToRefresh+Manager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@ open class ESRefreshDataManager {
}
}

open static func clearAll() {
public static func clearAll() {
self.clearLastRefreshInfo()
self.clearExpiredTimeIntervalInfo()
}

open static func clearLastRefreshInfo() {
public static func clearLastRefreshInfo() {
UserDefaults.standard.set(nil, forKey: ESRefreshDataManager.lastRefreshKey)
}

open static func clearExpiredTimeIntervalInfo() {
public static func clearExpiredTimeIntervalInfo() {
UserDefaults.standard.set(nil, forKey: ESRefreshDataManager.expiredTimeIntervalKey)
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/ESRefreshProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ fileprivate class ESRefreshImpacter {
return nil
}()

static open func impact() -> Void {
static public func impact() -> Void {
if #available(iOS 10.0, *) {
if let impacter = impacter as? UIImpactFeedbackGenerator {
impacter.impactOccurred()
Expand Down