Last active
July 9, 2018 10:12
-
-
Save mecid/a93417e4adbb5f27aff1a457bf46571a to your computer and use it in GitHub Desktop.
accessibility2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let elements = statistics.enumerated().map { | |
let frame = CGRect(x: 0, y: CGFloat($0 * Layout.barHeight), width: bounds.width, height: Layout.barHeight) | |
let element = UIAccessibilityElement(accessibilityContainer: self) | |
element.accessibilityLabel = $1.time | |
element.accessibilityValue = "\(Int($1.value)), \($1.status)" | |
element.accessibilityFrameInContainerSpace = frame | |
return element | |
} | |
self.accessibilityElements = elements |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment