Created
October 1, 2018 11:02
-
-
Save DominikPetho/6164fe7e8b36ce9a2c85a80e6f888acf to your computer and use it in GitHub Desktop.
Simple types used in SimpleViewController
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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