ONEAPP-6239 - Loader isActive still showing when false with accessibility
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
44ce29035e
commit
093bd75871
@ -96,6 +96,8 @@ open class Loader: View {
|
|||||||
private let rotationLayerName = "rotationAnimation"
|
private let rotationLayerName = "rotationAnimation"
|
||||||
private func startAnimating() {
|
private func startAnimating() {
|
||||||
accessibilityLabel = "Loading"
|
accessibilityLabel = "Loading"
|
||||||
|
isAccessibilityElement = true
|
||||||
|
icon.isHidden = false
|
||||||
|
|
||||||
icon.layer.remove(layerName: rotationLayerName)
|
icon.layer.remove(layerName: rotationLayerName)
|
||||||
let rotation : CABasicAnimation = CABasicAnimation(keyPath: "transform.rotation.z")
|
let rotation : CABasicAnimation = CABasicAnimation(keyPath: "transform.rotation.z")
|
||||||
@ -115,6 +117,8 @@ open class Loader: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func stopAnimating() {
|
private func stopAnimating() {
|
||||||
|
isAccessibilityElement = false
|
||||||
|
icon.isHidden = true
|
||||||
icon.layer.removeAnimation(forKey: rotationLayerName)
|
icon.layer.removeAnimation(forKey: rotationLayerName)
|
||||||
loadingTimer?.invalidate()
|
loadingTimer?.invalidate()
|
||||||
loadingTimer = nil
|
loadingTimer = nil
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user