• Stars
    star
    130
  • Rank 277,575 (Top 6 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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.

More Repositories

1

FTPopOverMenu

FTPopOverMenu is a pop over menu for iOS which is maybe the easiest one to use. Supports both portrait and landscape. It can show from any UIView, any UIBarButtonItem and any CGRect.
Objective-C
1,035
star
2

FTPopOverMenu_Swift

FTPopOverMenu_Swift, swift version of FTPopOverMenu. FTPopOverMenu is a pop over menu for iOS which is maybe the easiest one to use. Supports both portrait and landscape. It can show from any UIView, any UIBarButtonItem and any CGRect.
Swift
430
star
3

FTIndicator

A light wight UI package contains local notification, progress HUD, toast, with blur effect, elegant API and themes support.
Objective-C
297
star
4

FTImageViewer

FTImageViewer can preview images with just one lines of code with Swift. Also FTImageViewGrid has make showing images in grid much easier.
Swift
125
star
5

FTChatMessage

FTChatMessage, a chat message UI framework written in swift. Not quite finished.
Swift
63
star
6

FTChatMessageDemoProject

FTChatMessageDemoProject, a chat message UI framework written in swift. Not quite finished.
Swift
62
star
7

FTPopMenu

FTPopMenu
Objective-C
25
star
8

FTPickerView

FTPickerView. A simple UIPickerView/UIDatePicker wrapper.
Objective-C
17
star
9

FTImageSize

FTImageSize. Get image size from remote image url synchronously, without downloading it.
Swift
15
star
10

FTPinterest

FTPinterest is just a demo I wrote.
Swift
7
star
11

liufengting.github.io

Repo for My Blog.
HTML
5
star
12

FTPageController

FTPageController
Swift
3
star
13

FTFoldableTableView

FTFoldableTableView
Objective-C
3
star
14

FTPullToRefresh

FTPullToRefresh. Wait for it.
Objective-C
3
star
15

FTZoomTransition

FTZoomTransition
Swift
2
star
16

FTProgressView

FTProgressView
Swift
2
star
17

FTWaterFallLayout

FTWaterFallLayout
Swift
2
star
18

FTContainerController

FTContainerController
Objective-C
2
star
19

FTInteractiveTransition

FTInteractiveTransition
Objective-C
1
star
20

FTProgressHUD

FTProgressHUD
Swift
1
star