mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-04-19 21:15:21 +00:00
COVIDSafe code from version 1.5 (#5)
This commit is contained in:
parent
6b262be150
commit
149daee2e9
21 changed files with 825 additions and 652 deletions
|
@ -9,27 +9,6 @@ import UIKit
|
|||
|
||||
class RegistrationConsentViewController: UIViewController {
|
||||
|
||||
@IBOutlet weak var consentCheckBox: UIButton!
|
||||
@IBOutlet weak var agreeButton: UIButton!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
agreeButton.isEnabled = false
|
||||
consentCheckBox.setImage(UIImage(named: "emptyCheckbox"), for: .normal)
|
||||
consentCheckBox.setImage(UIImage(named: "selectedCheckbox"), for: .selected)
|
||||
updateContinueButton()
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
|
||||
@IBAction func onCheckboxTapped(sender: UIButton) {
|
||||
sender.isSelected = !sender.isSelected
|
||||
self.agreeButton.isEnabled = sender.isSelected
|
||||
updateContinueButton()
|
||||
|
||||
consentCheckBox.accessibilityLabel = sender.isSelected ? "I consent checkbox, checked" : "I consent checkbox, unchecked"
|
||||
}
|
||||
|
||||
@IBAction func onBackTapped(_ sender: UIButton) {
|
||||
self.navigationController?.popViewController(animated: true)
|
||||
}
|
||||
|
@ -38,24 +17,4 @@ class RegistrationConsentViewController: UIViewController {
|
|||
UserDefaults.standard.set(true, forKey: "hasConsented")
|
||||
performSegue(withIdentifier: "iConsentSegue", sender: nil)
|
||||
}
|
||||
|
||||
func updateContinueButton() {
|
||||
if (agreeButton.isEnabled) {
|
||||
agreeButton.backgroundColor = UIColor.covidSafeButtonDarkerColor
|
||||
} else {
|
||||
agreeButton.backgroundColor = UIColor(0xDBDDDD)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
// MARK: - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
|
||||
// Get the new view controller using segue.destination.
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue