Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protocol AccesibilityContainer {
- var baseIdentifier: String { get }
- }
- extension AccesibilityContainer {
- func identifier(_ identifier: String) -> String {
- return "\(baseIdentifier).\(identifier)"
- }
- }
- struct AppAccessibility {
- struct ViewController: AccesibilityContainer {
- let baseIdentifier = "ViewController"
- var durationLabel: String { return identifier("durationLabel") }
- var restartButton: String { return identifier("restarButton") }
- }
- struct DetailViewController: AccesibilityContainer {
- let baseIdentifier = "DetailViewController"
- var restartButton: String { return identifier("restarButton") }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement