forked from yankodimitrov/SwiftPasscodeLock
-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathPasscodeLockConfigurationType.swift
More file actions
40 lines (33 loc) · 959 Bytes
/
PasscodeLockConfigurationType.swift
File metadata and controls
40 lines (33 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// PasscodeLockConfigurationType.swift
// PasscodeLock
//
// Created by Yanko Dimitrov on 8/28/15.
// Copyright © 2015 Yanko Dimitrov. All rights reserved.
//
import Foundation
public protocol PasscodeLockConfigurationType {
var repository: PasscodeRepositoryType {get}
var passcodeLength: Int {get}
var isTouchIDAllowed: Bool {get set}
var shouldRequestTouchIDImmediately: Bool {get}
var touchIdReason: String? {get set}
var maximumInccorectPasscodeAttempts: Int {get}
var supportedInterfaceOrientations: UIInterfaceOrientationMask {get}
var shouldAutorotate: Bool {get}
}
// set configuration optionals
extension PasscodeLockConfigurationType {
var passcodeLength: Int {
return 4
}
var maximumInccorectPasscodeAttempts: Int {
return -1
}
var supportedInterfaceOrientations: UIInterfaceOrientationMask {
return .portrait
}
var shouldAutorotate: Bool {
return false
}
}