Skip to content

Commit 6155295

Browse files
authored
Merge pull request #69 from recruit-lifestyle/develop
update to swift4.2
2 parents 0c09a44 + c417b1b commit 6155295

8 files changed

Lines changed: 36 additions & 20 deletions

File tree

.swift-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

SmileLock-Example/Pods/Pods.xcodeproj/project.pbxproj

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

SmileLock-Example/SmileLock-Example.xcodeproj/project.pbxproj

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -231,21 +231,21 @@
231231
isa = PBXProject;
232232
attributes = {
233233
LastSwiftUpdateCheck = 0730;
234-
LastUpgradeCheck = 0800;
234+
LastUpgradeCheck = 1010;
235235
ORGANIZATIONNAME = rain;
236236
TargetAttributes = {
237237
B7E3A1A91CCC6448005F680E = {
238238
CreatedOnToolsVersion = 7.3;
239-
LastSwiftMigration = 0800;
239+
LastSwiftMigration = 1010;
240240
};
241241
B7E3A1BD1CCC6449005F680E = {
242242
CreatedOnToolsVersion = 7.3;
243-
LastSwiftMigration = 0800;
243+
LastSwiftMigration = 1010;
244244
TestTargetID = B7E3A1A91CCC6448005F680E;
245245
};
246246
B7E3A1C81CCC6449005F680E = {
247247
CreatedOnToolsVersion = 7.3;
248-
LastSwiftMigration = 0800;
248+
LastSwiftMigration = 1010;
249249
TestTargetID = B7E3A1A91CCC6448005F680E;
250250
};
251251
};
@@ -414,14 +414,22 @@
414414
CLANG_CXX_LIBRARY = "libc++";
415415
CLANG_ENABLE_MODULES = YES;
416416
CLANG_ENABLE_OBJC_ARC = YES;
417+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
417418
CLANG_WARN_BOOL_CONVERSION = YES;
419+
CLANG_WARN_COMMA = YES;
418420
CLANG_WARN_CONSTANT_CONVERSION = YES;
421+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
419422
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
420423
CLANG_WARN_EMPTY_BODY = YES;
421424
CLANG_WARN_ENUM_CONVERSION = YES;
422425
CLANG_WARN_INFINITE_RECURSION = YES;
423426
CLANG_WARN_INT_CONVERSION = YES;
427+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
428+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
429+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
424430
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
431+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
432+
CLANG_WARN_STRICT_PROTOTYPES = YES;
425433
CLANG_WARN_SUSPICIOUS_MOVE = YES;
426434
CLANG_WARN_UNREACHABLE_CODE = YES;
427435
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -463,14 +471,22 @@
463471
CLANG_CXX_LIBRARY = "libc++";
464472
CLANG_ENABLE_MODULES = YES;
465473
CLANG_ENABLE_OBJC_ARC = YES;
474+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
466475
CLANG_WARN_BOOL_CONVERSION = YES;
476+
CLANG_WARN_COMMA = YES;
467477
CLANG_WARN_CONSTANT_CONVERSION = YES;
478+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
468479
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
469480
CLANG_WARN_EMPTY_BODY = YES;
470481
CLANG_WARN_ENUM_CONVERSION = YES;
471482
CLANG_WARN_INFINITE_RECURSION = YES;
472483
CLANG_WARN_INT_CONVERSION = YES;
484+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
485+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
486+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
473487
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
488+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
489+
CLANG_WARN_STRICT_PROTOTYPES = YES;
474490
CLANG_WARN_SUSPICIOUS_MOVE = YES;
475491
CLANG_WARN_UNREACHABLE_CODE = YES;
476492
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -507,7 +523,7 @@
507523
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
508524
PRODUCT_BUNDLE_IDENTIFIER = "edu.self.SmileLock-Example";
509525
PRODUCT_NAME = "$(TARGET_NAME)";
510-
SWIFT_VERSION = 4.0;
526+
SWIFT_VERSION = 4.2;
511527
};
512528
name = Debug;
513529
};
@@ -522,7 +538,7 @@
522538
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
523539
PRODUCT_BUNDLE_IDENTIFIER = "edu.self.SmileLock-Example";
524540
PRODUCT_NAME = "$(TARGET_NAME)";
525-
SWIFT_VERSION = 4.0;
541+
SWIFT_VERSION = 4.2;
526542
};
527543
name = Release;
528544
};
@@ -534,7 +550,7 @@
534550
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
535551
PRODUCT_BUNDLE_IDENTIFIER = "edu.self.SmileLock-ExampleTests";
536552
PRODUCT_NAME = "$(TARGET_NAME)";
537-
SWIFT_VERSION = 4.0;
553+
SWIFT_VERSION = 4.2;
538554
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SmileLock-Example.app/SmileLock-Example";
539555
};
540556
name = Debug;
@@ -547,7 +563,7 @@
547563
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
548564
PRODUCT_BUNDLE_IDENTIFIER = "edu.self.SmileLock-ExampleTests";
549565
PRODUCT_NAME = "$(TARGET_NAME)";
550-
SWIFT_VERSION = 4.0;
566+
SWIFT_VERSION = 4.2;
551567
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SmileLock-Example.app/SmileLock-Example";
552568
};
553569
name = Release;
@@ -559,7 +575,7 @@
559575
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
560576
PRODUCT_BUNDLE_IDENTIFIER = "edu.self.SmileLock-ExampleUITests";
561577
PRODUCT_NAME = "$(TARGET_NAME)";
562-
SWIFT_VERSION = 4.0;
578+
SWIFT_VERSION = 4.2;
563579
TEST_TARGET_NAME = "SmileLock-Example";
564580
};
565581
name = Debug;
@@ -571,7 +587,7 @@
571587
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
572588
PRODUCT_BUNDLE_IDENTIFIER = "edu.self.SmileLock-ExampleUITests";
573589
PRODUCT_NAME = "$(TARGET_NAME)";
574-
SWIFT_VERSION = 4.0;
590+
SWIFT_VERSION = 4.2;
575591
TEST_TARGET_NAME = "SmileLock-Example";
576592
};
577593
name = Release;

