GithubHelp home page GithubHelp logo

shangjin-li / bwhorizontaltableview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from burrowswang/bwhorizontaltableview

0.0 2.0 0.0 1.06 MB

An efficient horizontal table view based on Objective-c with same usage and interface as UITableView.

License: MIT License

Ruby 0.92% Objective-C 99.08%

bwhorizontaltableview's Introduction

BWHorizontalTableView

Platform Pod Version Carthage Compatible License

BWHorizontalTableView is an efficient horizontal table view based on Objective-c with same usage and interface as UITableView.

How To Use

API documentation is available at CocoaDocs - BWHorizontalTableView.

Sample project can be found here. If you know how to use UITableView in your iOS project, you already know how to use BWHorizontalTableView.

First of all, you should provide dataSource and delegate of the horizontal table view.

BWHorizontalTableView *tableView = [[BWHorizontalTableView alloc] init];
tableView.frame = rect;
tableView.dataSource = your-data-source;
tableView.delegate = your-delegate;

Your data source should conforms to BWHorizontalTableViewDataSource and implement the following methods:

- (NSInteger)numberOfSectionsInHorizontalTableView:(BWHorizontalTableView *)tableView;

- (NSInteger)horizontalTableView:(BWHorizontalTableView *)tableView
        numberOfColumnsInSection:(NSInteger)section;
        
- (BWHorizontalTableViewCell *)horizontalTableView:(BWHorizontalTableView *)tableView
                          cellForColumnAtIndexPath:(NSIndexPath *)indexPath;

Your delegate object should conforms to BWHorizontalTableViewDelegate and implement the methods defined in protocol BWHorizontalTableViewDelegate according to your needs.

- (CGFloat)horizontalTableView:(BWHorizontalTableView *)tableView
     widthForColumnAtIndexPath:(NSIndexPath *)indexPath;
     
- (void)horizontalTableView:(BWHorizontalTableView *)tableView
 didSelectColumnAtIndexPath:(NSIndexPath *)indexPath;

Installation

Installation with CocoaPods (Recommend)

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries in your projects. See the Get Started section for more details.

platform :ios, '7.0'

pod 'BWHorizontalTableView', '~>1.0.1'

Installation with Carthage (iOS 8+)

Carthage is a lightweight dependency manager for Swift and Objective-C. It leverages CocoaTouch modules and is less invasive than CocoaPods.

To install with carthage, follow the instruction on Carthage

github "BurrowsWang/BWHorizontalTableView"

Other Ways

  • Copying all the files into your project
  • Importing the project as a dynamic framework, PS: ADD FRAMEWORK TO Embedded Binaries
  • Importing the project as a static library, PS: ADD -ObjC TO BUILD SETTING Other Linker Flags

License

All source code is licensed under the MIT License.

bwhorizontaltableview's People

Contributors

burrowswang avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.