mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-04-19 13:05:21 +00:00
COVIDSafe code from version 1.9 (#18)
This commit is contained in:
parent
2257c542ed
commit
3b1d8fa3f4
41 changed files with 4217 additions and 3998 deletions
|
@ -24,6 +24,7 @@ class PersonalDetailsViewController: UIViewController, UITextFieldDelegate, UIPi
|
|||
@IBOutlet weak var postcodeLabel: UILabel!
|
||||
@IBOutlet weak var enterYourDetailsLabel: UILabel!
|
||||
@IBOutlet weak var ageRangeLabel: UILabel!
|
||||
@IBOutlet weak var stepCounterLabel: UILabel!
|
||||
|
||||
var agePicker: UIPickerView?
|
||||
var pickerBarButtonItem: UIBarButtonItem?
|
||||
|
@ -59,6 +60,10 @@ class PersonalDetailsViewController: UIViewController, UITextFieldDelegate, UIPi
|
|||
self.firstnameTextField.inputAccessoryView = toolBar
|
||||
initialLabelTextColour = fullnameLabel.textColor
|
||||
initialTextFieldBorderColour = fullnameLabel.borderColor
|
||||
stepCounterLabel.text = String.localizedStringWithFormat( "stepCounter".localizedString(),
|
||||
1,
|
||||
UserDefaults.standard.bool(forKey: "allowedPermissions") ? 3 : 4
|
||||
)
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
|
@ -66,7 +71,7 @@ class PersonalDetailsViewController: UIViewController, UITextFieldDelegate, UIPi
|
|||
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(notif:)), name: UIResponder.keyboardWillHideNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillChangeFrame(notif:)), name: UIResponder.keyboardWillChangeFrameNotification, object: nil)
|
||||
if(UIAccessibility.isVoiceOverRunning){
|
||||
UIAccessibility.post(notification: .screenChanged, argument: enterYourDetailsLabel)
|
||||
UIAccessibility.post(notification: .screenChanged, argument: stepCounterLabel)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -303,7 +308,12 @@ class PersonalDetailsViewController: UIViewController, UITextFieldDelegate, UIPi
|
|||
|
||||
func updateContinueButton() {
|
||||
firstnameTextField.text = firstnameTextField.text?.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
if (self.ageTextField.text != "" && self.postcodeErrorLabel.isHidden && self.fullNameErrorLabel.isHidden) {
|
||||
if (self.ageTextField.text != "" &&
|
||||
self.postcodeTextField.text != "" &&
|
||||
self.firstnameTextField.text != "" &&
|
||||
self.postcodeErrorLabel.isHidden &&
|
||||
self.fullNameErrorLabel.isHidden) {
|
||||
|
||||
self.continueButton.isEnabled = true
|
||||
self.continueButton.backgroundColor = UIColor.covidSafeButtonDarkerColor
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue