TableRow and TableInlineRow are custom rows for Eureka form library.
TableRow uses UITableView inside cell and allows to pick between multiple options.
TableInlineRow is InlineRow on top of TableRow.
Rows are generic, so different cases are possible
import Eureka
import TableRow
class ViewController: FormViewController {
override func viewDidLoad() {
super.viewDidLoad()
form +++ Section()
<<< TableRow<Int> { row in
row.options = [1, 2, 3]
row.displayValueFor = { "\($0 ?? 0)" }
}
<<< TableInlineRow<String> { row in
row.options = ["first", "second", "third"]
row.value = "none"
}
}
}
- iOS 9.0+
- Xcode 11.0+
- Eureka 5.0+
-
Add the following line to your Podfile:
pod 'TableRow'
-
Run
$ pod install
-
Add the following line to your Cartfile:
github "EurekaCommunity/TableRow"
-
Run
$ carthage update
-
Link
TableRow.framework
in your target, add it toinput files
list in Build PhasesCopy Frameworks
script
textColor
- provide default text color for underlying tableView cellshorizontalContentInset
- provide content inset for cells to distinguish from other rowsconfigureCell
callback - configure internal cell during cell dequeueingonDidSelect
callback - called every time internal cell selected
subcellTextColor, subcellHorizontalInset
- provide corresponding parameters for TableRowconfigureSubcell
callback - setconfigureCell
callback fro TableRowonToggleInlineRow
callback - optionally provide action depending on row toggled state