UI tweaks for PasscodeLockView

This commit is contained in:
Mingshen Sun 2019-09-28 17:37:12 -07:00
parent c4f0462d43
commit 504d9619fc
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
6 changed files with 10 additions and 2 deletions

View file

@ -2,15 +2,17 @@
"images" : [
{
"idiom" : "universal",
"filename" : "Icon-72.png",
"filename" : "Icon-57.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "Icon-60@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "Icon-60@3x.png",
"scale" : "3x"
}
],

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

View file

@ -29,7 +29,7 @@ open class PasscodeLockViewController: UIViewController, UITextFieldDelegate {
open override func loadView() {
super.loadView()
let passcodeTextField = UITextField(frame: CGRect(x: 0, y: 0, width: 300, height: 40))
let passcodeTextField = UITextField()
passcodeTextField.borderStyle = UITextField.BorderStyle.roundedRect
passcodeTextField.placeholder = "EnterPasscode".localize()
passcodeTextField.isSecureTextEntry = true
@ -68,12 +68,14 @@ open class PasscodeLockViewController: UIViewController, UITextFieldDelegate {
}
}
biometryAuthButton.setTitle(biometryType, for: .normal)
biometryAuthButton.titleLabel?.font = UIFont.systemFont(ofSize: UIFont.systemFontSize)
biometryAuthButton.isHidden = false
}
}
let forgotPasscodeButton = UIButton(type: .custom)
forgotPasscodeButton.setTitle("ForgotYourPasscode?".localize(), for: .normal)
forgotPasscodeButton.titleLabel?.font = UIFont.systemFont(ofSize: UIFont.systemFontSize)
forgotPasscodeButton.setTitleColor(Globals.blue, for: .normal)
forgotPasscodeButton.addTarget(self, action: #selector(forgotPasscodeButtonPressedAction(_:)), for: .touchUpInside)
// hide the forgotPasscodeButton if the native app is running
@ -129,6 +131,10 @@ open class PasscodeLockViewController: UIViewController, UITextFieldDelegate {
forgotPasscodeButton.bottomAnchor.constraint(equalTo: self.view.safeBottomAnchor, constant: -40)
])
// dismiss keyboard when tapping anywhere
let tap = UITapGestureRecognizer(target: self.view, action: #selector(UIView.endEditing))
view.addGestureRecognizer(tap)
}
open override func viewDidLoad() {