Latest 1.1.6
Homepage https://github.com/wanyawan/ALTableKit
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit, Foundation
Authors

A data-driven UITableView framework for building fast and Low coupling, Similar to the IGList CollectionView framework.
数据驱动的UITableView框架,用于构建快速低耦合的tableview,类似IGList CollectionView框架。

IGList用了一段时间了确实比较好用,但是发现把tableview 全部替换成collectionview成本很高而且有些情况collectionview并不能完全替代tableview,所以写了这个ALTableKit。

Features

  • 自动根据cell 和identifier 注册cell,通过context直接重用(再也不怕忘记注册cell闪退)
  • 把TableView delegate datasource分发到不同的Section Controller 降低代码耦合
  • 通过section controller 可以自动缓存table view cell 高度
  • 通过section controller 可以编辑当前section中的 cell (insert delete reload)
  • 方便每一个section controller 进行单元测试
  • 可以将复杂的Complex Section Controller拆分成多个Section Provider 降低耦合 简化逻辑

    • 如果 cell 1 和 cell 2 根据数据的不同可能存在或不存在。这时候就会有很多逻辑判断cell 4、5、6的位置到底在哪

    现在可以使用section controller将这个section 拆分成多个section provider

    每一个section provider 单独维护 cell的高度、个数、cell和点击事件等,如下:

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|      cell 0     |                 |    cell 0     |                           |
 - - - - - - - - -     provier 0     - - - - - - - -                            |
|      cell 1     |                 |    cell 1     |                           |
 - - - - - - - - - - - - - - - - - - - - - - - - - -                            |
|      cell 2     |    provier 1    |    cell 0     |                           |
 - - - - - - - - - - - - - - - - - - - - - - - - - -    section controller 0    |
|      cell 4     |                 |    cell 0     |                           |
 - - - - - - - - -                   - - - - - - - -                            |
|      cell 5     |    provier 2    |    cell 1     |                           |
 - - - - - - - - -                   - - - - - - - -                            |
|      cell 6     |                 |    cell 2     |                           |
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

Installation

CocoaPods

# use_frameworks! is needed for swift projects
use_frameworks!
pod 'ALTableKit', '~>1.1.6'

Carthage

github "wanyawan/ALTableKit" ~>1.1.6

How to use

Demo

ALTableKitDemo project.

Requirements

  • Xcode 9.0+
  • iOS 8.0+

License

ALTableKit is MIT-licensed.

Latest podspec

{
    "name": "ALTableKit",
    "version": "1.1.6",
    "summary": "A data-driven UITableView framework.",
    "homepage": "https://github.com/wanyawan/ALTableKit",
    "description": "A data-driven UITableView framework for building fast and Low coupling, Similar to the IGList CollectionView framework.",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Alex": "[email protected]"
    },
    "source": {
        "git": "https://github.com/wanyawan/ALTableKit.git",
        "tag": "1.1.6"
    },
    "requires_arc": true,
    "source_files": "ALTableKit/**/*.{h,m,mm}",
    "public_header_files": "ALTableKit/*.h",
    "private_header_files": "ALTableKit/ALTableKitInternal/*.h",
    "platforms": {
        "ios": "8.0"
    },
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "libraries": "c++",
    "pod_target_xcconfig": {
        "CLANG_CXX_LANGUAGE_STANDARD": "c++11",
        "CLANG_CXX_LIBRARY": "libc++"
    }
}

Pin It on Pinterest

Share This