Must-overrides now have hints
This commit is contained in:
parent
1f6a443742
commit
5e308d5f0f
|
|
@ -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 ""
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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()")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue