GithubHelp home page GithubHelp logo

sonawanesuraj9 / ftfoldingtableview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from liufengting/ftfoldingtableview

0.0 2.0 0.0 387 KB

FTFoldingTableView. Folding cells with simple delegates, and change UI looks in a few lines.

License: MIT License

Ruby 4.81% Objective-C 95.19%

ftfoldingtableview's Introduction

FTFoldingTableView

Twitter GitHub license Version Platform CocoaPods CI Status GitHub stars

FTFoldingTableView. Folding cells with simple delegates, and change UI looks in a few lines of code.

ScreenShots

Style Left Right
fold
show

Usage

Required Methods

  • preferred ArrowPosition
- (FTFoldingSectionHeaderArrowPosition)perferedArrowPositionForFTFoldingTableView:(FTFoldingTableView *)ftTableView
{
    return self.arrowPosition;
}
  • numberOfSectionForFTFoldingTableView
- (NSInteger )numberOfSectionForFTFoldingTableView:(FTFoldingTableView *)ftTableView
{
    return 5;
}
  • numberOfRowsInSection
- (NSInteger )ftFoldingTableView:(FTFoldingTableView *)ftTableView numberOfRowsInSection:(NSInteger )section
{
    return 3;
}
  • heightForHeaderInSection
- (CGFloat )ftFoldingTableView:(FTFoldingTableView *)ftTableView heightForHeaderInSection:(NSInteger )section
{
    return 60;
}
  • heightForRowAtIndexPath
- (CGFloat )ftFoldingTableView:(FTFoldingTableView *)ftTableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 50;
}
  • titleForHeaderInSection
- (NSString *)ftFoldingTableView:(FTFoldingTableView *)ftTableView titleForHeaderInSection:(NSInteger)section
{
    return [NSString stringWithFormat:@"Section %ld",section];
}
  • cellForRowAtIndexPath
- (UITableViewCell *)ftFoldingTableView:(FTFoldingTableView *)ftTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [ft_tableView dequeueReusableCellWithIdentifier:DemoTableViewIdentifier forIndexPath:indexPath];
    
    
    return cell;
}
  • didSelectRowAtIndexPath
- (void )ftFoldingTableView:(FTFoldingTableView *)ftTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [ftTableView deselectRowAtIndexPath:indexPath animated:YES];
    
    
}

Optional Methods

  • descriptionForHeaderInSection
- (NSString *)ftFoldingTableView:(FTFoldingTableView *)ftTableView descriptionForHeaderInSection:(NSInteger )section
{
    return @"description";
}
  • arrowImageForSection
- (UIImage *)ftFoldingTableView:(FTFoldingTableView *)ftTableView arrowImageForSection:(NSInteger )section
{
    return [UIImage imageNamed:@"Arrowhead"];
}
  • backgroundColorForHeaderInSection
- (UIColor *)ftFoldingTableView:(FTFoldingTableView *)ftTableView backgroundColorForHeaderInSection:(NSInteger )section
{
    return [UIColor grayColor];
}
  • fontForTitleInSection
- (UIFont *)ftFoldingTableView:(FTFoldingTableView *)ftTableView fontForTitleInSection:(NSInteger )section
{
    return [UIFont boldSystemFontOfSize:16];
}
  • fontForDescriptionInSection
- (UIFont *)ftFoldingTableView:(FTFoldingTableView *)ftTableView fontForDescriptionInSection:(NSInteger )section
{
    return [UIFont systemFontOfSize:13];
}
  • textColorForTitleInSection
- (UIColor *)ftFoldingTableView:(FTFoldingTableView *)ftTableView textColorForTitleInSection:(NSInteger )section
{
    return [UIColor whiteColor];
}
  • textColorForDescriptionInSection
- (UIColor *)ftFoldingTableView:(FTFoldingTableView *)ftTableView textColorForDescriptionInSection:(NSInteger )section
{
    return [UIColor whiteColor];
}

Installation

Manually

  • clone this repo.
  • Simply drop the '/FTFoldingTableViewLib' folder into your project.
  • Enjoy!

Cocoapods

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

pod 'FTFoldingTableView'

Need to know

  • I used two days to finish this project, and then uploaded it to Cocoapods, so I didn't have enough time to test it;if you have any questions, please let me know. I'll fill this README in the near future.

ftfoldingtableview's People

Contributors

amitaib avatar liufengting avatar

Watchers

 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.