Skip to content

Instantly share code, notes, and snippets.

@Pasanpr Pasanpr/generics.swift Secret
Last active Feb 6, 2017

Embed
What would you like to do?
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
You can’t perform that action at this time.