Latest 2.0
Homepage https://github.com/kansaraprateek/PKColumnTable
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Screenshots


Requirements

Installation

PKColumnTable is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "PKColumnTable"

import PKColumnTable

// Either set UIView as PKColumnTable in storyboard or create a object and add as subview.

var columnExample = PKColumnTable(frame : CGRect(x:0,y:0,width:200,height:200))

Table Data

Create 2-D array to insert data at required rows of colum. For eg

let tableData = [["1", "2", "3"],
["4", "5", "6"],
["7", "8", "9"],
["10", "12", "13"],
["14", "24", "34"],
]

Setting Column

Column width array is in reference to frame size.

columnExample.setTableColumnTitles(titles: ["Column 1", "Column 2", "Column 3"], data: tableData as NSArray, columnWidths: [0.3, 0.3 , 0.4], isFloatingHeader: true)

To get response on table row clicked set columnExample delegate to current viewcontroller-

columnExample.delegate = self

And override method –

    didSelectRow(atIndex : IndexPath)

Manage UI


columnExample.setupTableUI(data: [kPKTableBKG:UIColor.red, kPKTableCellBackgroundColor: UIColor.red])
  • Need to set table UI method before calling setTableColumnTitles(titles:data:columnWidths:isFloatingHeader:)

Apart from these you can use different UI keys –

// Header UI Keys
kPKTableColumnTitleFont
kPKTableColumnTitleColor
kPKTableColumnTitleAlignment
kPKTableColumnTextViewBkg
kPKHeaderBKG

// Cell UI Keys
kPKTableCellTextAlignment
kPKTableCellTextColor
kPKTableCellRowTextFont
kPKTableCellBackgroundColor
kPKTableCellTextViewBkg

// Table/scrollview/view background
kPKTableBKG
kPKScrollBKG
kPKViewBKG

Author

kansaraprateek, [email protected]

License

PKColumnTable is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "PKColumnTable",
    "version": "2.0",
    "summary": "UItable View with Column fields.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/kansaraprateek/PKColumnTable",
    "screenshots": [
        "http://www.prateekkansara.com/GitProjectImages/PKColumnTable/PKColumnTableNoScroll.png",
        "http://www.prateekkansara.com/GitProjectImages/PKColumnTable/PKColumTableScroll.gif"
    ],
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "kansaraprateek": "[email protected]"
    },
    "source": {
        "git": "https://github.com/kansaraprateek/PKColumnTable.git",
        "tag": "2.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "PKColumnTable/Classes/**/*"
}

Pin It on Pinterest

Share This