Skip to content

Instantly share code, notes, and snippets.

@RinniSwift
Last active June 1, 2021 22:29
Show Gist options
  • Save RinniSwift/d7ec60f2427dc9b9f256194a22cdaf77 to your computer and use it in GitHub Desktop.
Save RinniSwift/d7ec60f2427dc9b9f256194a22cdaf77 to your computer and use it in GitHub Desktop.
let element = UIAccessibilityElement(accessibilityContainer: self)
element.accessibilityLabel = [titleLabel.text, subtitleLabel.text].compactmap { $0 }.joined(seperator: ", ")
element.accessibilityFrameInContainerSpace = titleLabel.frame.union(subtitleLabel.frame)
accessibilityElements = [element, bottomView, button].compactMap { $0 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment