diff --git a/Lock/DatabaseView.swift b/Lock/DatabaseView.swift index 51634b28..b9cc8eb7 100644 --- a/Lock/DatabaseView.swift +++ b/Lock/DatabaseView.swift @@ -22,7 +22,7 @@ import UIKit -protocol DatabaseView: class, View { +protocol DatabaseView: AnyObject, View { var form: Form? { get } var secondaryButton: SecondaryButton? { get } var primaryButton: PrimaryButton? { get } diff --git a/Lock/Form.swift b/Lock/Form.swift index 3a032800..3e51c4a2 100644 --- a/Lock/Form.swift +++ b/Lock/Form.swift @@ -22,7 +22,7 @@ import Foundation -protocol Form: class { +protocol Form: AnyObject { var onValueChange: (InputField) -> Void { get set } var onReturn: (InputField) -> Void { get set } var onSubmit: (InputField) -> Bool { get set } diff --git a/Lock/PrimaryButton.swift b/Lock/PrimaryButton.swift index 349e2afd..2e112a4c 100644 --- a/Lock/PrimaryButton.swift +++ b/Lock/PrimaryButton.swift @@ -36,7 +36,7 @@ class PrimaryButton: UIView, Stylable { } } - var title: String? = nil { + var title: String? { didSet { guard let button = self.button else { return } self.layout(title: self.title, inButton: button) diff --git a/Lock/Validators.swift b/Lock/Validators.swift index feb6f529..43ef616f 100644 --- a/Lock/Validators.swift +++ b/Lock/Validators.swift @@ -115,7 +115,7 @@ public class EmailValidator: InputValidator { } } -protocol PasswordPolicyValidatorDelegate: class { +protocol PasswordPolicyValidatorDelegate: AnyObject { func update(withRules rules: [RuleResult]) } diff --git a/LockTests/Interactors/DatabaseInteractorSpec.swift b/LockTests/Interactors/DatabaseInteractorSpec.swift index e4d70b19..ef394f9f 100644 --- a/LockTests/Interactors/DatabaseInteractorSpec.swift +++ b/LockTests/Interactors/DatabaseInteractorSpec.swift @@ -20,6 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +import UIKit import Quick import Nimble import Auth0