Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Statico/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class ViewController: UIViewController {

@IBOutlet weak var tableView: UITableView!

// How to use Static with a custom view controller
let dataSource = DataSource()

override func viewDidLoad() {
Expand All @@ -25,8 +26,24 @@ class ViewController: UIViewController {
rows: [
Row(text: "foo"),
Row(text: "bar"),
// How to add a selection callback
Row(text: "tap me", selection: { self.showAlert() })
]
),
// How to add more sections (super easy)
Section(
header: Section.Extremity.Title("fancy"),
rows: [
Row(text: "text",
detailText: "detail text",
selection: nil,
image: nil,
accessory: Row.Accessory.DisclosureIndicator),
Row(text: "bar"),
],
footer: Section.Extremity.Title("This is the footer"),
indexTitle: "Index title",
UUID: "UUID"
)
]
}
Expand Down