Latest 0.1.1
Homepage https://github.com/ianweng/IanTableViewManager
License MIT
Platforms ios 8.0, requires ARC
Authors

pod
license

Data structure implementation of table view with self-sizing cell in iOS8 Autolayout

Classes
IanTableViewController

section descriptors: describe sections of the table view

  • @property(nonatomic, strong) NSMutableArray *sectionDescriptors;
  • – (void)addSectionDescriptor:(IanTVSectionDescriptor *)sectionDescriptor;
  • – (void)addSectionDescriptors:(NSArray *)sectionDescriptors;

table view inset: – (UIEdgeInsets)tableViewInset; default calculates the top inset for navigation bar in navigation controller and bottom inset in tab bar controller. override if want to change the inset

IanTVSectionDescriptor

row descriptors: describe rows of the section in table view

  • @property(nonatomic, strong) NSMutableArray *rowDescriptors;
  • – (void)addRowDescriptor:(IanTVRowDescriptor *)rowDescriptor;
  • – (void)addRowDescriptors:(NSArray *)rowDescriptors;

header view & footer view: set the height to zero if want to be default height, to CGFLOAT_MIN if want to be zero height

  • @property(nonatomic) CGFloat headerHeight;
  • @property(nonatomic) CGFloat footerHeight;
  • @property(nonatomic, strong) UIView *footerView;
  • @property(nonatomic, strong) UIView *headerView;
IanTVRowDescriptor
  • class of the cell: @property(nonatomic) Class cellClass;
  • style of the cell: @property(nonatomic) UITableViewCellStyle cellStyle;
  • reusability of the cell, set to NO if it is unreusable: @property(nonatomic, getter=isCellReusable) BOOL cellReusability;
  • indentifier of the cell, default is the class name: @property(nonatomic, copy) NSString *cellIdentifier;
  • value of the cell: @property(nonatomic) id cellValue;
  • + (instancetype)descriptorWithCellClass:(Class)cellClass
    cellValue:(id)cellValue;
IanTVCellAbstract
  • implemented, view controller of table view@property (nonatomic,weak) UIViewController *vcDelegate;
  • implemented, called when cell is prepared to use, receives the view controller: – (void)setInViewController:(UIViewController *)viewController;
  • SHOULD implement, called when cell is prepared to use, receives the cell value from IanTVRowDescriptor: – (void)prepareForDisplayWithValue:(id)value;
  • SHOULD implement, called when cell is tapped: – (void)tappedInTableView:(UITableView *)tableView viewController:(UIViewController *)viewController;

Installation

CocoaPods

  1. Add the following line in the project’s Podfile file:
    pod 'IanTableViewManager'.
  2. Run the command pod install from the Podfile folder directory.

IanTableViewManager has no dependencies over other pods.

License

The MIT License (MIT)

Copyright (c) 2016 Ian Weng | [email protected]

Latest podspec

{
    "name": "IanTableViewManager",
    "version": "0.1.1",
    "summary": "Data structure implementation of table view with self-sizing cell in iOS8 Autolayout",
    "homepage": "https://github.com/ianweng/IanTableViewManager",
    "license": "MIT",
    "authors": {
        "Ian Weng": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ianweng/IanTableViewManager.git",
        "branch": "master",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Classes/*"
}

Pin It on Pinterest

Share This