Latest 1.0.1
License MIT
Platforms ios 8.0, requires ARC
Dependencies TTTAttributedLabel, PureLayout, KZPropertyMapper, MHPrettyDate, AFNetworking, UALogger

Build Status

STXDynamicTableView is designed to solve the common use case to display a feed of photos with their corresponding likes, caption, and comments. It’s inspired by Instagram feed table view.

Example Project

We’re using cocoapods to update the existing 3rd party libraries (Pods) in the sample code:

$ pod install

Then, open STXDynamicTableViewExample.xcworkspace to build and run.


Import the whole STXDynamicTableView source files into your project, and import the main header file:

 #import "STXDynamicTableView.h"

Supply your table view in the view controller, then set the delegate and data source:

STXFeedTableViewDataSource *dataSource = [[STXFeedTableViewDataSource alloc] initWithController:self tableView:self.tableView];
self.tableView.dataSource = dataSource;
self.tableViewDataSource = dataSource;

STXFeedTableViewDelegate *delegate = [[STXFeedTableViewDelegate alloc] initWithController:self];
self.tableView.delegate = delegate;
self.tableViewDelegate = delegate;

Populate your data models to the table view data source:

NSDictionary *instagramPopularMediaDictionary = jsonObject;
if (instagramPopularMediaDictionary) {
    id data = [instagramPopularMediaDictionary valueForKey:@"data"];
    NSArray *mediaDataArray = data;

    NSMutableArray *posts = [NSMutableArray array];
    for (NSDictionary *mediaDictionary in mediaDataArray) {
        STXPost *post = [[STXPost alloc] initWithDictionary:mediaDictionary];
        [posts addObject:post];

    self.tableViewDataSource.posts = [posts copy];

    [self.tableView reloadData];

Your data models need to conform to STXPostItem, STXCommentItem, and STXUserItem to be able to use the built-in table view data source and delegate.


Read Rebuilding Instagram feed table
to understand the challenges, difficulties, and how do we solve the issue of rebuilding the table view style popularized by Instagram app with Auto Layout.



STXDynamicTableView is simply a reusable code that you can use in your own project for any purpose as outlined in the LICENSE file. It’s not a fully-fledged library, although we’re taking steps to go there as time allows.


We’d love to hear feedback. Create Github issues, pull requests, or hit us up on Twitter.


This project uses the following 3rd party libraries:


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

Latest podspec

    "name": "STXDynamicTableView",
    "version": "1.0.1",
    "summary": "Feed Style Dynamic Table View",
    "homepage": "",
    "license": {
        "type": "MIT"
    "authors": {
        "2359media": ""
    "source": {
        "git": ""
    "platforms": {
        "ios": "8.0"
    "ios": {
        "frameworks": "UIKit"
    "requires_arc": true,
    "source_files": [
    "resources": [
    "dependencies": {
        "TTTAttributedLabel": [],
        "PureLayout": [],
        "KZPropertyMapper": [
            "~> 2.5.1"
        "MHPrettyDate": [],
        "AFNetworking": [
            "~> 2.5.0"
        "UALogger": []

Pin It on Pinterest

Share This