Latest 0.0.1
License MIT
Platforms ios 7.0, requires ARC

A horizontal tableview used as simple as UITableView


The simplest way is

pod 'UIHorizontalTableView', '0.0.1'

You can also add the two files UIHorizontalTableView.h/m in your project.

Getting Started

UIHorizontalTableView is a subclass of UItableView.Using UIHorizontalTableView is just like using UItableView.

@interface ViewController ()<UIHorizontalTableViewDelegate, UITableViewDataSource>

@implementation ViewController
- (void)viewDidLoad {
    [super viewDidLoad];
    UIHorizontalTableView* h1 = [[UIHorizontalTableView alloc] initWithFrame:(CGRect){0,50,self.view.bounds.size.width, 50}];
    [self.view addSubview:h1];
    h1.hDataSource = self;
    h1.hDelegate = self;
    [h1 registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"];

All rest is to implement delegate & datasource methods as UITableView. Here UIHozizontalTableView has its own UIHorizontalTableViewDelegate protocol which extends protocol UITableViewDelegate. The delegate methods are much alike ones in UITableview.

- (CGFloat) tableView:(UITableView *)tableView widthForRowAtIndexPath:(NSIndexPath *)indexPath{
    return desiredWidth;
- (UITableViewCell*) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
    //Customize your cell
    return cell;
- (NSInteger) numberOfSectionsInTableView:(UITableView *)tableView{
    return sectionNumber;
- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return rowsNumberInSection;

Latest podspec

    "name": "UIHorizontalTableView",
    "version": "0.0.1",
    "summary": "A horizontal table view as simple as UITableView",
    "license": "MIT",
    "homepage": "",
    "authors": {
        "deput": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.0.1"
    "platforms": {
        "ios": "7.0"
    "source_files": "UIHorizontalTableView.*",
    "requires_arc": true

Pin It on Pinterest

Share This