SmileLock-Example/SmileLock-Example/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

1515
var window: UIWindow?
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
}

SmileLock.podspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "SmileLock"
3-
s.version = "3.0.5"
3+
s.version = "3.0.6"
44
s.summary = "A library for make a beautiful Passcode Lock View."
55
s.description = <<-DESC
66
1. Create a beautiful passcode lock view simply.
@@ -16,6 +16,7 @@ Pod::Spec.new do |s|
1616

1717
s.author = { 'Rain' => 'liu044100@gmail.com' }
1818

19+
s.swift_version = "4.2"
1920
s.platform = :ios, '9.0'
2021
s.requires_arc = true
2122
s.source = { :git => "https://github.com/recruit-lifestyle/Smile-Lock.git", :tag => s.version.to_s}

SmileLock/Classes/PasswordContainerView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ open class PasswordContainerView: UIView {
5252
open override var tintColor: UIColor! {
5353
didSet {
5454
guard !isVibrancyEffect else { return }
55-
deleteButton.setTitleColor(tintColor, for: UIControlState())
55+
deleteButton.setTitleColor(tintColor, for: .normal)
5656
passwordDotView.strokeColor = tintColor
5757
touchAuthenticationButton.tintColor = tintColor
5858
passwordInputViews.forEach {
@@ -151,7 +151,7 @@ open class PasswordContainerView: UIView {
151151
}
152152
}
153153

154-
touchAuthenticationButton.setImage(image, for: UIControlState())
154+
touchAuthenticationButton.setImage(image, for: .normal)
155155
touchAuthenticationButton.tintColor = tintColor
156156
}
157157

SmileLock/Classes/PasswordDotView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ open class PasswordDotView: UIView {
123123
private extension PasswordDotView {
124124
//MARK: Animation
125125
func shakeAnimation(withDuration duration: TimeInterval, animations: @escaping () -> (), completion: @escaping () -> ()) {
126-
UIView.animate(withDuration: duration, delay: 0, usingSpringWithDamping: 0.01, initialSpringVelocity: 0.35, options: UIViewAnimationOptions(), animations: {
126+
UIView.animate(withDuration: duration, delay: 0, usingSpringWithDamping: 0.01, initialSpringVelocity: 0.35, options: .curveEaseInOut, animations: {
127127
animations()
128128
}) { _ in
129129
completion()

SmileLock/Classes/PasswordInputView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ open class PasswordInputView: UIView {
1919

2020
let circleView = UIView()
2121
let button = UIButton()
22-
open let label = UILabel()
22+
public let label = UILabel()
2323
open var labelFont: UIFont?
2424
fileprivate let fontSizeRatio: CGFloat = 46 / 40
2525
fileprivate let borderWidthRatio: CGFloat = 1 / 26

0 commit comments

Comments
 (0)