Latest 0.2.0
Homepage https://github.com/EurekaCommunity/TableRow
License MIT
Platforms ios 8.0, requires ARC
Dependencies Eureka

Introduction

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.
TableRow
TableRow

Usage

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"
            }
    }
}

Requirements

  • iOS 8.0+
  • Xcode 9.0+
  • Eureka 4.0

Installation

CocoaPods

  1. Add the following line to your Podfile:

    pod 'TableRow'
  2. Run $ pod install

Carthage

  1. Add the following line to your Cartfile:

    github "EurekaCommunity/TableRow"
  2. Run $ carthage update

  3. Link TableRow.framework in your target, add it to input files list in Build Phases Copy Frameworks script

Customization

TableRow

  • textColor – provide default text color for underlying tableView cells
  • horizontalContentInset – provide content inset for cells to distinguish from other rows
  • configureCell callback – configure internal cell during cell dequeueing
  • onDidSelect callback – called every time internal cell selected

TableInlineRow

  • subcellTextColor, subcellHorizontalInset – provide corresponding parameters for TableRow
  • configureSubcell callback – set configureCell callback fro TableRow
  • onToggleInlineRow callback – optionally provide action depending on row toggled state

Author

Latest podspec

{
    "name": "TableRow",
    "version": "0.2.0",
    "summary": "A tableView row (including inline variant) for use with Eureka library",
    "homepage": "https://github.com/EurekaCommunity/TableRow",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": "Anton Kovtun",
    "platforms": {
        "ios": "8.0"
    },
    "ios": {
        "frameworks": [
            "UIKit",
            "Foundation"
        ]
    },
    "source": {
        "git": "https://github.com/EurekaCommunity/TableRow.git",
        "tag": "0.2.0"
    },
    "source_files": "Sources/**/*.{swift}",
    "requires_arc": true,
    "dependencies": {
        "Eureka": [
            "~> 4.1"
        ]
    },
    "swift_version": "4.1"
}

Pin It on Pinterest

Share This