APLTableViewModel 0.0.1

APLTableViewModel 0.0.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jun 2015

Maintained by Michael Kamphausen, cg, Mathias Köhnke, Tino Rachui, Mathias Koehnke, Nico Schümann.



  • By
  • Tino Rachui

A table view model which can inform a delegate about changes. Instantiate the table view model with a number of sections and add whatever rows to the respective sections in the model. Get informed about insertions or deletions of rows react accordingly by updating the corresponding table view.

Installation

Install via cocoapods by adding this to your Podfile:

pod 'APLTableViewModel', '0.0.1'

Usage

Import header file:

#import "APLTableViewModel.h"

Use APLTableViewModel like this:

...
APLTableViewModel *tableViewModel = [[APLTableViewModel alloc] initWithNumberOfSections:1];

tableViewModel.delegate = ...;

[tableViewModel appendItem:... inSection:0]
...