You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.1 KiB
71 lines
2.1 KiB
//
|
|
// BiometricAuthenticationNotificationViewController.swift
|
|
// GME Remit
|
|
//
|
|
// Created by InKwon Devik Kim on 30/04/2019.
|
|
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class BiometricAuthenticationNotificationViewController: UIViewController {
|
|
|
|
// MARK: Properties
|
|
|
|
var presenter: BiometricAuthenticationNotificationModuleInterface?
|
|
|
|
// MARK: IBOutlets
|
|
@IBOutlet weak var useBiometricAuthButton: UIButton!
|
|
@IBOutlet weak var usePasswordButton: UIButton!
|
|
@IBOutlet weak var titleLabel: UILabel!
|
|
@IBOutlet weak var contentLabel: UILabel!
|
|
@IBOutlet weak var manualLabel: UILabel!
|
|
|
|
// MARK: VC's Life cycle
|
|
|
|
override func viewDidLoad() {
|
|
super.viewDidLoad()
|
|
self.setup()
|
|
}
|
|
|
|
// MARK: IBActions
|
|
|
|
@IBAction func touchUseBiometricAuth(_ sender: UIButton) {
|
|
BiometricAuthenticationWireframe().showBiometricAuthentication() { error in
|
|
if error != nil {
|
|
self.alert(type: .error, message: error!.message)
|
|
} else {
|
|
KeyChain.shared.save(data: "1", key: .biometricAuth)
|
|
self.dismiss(animated: true, completion: nil)
|
|
}
|
|
}
|
|
}
|
|
|
|
@IBAction func touchUsePassword(_ sender: UIButton) {
|
|
KeyChain.shared.save(data: "0", key: .biometricAuth)
|
|
self.dismiss(animated: true, completion: nil)
|
|
}
|
|
// MARK: Other Functions
|
|
|
|
private func setup() {
|
|
// all setup should be done here
|
|
useBiometricAuthButton.layer.cornerRadius = 5
|
|
usePasswordButton.layer.cornerRadius = 5
|
|
|
|
setMultiLanguage()
|
|
}
|
|
|
|
private func setMultiLanguage() {
|
|
titleLabel.text = "biometric_noti_title_text".localized()
|
|
contentLabel.text = "biometric_noti_content_text".localized()
|
|
manualLabel.text = "biometric_noti_manual_text".localized()
|
|
|
|
useBiometricAuthButton.setTitle("biometric_noti_biometric_use_button_text".localized(), for: .normal)
|
|
usePasswordButton.setTitle("biometric_noti_password_use_button_text".localized(), for: .normal)
|
|
}
|
|
}
|
|
|
|
// MARK: BiometricAuthenticationNotificationViewInterface
|
|
extension BiometricAuthenticationNotificationViewController: BiometricAuthenticationNotificationViewInterface {
|
|
|
|
}
|