From 5e308d5f0f3f3e15294da8398b4d3992834fe3f9 Mon Sep 17 00:00:00 2001 From: Alexey Gerasimov Date: Wed, 26 Apr 2017 16:44:10 +0300 Subject: [PATCH] Must-overrides now have hints --- .../PassCode/View/BasePassCodeViewController.swift | 8 ++++---- .../PassCode/ViewModel/BasePassCodeViewModel.swift | 6 +++--- .../Services/Network/DefaultNetworkService.swift | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/View/BasePassCodeViewController.swift b/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/View/BasePassCodeViewController.swift index 3b2c40e..e88e3a0 100644 --- a/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/View/BasePassCodeViewController.swift +++ b/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/View/BasePassCodeViewController.swift @@ -154,25 +154,25 @@ open class BasePassCodeViewController: UIViewController { // MARK: - HAVE TO OVERRIDE open var touchIdHint: String { - assertionFailure("You should override this var") + assertionFailure("You should override this var: touchIdHint") return "" } // override to change Images func imageFor(type: PinImageType) -> UIImage { - assertionFailure("Don't use it directly. Override it!") + assertionFailure("You should override this method: imageFor(type: PinImageType)") return UIImage() } // override to change error text func errorDescription(for error: PassCodeError) -> String { - assertionFailure("Don't use it directly. Override it!") + assertionFailure("You should override this method: errorDescription(for error: PassCodeError)") return "" } // override to change action title text func actionTitle(for passCodeControllerState: PassCodeControllerState) -> String { - assertionFailure("Don't use it directly. Override it!") + assertionFailure("You should override this method: actionTitle(for passCodeControllerState: PassCodeControllerState)") return "" } diff --git a/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/ViewModel/BasePassCodeViewModel.swift b/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/ViewModel/BasePassCodeViewModel.swift index b476547..333e65d 100644 --- a/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/ViewModel/BasePassCodeViewModel.swift +++ b/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/ViewModel/BasePassCodeViewModel.swift @@ -100,12 +100,12 @@ open class BasePassCodeViewModel: BaseViewModel { // MARK: - HAVE TO OVERRIDE open func isEnteredPassCodeValid(_ passCode: String) -> Bool { - assertionFailure("Don't use it directly. Override it!") + assertionFailure("You should override this method: isEnteredPassCodeValid(_ passCode: String)") return false } open func authSucceed(_ type: PassCodeAuthType) { - assertionFailure("Don't use it directly. Override it!") + assertionFailure("You should override this method: authSucceed(_ type: PassCodeAuthType)") } // MARK: - Functions that can you can override to use TouchId @@ -115,7 +115,7 @@ open class BasePassCodeViewModel: BaseViewModel { } open func activateTouchIdForUser() { - assertionFailure("Don't use it directly. Override it!") + assertionFailure("You should override this method: activateTouchIdForUser()") } } diff --git a/LeadKitAdditions/LeadKitAdditions/Services/Network/DefaultNetworkService.swift b/LeadKitAdditions/LeadKitAdditions/Services/Network/DefaultNetworkService.swift index 4ff5f9f..67f50b2 100644 --- a/LeadKitAdditions/LeadKitAdditions/Services/Network/DefaultNetworkService.swift +++ b/LeadKitAdditions/LeadKitAdditions/Services/Network/DefaultNetworkService.swift @@ -33,11 +33,11 @@ open class DefaultNetworkService: NetworkService { static let retryLimit = 3 open class var baseUrl: String { - fatalError("You should override this var") + fatalError("You should override this var: baseUrl") } open class var defaultTimeoutInterval: TimeInterval { - fatalError("You should override this var") + fatalError("You should override this var: defaultTimeoutInterval") } public override init(sessionManager: SessionManager) {