Skip to content

Instantly share code, notes, and snippets.

@KaneCheshire
Created October 27, 2017 12:29
Show Gist options
  • Save KaneCheshire/4340b0ddbd9ee2a562f3afd333e028ed to your computer and use it in GitHub Desktop.
Save KaneCheshire/4340b0ddbd9ee2a562f3afd333e028ed to your computer and use it in GitHub Desktop.
struct CellViewModel: AccessibilityModel {
// Standard view model properties
// that we use to populate a cell
let titleString: String
let subtitleString: String
let actionString: String
// AccessibilityModel properties
let isAccessibilityElement: Bool = true
var accessibilityLabel: String? {
return "\(titleString), \(subtitleString)"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment