Skip to content

Instantly share code, notes, and snippets.

@Deco354
Created December 19, 2019 09:16
Show Gist options
  • Save Deco354/d1a3b119d92e3c7f156e7c4684c29b3b to your computer and use it in GitHub Desktop.
Save Deco354/d1a3b119d92e3c7f156e7c4684c29b3b to your computer and use it in GitHub Desktop.
protocol DualTextFieldViewModel {
var field1Hint: String { get }
var field2Hint: String { get }
}
struct NinjaViewModel: DualTextFieldViewModel {
let field1Hint = "Leaf"
let field2Hint = "Nine tail fox"
}
struct PirateViewModel: DualTextFieldViewModel {
let field1Hint = "Skull and Cross bones"
let field2Hint = "Wooden leg"
}
class ViewController: UIViewController {
let viewModel: DualTextFieldViewModel
override func viewDidLoad() {
setupDualTextFieldView()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment