Last active
January 4, 2019 10:34
-
-
Save mecid/a1a74e8ee0c7226f728d20e3e4b0d001 to your computer and use it in GitHub Desktop.
saccessibility2.swift
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
class PresentationCell: UITableViewCell { | |
var viewModel: PresentationViewModel? { | |
didSet { | |
accessibilityLabel = viewModel?.label | |
accessibilityValue = viewModel?.value | |
} | |
} | |
override func awakeFromNib() { | |
super.awakeFromNib() | |
isAccessibilityElement = true | |
accessibilityTraits = .button | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment