Last active
July 19, 2017 18:50
-
-
Save jeantimex/7522b5e52458ffe98097ae5b1cb9b300 to your computer and use it in GitHub Desktop.
Section Structure
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
struct Section { | |
var name: String | |
var items: [String] | |
var collapsed: Bool | |
init(name: String, items: [Item], collapsed: Bool = false) { | |
self.name = name | |
self.items = items | |
self.collapsed = collapsed | |
} | |
} | |
var sections = [Section]() | |
sections = [ | |
Section(name: "Mac", items: ["MacBook", "MacBook Air"]), | |
Section(name: "iPad", items: ["iPad Pro", "iPad Air 2"]), | |
Section(name: "iPhone", items: ["iPhone 7", "iPhone 6"]) | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment