Skip to content

Instantly share code, notes, and snippets.

@NikAshanin
Created June 27, 2016 07:57
Show Gist options
  • Select an option

  • Save NikAshanin/eff98498e7d19d1afb18cf1af62e8bda to your computer and use it in GitHub Desktop.

Select an option

Save NikAshanin/eff98498e7d19d1afb18cf1af62e8bda to your computer and use it in GitHub Desktop.
final class ChatSettingsViewModel {
var titleSection: Int = 0
var creatorSection: Int?
var memberSection: Int?
var observerSection: Int?
var numberOfSections: Int?
init(type: SettingsType) {
switch type {
case .Create:
memberSection = 1
observerSection = 2
numberOfSections = 3
case .Edit:
creatorSection = 1
memberSection = 2
observerSection = 3
numberOfSections = 4
case .Info:
creatorSection = 1
memberSection = 2
numberOfSections = 3
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment