Skip to content

Instantly share code, notes, and snippets.

@DominikPetho
Created October 1, 2018 11:02
Show Gist options
  • Select an option

  • Save DominikPetho/6164fe7e8b36ce9a2c85a80e6f888acf to your computer and use it in GitHub Desktop.

Select an option

Save DominikPetho/6164fe7e8b36ce9a2c85a80e6f888acf to your computer and use it in GitHub Desktop.
Simple types used in SimpleViewController
// Define protocol
protocol SimpleViewCellItem {}
// Let all types, which you want to show in table view, comforms to that protocol
struct Person: SimpleViewCellItem {
var name: String
var surname: String
}
struct Advertisement: SimpleViewCellItem {
var brandName: String
}
// Define simple cells
public final class AdvertisementCell: UITableViewCell {}
public final class PeopleCell: UITableViewCell {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment