diff --git a/PasscodeLock/PasscodeLockViewController.swift b/PasscodeLock/PasscodeLockViewController.swift index 095f10f2..6b9fd481 100644 --- a/PasscodeLock/PasscodeLockViewController.swift +++ b/PasscodeLock/PasscodeLockViewController.swift @@ -110,8 +110,8 @@ public class PasscodeLockViewController: UIViewController, PasscodeLockTypeDeleg private func setupEvents() { - notificationCenter?.addObserver(self, selector: "appWillEnterForegroundHandler:", name: UIApplicationWillEnterForegroundNotification, object: nil) - notificationCenter?.addObserver(self, selector: "appDidEnterBackgroundHandler:", name: UIApplicationDidEnterBackgroundNotification, object: nil) + notificationCenter?.addObserver(self, selector: #selector(PasscodeLockViewController.appWillEnterForegroundHandler(_:)), name: UIApplicationWillEnterForegroundNotification, object: nil) + notificationCenter?.addObserver(self, selector: #selector(PasscodeLockViewController.appDidEnterBackgroundHandler(_:)), name: UIApplicationDidEnterBackgroundNotification, object: nil) } private func clearEvents() { @@ -154,7 +154,7 @@ public class PasscodeLockViewController: UIViewController, PasscodeLockTypeDeleg passcodeLock.authenticateWithBiometrics() } - private func authenticateWithBiometrics() { + public func authenticateWithBiometrics() { if passcodeConfiguration.shouldRequestTouchIDImmediately && passcodeLock.isTouchIDAllowed { diff --git a/PasscodeLock/Views/PasscodeSignButton.swift b/PasscodeLock/Views/PasscodeSignButton.swift index 9fb3968a..dfd9fe0c 100644 --- a/PasscodeLock/Views/PasscodeSignButton.swift +++ b/PasscodeLock/Views/PasscodeSignButton.swift @@ -55,7 +55,7 @@ public class PasscodeSignButton: UIButton { return CGSizeMake(60, 60) } - private var defaultBackgroundColor = UIColor.clearColor() + public var defaultBackgroundColor = UIColor.clearColor() private func setupView() { @@ -71,8 +71,8 @@ public class PasscodeSignButton: UIButton { private func setupActions() { - addTarget(self, action: Selector("handleTouchDown"), forControlEvents: .TouchDown) - addTarget(self, action: Selector("handleTouchUp"), forControlEvents: [.TouchUpInside, .TouchDragOutside, .TouchCancel]) + addTarget(self, action: #selector(PasscodeSignButton.handleTouchDown), forControlEvents: .TouchDown) + addTarget(self, action: #selector(PasscodeSignButton.handleTouchUp), forControlEvents: [.TouchUpInside, .TouchDragOutside, .TouchCancel]) } func handleTouchDown() {