Skip to content

Commit

Permalink
Merge pull request #69 from recruit-lifestyle/develop
Browse files Browse the repository at this point in the history
update to swift4.2
  • Loading branch information
liu044100 authored Jan 10, 2019
2 parents 0c09a44 + c417b1b commit 6155295
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 20 deletions.
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

6 changes: 3 additions & 3 deletions SmileLock-Example/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 26 additions & 10 deletions SmileLock-Example/SmileLock-Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -231,21 +231,21 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0800;
LastUpgradeCheck = 1010;
ORGANIZATIONNAME = rain;
TargetAttributes = {
B7E3A1A91CCC6448005F680E = {
CreatedOnToolsVersion = 7.3;
LastSwiftMigration = 0800;
LastSwiftMigration = 1010;
};
B7E3A1BD1CCC6449005F680E = {
CreatedOnToolsVersion = 7.3;
LastSwiftMigration = 0800;
LastSwiftMigration = 1010;
TestTargetID = B7E3A1A91CCC6448005F680E;
};
B7E3A1C81CCC6449005F680E = {
CreatedOnToolsVersion = 7.3;
LastSwiftMigration = 0800;
LastSwiftMigration = 1010;
TestTargetID = B7E3A1A91CCC6448005F680E;
};
};
Expand Down Expand Up @@ -414,14 +414,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 @@ -463,14 +471,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 @@ -507,7 +523,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "edu.self.SmileLock-Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -522,7 +538,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "edu.self.SmileLock-Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -534,7 +550,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "edu.self.SmileLock-ExampleTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SmileLock-Example.app/SmileLock-Example";
};
name = Debug;
Expand All @@ -547,7 +563,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "edu.self.SmileLock-ExampleTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SmileLock-Example.app/SmileLock-Example";
};
name = Release;
Expand All @@ -559,7 +575,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "edu.self.SmileLock-ExampleUITests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TEST_TARGET_NAME = "SmileLock-Example";
};
name = Debug;
Expand All @@ -571,7 +587,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "edu.self.SmileLock-ExampleUITests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TEST_TARGET_NAME = "SmileLock-Example";
};
name = Release;
Expand Down
2 changes: 1 addition & 1 deletion SmileLock-Example/SmileLock-Example/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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 {
// Override point for customization after application launch.
return true
}
Expand Down
3 changes: 2 additions & 1 deletion SmileLock.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SmileLock"
s.version = "3.0.5"
s.version = "3.0.6"
s.summary = "A library for make a beautiful Passcode Lock View."
s.description = <<-DESC
1. Create a beautiful passcode lock view simply.
Expand All @@ -16,6 +16,7 @@ Pod::Spec.new do |s|

s.author = { 'Rain' => '[email protected]' }

s.swift_version = "4.2"
s.platform = :ios, '9.0'
s.requires_arc = true
s.source = { :git => "https://github.com/recruit-lifestyle/Smile-Lock.git", :tag => s.version.to_s}
Expand Down
4 changes: 2 additions & 2 deletions SmileLock/Classes/PasswordContainerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ open class PasswordContainerView: UIView {
open override var tintColor: UIColor! {
didSet {
guard !isVibrancyEffect else { return }
deleteButton.setTitleColor(tintColor, for: UIControlState())
deleteButton.setTitleColor(tintColor, for: .normal)
passwordDotView.strokeColor = tintColor
touchAuthenticationButton.tintColor = tintColor
passwordInputViews.forEach {
Expand Down Expand Up @@ -151,7 +151,7 @@ open class PasswordContainerView: UIView {
}
}

touchAuthenticationButton.setImage(image, for: UIControlState())
touchAuthenticationButton.setImage(image, for: .normal)
touchAuthenticationButton.tintColor = tintColor
}

Expand Down
2 changes: 1 addition & 1 deletion SmileLock/Classes/PasswordDotView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ open class PasswordDotView: UIView {
private extension PasswordDotView {
//MARK: Animation
func shakeAnimation(withDuration duration: TimeInterval, animations: @escaping () -> (), completion: @escaping () -> ()) {
UIView.animate(withDuration: duration, delay: 0, usingSpringWithDamping: 0.01, initialSpringVelocity: 0.35, options: UIViewAnimationOptions(), animations: {
UIView.animate(withDuration: duration, delay: 0, usingSpringWithDamping: 0.01, initialSpringVelocity: 0.35, options: .curveEaseInOut, animations: {
animations()
}) { _ in
completion()
Expand Down
2 changes: 1 addition & 1 deletion SmileLock/Classes/PasswordInputView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ open class PasswordInputView: UIView {

let circleView = UIView()
let button = UIButton()
open let label = UILabel()
public let label = UILabel()
open var labelFont: UIFont?
fileprivate let fontSizeRatio: CGFloat = 46 / 40
fileprivate let borderWidthRatio: CGFloat = 1 / 26
Expand Down

0 comments on commit 6155295

Please sign in to comment.