From d3773efbcc7824a7c48c80f22653053a6ed5d53d Mon Sep 17 00:00:00 2001 From: Max Sokolov Date: Sat, 20 Aug 2016 16:44:58 +0300 Subject: [PATCH] update readme --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 396d01d..bfa444a 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,8 @@ An [example app](Demo) is included demonstrating TableKit's functionality. Create your rows: ```swift +import TableKit + let row1 = TableRow(item: "1") let row2 = TableRow(item: 2) let row3 = TableRow(item: User(name: "John Doe", rating: 5)) @@ -44,8 +46,6 @@ let section = TableSection(rows: [row1, row2, row3]) ``` And setup your table: ```swift -import TableKit - let tableDirector = TableDirector(tableView: tableView) tableDirector += section ``` @@ -118,7 +118,7 @@ struct MyActions { class MyTableViewCell: UITableViewCell, ConfigurableCell { - @IBAction func lol(sender: UIButton) { + @IBAction func myButtonClicked(sender: UIButton) { TableCellAction(key: MyActions.ButtonClicked, sender: self).invoke() } @@ -126,7 +126,7 @@ class MyTableViewCell: UITableViewCell, ConfigurableCell { ``` And handle them accordingly: ```swift -let myAction = TableRowAction(.custom(MyActions.ButtonClicked)) { (data) in +let myAction = TableRowAction(.custom(MyActions.ButtonClicked)) { (data) in } ``` @@ -145,7 +145,7 @@ class StringTableViewCell: UITableViewCell, ConfigurableCell { } } ``` -It's enough for most cases. But you may be not happy with this. So you could use a prototype cell to calculate cell's heights. To enable this feature simply use this property: +It's enough for most cases. But you may be not happy with this. So you could use a prototype cell to calculate cells heights. To enable this feature simply use this property: ```swift tableDirector.shouldUsePrototypeCellHeightCalculation = true ```