mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-05-10 15:25:18 +00:00
COVIDSafe code from version 2.4 (#45)
This commit is contained in:
parent
f14aa60482
commit
377bc0009b
63 changed files with 3096 additions and 372 deletions
CovidSafe
|
@ -14,6 +14,7 @@ class ChangePostcodeViewController: UIViewController {
|
|||
@IBOutlet weak var postcodeTextField: UITextField!
|
||||
@IBOutlet weak var postcodeErrorLabel: UILabel!
|
||||
@IBOutlet weak var changePostcodeTextView: UITextView!
|
||||
@IBOutlet weak var scrollView: UIScrollView!
|
||||
|
||||
var nextBarButtonItem: UIBarButtonItem?
|
||||
var initialTextFieldBorderColour: UIColor?
|
||||
|
@ -175,6 +176,13 @@ extension ChangePostcodeViewController: UITextFieldDelegate {
|
|||
if UIAccessibility.isVoiceOverRunning {
|
||||
UIAccessibility.post(notification: .layoutChanged, argument: postcodeErrorLabel)
|
||||
}
|
||||
// need to wait for stack view to update and then get the new content size
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
||||
if self.scrollView.contentSize.height > self.scrollView.bounds.height {
|
||||
let bottomOffset = CGPoint(x: 0, y: self.scrollView.contentSize.height - self.scrollView.bounds.height + self.scrollView.contentInset.bottom)
|
||||
self.scrollView.setContentOffset(bottomOffset, animated: true)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
postcodeErrorLabel.isHidden = true
|
||||
postcodeTextField.borderColor = initialTextFieldBorderColour
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue