Created
June 27, 2016 07:57
-
-
Save NikAshanin/eff98498e7d19d1afb18cf1af62e8bda to your computer and use it in GitHub Desktop.
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
| 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