Migrate to Swift 5.0
This commit is contained in:
parent
e06413b348
commit
f9c19b3ca4
26 changed files with 143 additions and 152 deletions
|
|
@ -47,8 +47,8 @@ open class PasscodeLockPresenter {
|
|||
}
|
||||
|
||||
fileprivate func moveWindowsToFront(windowLevel: CGFloat?) {
|
||||
let windowLevel = windowLevel ?? UIWindowLevelNormal
|
||||
let maxWinLevel = max(windowLevel, UIWindowLevelNormal)
|
||||
passcodeLockWindow?.windowLevel = maxWinLevel + 1
|
||||
let windowLevel = windowLevel ?? UIWindow.Level.normal.rawValue
|
||||
let maxWinLevel = max(windowLevel, UIWindow.Level.normal.rawValue)
|
||||
passcodeLockWindow?.windowLevel = UIWindow.Level(rawValue: maxWinLevel + 1)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@ open class PasscodeLockViewController: UIViewController, UITextFieldDelegate {
|
|||
self.passcodeWrongAttemptsLabel = passcodeWrongAttemptsLabel
|
||||
|
||||
let passcodeTextField = UITextField(frame: CGRect(x: 0, y: 0, width: 300, height: 40))
|
||||
passcodeTextField.borderStyle = UITextBorderStyle.roundedRect
|
||||
passcodeTextField.borderStyle = UITextField.BorderStyle.roundedRect
|
||||
passcodeTextField.placeholder = "Passcode".localize()
|
||||
passcodeTextField.isSecureTextEntry = true
|
||||
passcodeTextField.clearButtonMode = UITextFieldViewMode.whileEditing
|
||||
passcodeTextField.clearButtonMode = UITextField.ViewMode.whileEditing
|
||||
passcodeTextField.delegate = self
|
||||
passcodeTextField.addTarget(self, action: #selector(self.passcodeTextFieldDidChange(_:)), for: UIControlEvents.editingChanged)
|
||||
passcodeTextField.addTarget(self, action: #selector(self.passcodeTextFieldDidChange(_:)), for: UIControl.Event.editingChanged)
|
||||
self.view.backgroundColor = UIColor.white
|
||||
passcodeTextField.translatesAutoresizingMaskIntoConstraints = false
|
||||
self.view.addSubview(passcodeTextField)
|
||||
|
|
@ -88,7 +88,7 @@ open class PasscodeLockViewController: UIViewController, UITextFieldDelegate {
|
|||
cancelButton.addTarget(self, action: #selector(passcodeLockDidCancel), for: .touchUpInside)
|
||||
cancelButton.isHidden = !self.isCancellable
|
||||
cancelButton.translatesAutoresizingMaskIntoConstraints = false
|
||||
cancelButton.contentHorizontalAlignment = UIControlContentHorizontalAlignment.left
|
||||
cancelButton.contentHorizontalAlignment = UIControl.ContentHorizontalAlignment.left
|
||||
self.view.addSubview(cancelButton)
|
||||
self.cancelButton = cancelButton
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue