Latest 1.0.3
License MIT
Platforms ios 8.0


RTDataSourceAdapter is a library that simplifies work with the UITableView controls.



In your Controller
#import <RTDataSourceAdapter.h>

@interface ViewController : UIViewController
@property (weak, nonatomic) IBOutlet UITableView *myTable;
@property (strong, nonatomic) RTDataSourceAdapter *adapter;
Creating RTDataSourceAdapter
self.adapter = [[RTDataSourceAdapter alloc] init];
self.myTable.tintColor = [UIColor redColor]; // <- color for load indicator
self.adapter.pullToRefreshWidth = 320; // <- optional, width for RefreshControl container
self.adapter.deselectable = YES; // <- can deselect row. Default:NO

[self.adapter registerTableView:self.myTable 
cellIdentifiers:cellIdentifiers // <- Array of cells identifiers (NSString)
//also you can use  "cellIdentifier:(NSString *)" for one cell identifier
addPullToRefresh:YES  // <- I think clearly - add refresh control :)
pageLoadingEnabled:YES]; //<- It adds the ability to loading parts :)
Filling RTDataSourceAdapter
[self.adapter.content clear]; // remove all object

[self.adapter.content addItem:cellIdentifier value:YOURmodel]; 
[self.adapter.content addItem:[[RTAdapterItem alloc] initWithID:cellIdentifier value:YOURmodel]];

[self.adapter reloadData]; //update state
Events processing:
//cell selected
[self.adapter setSelectHandler:^(RTAdapterItem *selectedObject, NSIndexPath *indexPath) {
//your code
//pull to refresh action
[self.adapter setPullToRefreshHandler:^{
//your code
//load new page action
[self.adapter setLoadMoreHandler:^{
//your code
Creating a cell

Cells must be inherited from RTBaseAdapterTableViewCell

#import <RTBaseAdapterTableViewCell.h>
@interface ExampleCell : RTBaseAdapterTableViewCell

and override two methods

@implementation MYTableViewCell
- (void)cellContent:(YOURModel *)content
//your code

+ (CGFloat)heightFromCellContent:(YOURModel *)content
// calculate height
return cellHeight;


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

pod install 'RTDataSourceAdapter'

In case you don’t want to use CocoaPods – just copy the folder RTDataSourceAdapter to your Xcode project.



RTDataSourceAdapter is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "RTLoading",
    "version": "1.0.3",
    "summary": "Loading indicator.",
    "description": "RTLoading is a extension which allow easy add loading indicator into any view.",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Ivan  Morozov": "[email protected]"
    "social_media_url": "",
    "platforms": {
        "ios": "8.0"
    "source": {
        "git": "",
        "branch": "master",
        "tag": "1.0.3"
    "source_files": "src/RTLoading/*.{h,m}",
    "resources": [

Pin It on Pinterest

Share This