• Stars
    star
    648
  • Rank 69,480 (Top 2 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 13 years ago
  • Updated over 8 years ago

Reviews

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

Repository Details

SLExpandableTableView is a UITableView subclass that gives you easy access to expandable and collapsable sections by just implementing a few more delegate and dataSource protocols. (iPhone, iPad, iOS)

SLExpandableTableView

CI Status Version License Platform

SLExpandableTableView is a UITableView subclass that gives you easy access to expandable and collapsable sections by just implementing a few more delegate and dataSource protocols.

How to use SLExpandableTableView

  • Installation
pod 'SLExpandableTableView'
  • Load the SLExpandableTableView in a UITableViewController
- (void)loadView
{
    self.tableView = [[SLExpandableTableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
}
  • Implement the SLExpandableTableViewDatasource protocol
- (BOOL)tableView:(SLExpandableTableView *)tableView canExpandSection:(NSInteger)section
{
    // return YES, if the section should be expandable
}

- (BOOL)tableView:(SLExpandableTableView *)tableView needsToDownloadDataForExpandableSection:(NSInteger)section
{
    // return YES, if you need to download data to expand this section. tableView will call tableView:downloadDataForExpandableSection: for this section
}

- (UITableViewCell<UIExpandingTableViewCell> *)tableView:(SLExpandableTableView *)tableView expandingCellForSection:(NSInteger)section
{
    // this cell will be displayed at IndexPath with section: section and row 0
}
  • Implement the SLExpandableTableViewDelegate protocol
- (void)tableView:(SLExpandableTableView *)tableView downloadDataForExpandableSection:(NSInteger)section
{
    // download your data here
    // call [tableView expandSection:section animated:YES]; if download was successful
    // call [tableView cancelDownloadInSection:section]; if your download was NOT successful
}

- (void)tableView:(SLExpandableTableView *)tableView didExpandSection:(NSUInteger)section animated:(BOOL)animated
{
  //...
}

- (void)tableView:(SLExpandableTableView *)tableView didCollapseSection:(NSUInteger)section animated:(BOOL)animated
{
  //...
}

Sample Screenshots

More Repositories

1

GHMarkdownParser

A markdown parser for iOS based on discount.
Objective-C
277
star
2

Flow

Gesture based tutorials inspired by Facebook Paper.
Objective-C
268
star
3

SLRESTfulCoreData

Objc naming conventions, autogenerated accessors at runtime, URL substitutions and intelligent attribute mapping
Objective-C
178
star
4

AFURLConnectionByteSpeedMeasure

Extends AFNetworking with the ability to measure connection speed and estimate completion time.
Objective-C
146
star
5

SPLMessageLogger

Intercept and log objc messages.
Objective-C
78
star
6

SLCoreDataStack

CoreData stack managing independent 2 NSManagedObjectContext instances
Objective-C
63
star
7

imp_implementationForwardingToSelector

IMP forwarding to a different selector.
Assembly
54
star
8

ANAdvancedNavigationController

Pretty advanced Navigation Controller for iPad
Objective-C
54
star
9

SPLBokehBackgroundView

Rebuilding iOS 7 dynamic wallpapers.
Objective-C
51
star
10

swift-docker

ubuntu:14.04 with Apple swift
30
star
11

SLUITableViewCellSectionLocation

UITableViewCellSectionLocation made public.
29
star
12

SLScrollViewKeyboardSupport

SLScrollViewKeyboardSupport auto adjusts UIScrollViews contentInset based on the first responder.
Objective-C
25
star
13

SPLRemoteObject

It's just an objc RPC framework for your local network
C
22
star
14

AFHTTPRequestOperationLogger-VolumeControl

Extends AFHTTPRequestOperationLogger with ability to change log level with hardware volume buttons.
19
star
15

GHGlossProgressView

An iOS progress view with a neat gloss gradient.
Objective-C
19
star
16

swift-async

Group async tasks together, swiftly
Swift
16
star
17

AFRESTfulCoreDataBackgroundQueue

AFNetworking based AFHTTPClient conforming to SLRESTfulCoreDataBackgroundQueue
Objective-C
15
star
18

iHubSC

Native iPhone and iPad GitHub client.
Objective-C
15
star
19

SPLWindow

UIWindow subclass with touch highlighting and rage shake.
Objective-C
12
star
20

SPLPing

Lightweight, reusable and race free ping implementation.
Objective-C
12
star
21

GHPieChartProgressView

A progress view that looks like a pie chart (iPhone, iPad, iOS)
Objective-C
11
star
22

GHTableViewAlertView

An iOS UIAlertView subclass with a UITableView that looks like the Systems default one.
Objective-C
10
star
23

SPLManagedObjectContextSnapshot

Snapshots an NSManagedObjectContext and tracks its changes.
Objective-C
8
star
24

SPLMimeEntity

Objective-C binding to mimetic.
Objective-C++
7
star
25

SLRESTfulCoreDataUI

UI counterpart to SLRESTfulCoreData
Objective-C
6
star
26

SPLDrawerViewController

iOS 7 / 8 drawer view controller.
Objective-C
6
star
27

xcode-templates

Set of ARC compatible XCode 4 Templates for iOS.
Objective-C
5
star
28

SPLTableViewBehavior

Lightweight, reusable and composable UITableViewDataSources/Delegates.
Objective-C
5
star
29

SLTableViewContent

Multiple contents for one UITableViewController.
Objective-C
5
star
30

GitHubAPI

GitHubAPI implemented with SLRESTfulCoreData.
Objective-C
5
star
31

GHPullToReleaseTableViewController

Another Pull to release UITableViewController subclass (iPhone, iPad, iOS)
Objective-C
4
star
32

PlaceIt

Simply place your views ... Swiftly
Swift
3
star
33

UIImage-UITabBarStyle

UIImage category to create Images styled like seen in UITabBar
3
star
34

TokTik

iOS private API client for TikTok.
Swift
3
star
35

SPLLinearGradientView

UIView subclass that draws a linear gradient.
Objective-C
3
star
36

CTPerformanceMeasurement

Small library to measure performance by counting time that operations take.
Objective-C
3
star
37

CodeSnippets

Useful set of Xcode 4 Code Snippets
3
star
38

CrissCross2D

A 2D CrissCross Space Game
2
star
39

checked

A dead simple programming language.
Swift
2
star
40

SPLFormViewController

Form ViewControllers made easy.
Objective-C
2
star
41

DQuest

Continuation of the DQuest (http://code.google.com/p/d-quest/) project.
1
star
42

TableViewReuseIdentifier

Swift
1
star
43

testPullRepo

1
star
44

TestRepo

Just testing github api.
1
star
45

try_git

1
star
46

UIAlertController-Convenience

Convenience API for UIAlertController.
Objective-C
1
star
47

mimetic

iOS port of mimetic (http://www.codesink.org/mimetic_mime_library.html)
Shell
1
star