From d889440d2a1f4ea7d4c3a53fdec11e5caf86a5d4 Mon Sep 17 00:00:00 2001 From: Giovanni Lodi Date: Sat, 31 Oct 2015 13:59:04 +1100 Subject: [PATCH 1/2] Add more sections --- Statico/ViewController.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Statico/ViewController.swift b/Statico/ViewController.swift index 7608893..d49d378 100644 --- a/Statico/ViewController.swift +++ b/Statico/ViewController.swift @@ -27,6 +27,20 @@ class ViewController: UIViewController { Row(text: "bar"), Row(text: "tap me", selection: { self.showAlert() }) ] + ), + 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" ) ] } From c3d18a6e813d26a12acdaa39b9b01f44dbeedbf2 Mon Sep 17 00:00:00 2001 From: Giovanni Lodi Date: Sat, 31 Oct 2015 14:16:16 +1100 Subject: [PATCH 2/2] Add comments --- Statico/ViewController.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Statico/ViewController.swift b/Statico/ViewController.swift index d49d378..e7e64f3 100644 --- a/Statico/ViewController.swift +++ b/Statico/ViewController.swift @@ -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() { @@ -25,9 +26,11 @@ 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: [