Merge branch 'mbruce/bugfixes' into 'develop'
fixed bug where someone could nil out attributedText and resetting the text... See merge request BPHV_MIPS/vds_ios!159
This commit is contained in:
commit
1e0dd1ec48
@ -87,8 +87,26 @@ open class Loader: View {
|
||||
}
|
||||
invalidateIntrinsicContentSize()
|
||||
}
|
||||
|
||||
|
||||
open override func updateAccessibility() {
|
||||
super.updateAccessibility()
|
||||
|
||||
// check to make sure VoiceOver is running
|
||||
guard UIAccessibility.isVoiceOverRunning, isActive else {
|
||||
loadingTimer?.invalidate()
|
||||
loadingTimer = nil
|
||||
return
|
||||
}
|
||||
|
||||
// Focus VoiceOver on this view
|
||||
UIAccessibility.post(notification: .layoutChanged, argument: self)
|
||||
|
||||
// setup timer for post
|
||||
loadingTimer = Timer.scheduledTimer(withTimeInterval: 60, repeats: true) { [weak self] _ in
|
||||
guard let self, self.isActive, self.isVisibleOnScreen else { return }
|
||||
self.accessibilityLabel = "Still Loading"
|
||||
UIAccessibility.post(notification: .announcement, argument: "Still Loading")
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
@ -107,23 +125,6 @@ open class Loader: View {
|
||||
rotation.duration = 0.5
|
||||
rotation.repeatCount = .infinity
|
||||
icon.layer.add(rotation, forKey: rotationLayerName)
|
||||
|
||||
// check to make sure VoiceOver is running
|
||||
guard UIAccessibility.isVoiceOverRunning else {
|
||||
loadingTimer?.invalidate()
|
||||
loadingTimer = nil
|
||||
return
|
||||
}
|
||||
|
||||
// Focus VoiceOver on this view
|
||||
UIAccessibility.post(notification: .layoutChanged, argument: self)
|
||||
|
||||
// setup timer for post
|
||||
loadingTimer = Timer.scheduledTimer(withTimeInterval: 60, repeats: true) { [weak self] _ in
|
||||
guard let self, self.isActive, self.isVisibleOnScreen else { return }
|
||||
self.accessibilityLabel = "Still Loading"
|
||||
UIAccessibility.post(notification: .announcement, argument: "Still Loading")
|
||||
}
|
||||
}
|
||||
|
||||
private func stopAnimating() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user