Created
June 7, 2020 06:43
-
-
Save TungVuDuc2805/31981f94a589aad9f9f4d92d46bd0d60 to your computer and use it in GitHub Desktop.
This file contains 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
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