Skip to content

Instantly share code, notes, and snippets.

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 TungVuDuc2805/31981f94a589aad9f9f4d92d46bd0d60 to your computer and use it in GitHub Desktop.
Save TungVuDuc2805/31981f94a589aad9f9f4d92d46bd0d60 to your computer and use it in GitHub Desktop.
protocol ProfileSectionControllerProtocol {
var title: String {get}
var cells: [ProfileCellProtocol] {get set}
var rowCount: Int {get}
init(title: String, cells: [ProfileCellProtocol])
}
extension ProfileSectionControllerProtocol {
var rowCount: Int {
return cells.count
}
}
class ProfileSectionController: ProfileSectionControllerProtocol {
var title: String
var cells: [ProfileCellProtocol]
required init(title: String, cells: [ProfileCellProtocol]) {
self.title = title
self.cells = cells
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment