Latest 1.1.0
License MIT
Platforms ios 8.0

CI Status


To run the example project, clone the repo, and run pod install from the Example directory first.


  • ✅ Data agnostic UITableViewControllers
  • ✅ Data agnostic UICollectionViewControllers
  • ✅ Better abstractions layer of abstraction around data sources
  • ✅ Easier to test

If you have ever found yourself writing the following code:

func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {

    let cell: UICollectionViewCell

    if indexPath.item == 0 {
        cell = collectionView.dequeue(someCell) as! TypeA
    } else if indexPath.item == 2 {
        cell = collectionView.dequeue(someCell) as! TypeB
    } else {
        fatalError("This is getting long...")

    return cell

You might benefit from abstracting out into Item Controllers. You remove all this logic by having some FeedDataType enum, and switching over that.

Check the Example project to see how it’s implemented, and the benefits you might be able to get from it.


There are a few things this doesn’t support, and some challenges it faces. If you have solutions, please raise a PR!


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

pod 'JWMixedList'


Joe Williams


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

Latest podspec

    "name": "JWMixedList",
    "version": "1.1.0",
    "summary": "A mechanism for having mixed data types in one collection view.",
    "description": "UITableViews and UICollectionViews can be difficult to manage when you want multiple data types.nFor example, a collection view that supports both text only cell types, and image only cell types.nJWMixedList allows you to have data agnostic list view controllers, and manager the datanon an item by item basis.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "jw1540": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.1.0"
    "social_media_url": "",
    "platforms": {
        "ios": "8.0"
    "swift_version": "3.2",
    "source_files": "JWMixedList/**/*.swift"

Pin It on Pinterest

Share This