Skip to content

Instantly share code, notes, and snippets.

@Pasanpr
Last active February 6, 2017 22:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pasanpr/467154e7b337bccd31d9e936a1bbeda7 to your computer and use it in GitHub Desktop.
Save Pasanpr/467154e7b337bccd31d9e936a1bbeda7 to your computer and use it in GitHub Desktop.
struct StringDataProvider: DataProvider {
let data = ["someValue", "anotherValue"]
func object(atIndex index: Int) -> String {
return data[index]
}
}
struct IntView: ConfigurableView {
func configure(with data: Int) {
//
}
}
struct StringView: ConfigurableView {
func configure(with data: String) {
//
}
}
let controller = ViewController(view: IntView(), data: StringDataProvider())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment