All Projects → anodamobi → Alister

anodamobi / Alister

Licence: MIT license
No more boilerplate code with tables and collections!

Programming Languages

objective c
16641 projects - #2 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to Alister

Swipetableview
Both scroll horizontal and vertical for segment scrollview which have a same header. — 类似半糖、美丽说主页与QQ音乐歌曲列表布局效果,实现不同菜单的左右滑动切换,同时支持类似tableview的顶部工具栏悬停(既可以左右滑动,又可以上下滑动)。兼容下拉刷新,自定义 collectionview实现自适应 contentSize 还可实现瀑布流功能
Stars: ✭ 2,252 (+14913.33%)
Mutual labels:  tableview
SUBLicenseViewController
✒ CocoaPod for attributing open source software! https://insanj.github.io/SUBLicenseViewController/
Stars: ✭ 15 (+0%)
Mutual labels:  tableview
MultilevelList
TableView多级列表:分级展开或合并,逐级获取并展示其子级数据,可以设置最大的层级数,支持多选、单选、取消选择。
Stars: ✭ 59 (+293.33%)
Mutual labels:  tableview
V Selectpage
SelectPage for Vue2, list or table view of pagination, use tags for multiple selection, i18n and server side resources supports
Stars: ✭ 211 (+1306.67%)
Mutual labels:  tableview
Dropdownmenukit
UIKit drop down menu, simple yet flexible and written in Swift
Stars: ✭ 246 (+1540%)
Mutual labels:  tableview
react-native-js-tableview
A JavaScript implementation for TableView that looks great on both iOS and Android.
Stars: ✭ 23 (+53.33%)
Mutual labels:  tableview
React Native Largelist
The best large list component for React Native.
Stars: ✭ 2,153 (+14253.33%)
Mutual labels:  tableview
SPPickerView
这是一个选择器,功能类似系统的UIPickerView,但是比UIPickerView的适用范围广得多
Stars: ✭ 28 (+86.67%)
Mutual labels:  tableview
Reactivelists
React-like API for UITableView & UICollectionView
Stars: ✭ 250 (+1566.67%)
Mutual labels:  tableview
ContentTableViewController
🏓 Super simple CocoaPod to present content. https://insanj.github.io/ContentTableViewController/
Stars: ✭ 24 (+60%)
Mutual labels:  tableview
Magearrefreshcontrol
An iOS refresh control with gear animation
Stars: ✭ 231 (+1440%)
Mutual labels:  tableview
Rxdatasources
UITableView and UICollectionView Data Sources for RxSwift (sections, animated updates, editing ...)
Stars: ✭ 2,784 (+18460%)
Mutual labels:  tableview
ZKTreeTableView
A view of the tree structure.树状结构列表。
Stars: ✭ 97 (+546.67%)
Mutual labels:  tableview
Circleoffriendsdisplay
朋友圈的做法
Stars: ✭ 205 (+1266.67%)
Mutual labels:  tableview
DLStretchableTableHeaderView
TableView with strechable header
Stars: ✭ 17 (+13.33%)
Mutual labels:  tableview
React Native Cell Components
Awesome react-native cell components! From a Cell to more complex & awesome components.
Stars: ✭ 177 (+1080%)
Mutual labels:  tableview
XTableView
一个基于RecyclerView+Scroller实现的二维表格组件,同时支持侧滑菜单、拖动调整列表顺序等拓展功能。A two-dimensional table view, base on recyclerview, both support to side slide menu、drag item and more.
Stars: ✭ 15 (+0%)
Mutual labels:  tableview
iOSProjects
It's project that contains different applications developed with Swift 5.7 👨‍💻👩🏼‍💻🧑🏿‍💻
Stars: ✭ 122 (+713.33%)
Mutual labels:  tableview
SectionReactor
A ReactorKit extension for managing table view and collection view sections with RxDataSources
Stars: ✭ 45 (+200%)
Mutual labels:  tableview
StretchableTableViewHeader-Swift
You might have seen a collapsable or stretchable tableview header in android. If you check the whatsapp profile/ group settings page , you can see this. If you are using Netflix app, you might have seen a zoom in effect in the tableview header as well. Well, if you ever wondered how to do this in iOS, I will give a simple solution.
Stars: ✭ 57 (+280%)
Mutual labels:  tableview

Alister

Build Status Version License Platform codecov codebeat badge

Overview

Alister allows to manage the content of any UITableView or UICollectionView. The general idea is provide a layer that synchronizes data with the cell appearance for such operations like adding, moving, deleting and reordering. Alister automatically handle UITableView and UICollectionView data source and delegates protocols and you can override them by subclassing from base controllers.

Features

  • Works with UITableView and UICollectionView
  • Supports all operations for sections and rows such as Insert, Delete, Move, Reload
  • Supports UISearchBar and provide search predicate
  • Supports custom header and footer views
  • Provides keyboard handling
  • Provides bottom sticked footer as part of ANTableView

Usage

Initialize storage and list controller

Use ANTableController and ANCollectionController for UITableView and UICollectionView respectively.

self.storage = [ANStorage new];
self.tableController = [ANTableController controllerWithTableView:self.tableView];
[self.tableController attachStorage:self.storage];
self.collectionController = [ANCollectionController controllerWithCollectionView:self.collectionView];
[self.collectionController attachStorage:self.storage];

Register cell, header and footer views for models

You can register any views for any model classes.

[self.controller configureCellsWithBlock:^(id<ANListControllerReusableInterface> configurator) {

[configurator registerCellClass:[ANBaseTableViewCell class]
forModelClass:[ANBaseTableViewCellViewModel class]];

[configurator registerFooterClass:[ANBaseTableFooterView class]
forModelClass:[NSString class]];

[configurator registerHeaderClass:[ANBaseTableHeaderView class]
forModelClass:[NSString class]];
}];

Add models to ANStorage

NSArray* models = [self generateModels];
[self.storage updateWithoutAnimationChangeBlock:^(id<ANStorageUpdatableInterface> storageController) {
[storageController addItems:models]; // items will be added to a first section by default
[storageController addItems:models toSection:10];
[storageController addItem:@"Title" atIndexPath:indexPath];
// Supplementary models
[storageController updateSectionHeaderModel:headerTitle forSectionIndex:0];
[storageController updateSectionFooterModel:footerTitle forSectionIndex:0];
}];

And that`s all!

Here is an inline smiley. sample{:height="50px" width="90px"}

Changing cells order

Alister will change order of cells and models in storage automatically. Or you can change it manually:

[self.storage updateWithAnimationChangeBlock:^(id<ANStorageUpdatableInterface> storageController) {
[storageController moveItemFromIndexPath:fromIndexPath toIndexPath:toIndexPath];
}];

sample

Models search with UISearchBar

Alister provides an ablility to search in storage. To use it, search bar and search predicate block must be set:

[self.controller attachSearchBar:self.searchBar];
[self.controller updateSearchingPredicateBlock:[self predicateBlock]];

Where search predicate block is:

- (ANListControllerSearchPredicateBlock)predicateBlock
{
return ^NSPredicate* (NSString* searchString, NSInteger scope) {

NSPredicate* predicate = nil;
if (searchString)
{
predicate = [NSPredicate predicateWithFormat:@"self BEGINSWITH[cd] %@", searchString];
}

return predicate;
};
}

sample

Item selection

Provide configureItemSelectionBlock: block for handling default cells selection.

[self.controller configureItemSelectionBlock:^(id model, NSIndexPath *indexPath) {
    //Handle selection
}];

Custom header and footer views

Provide custom header and footer for list views.

[self.storage updateWithAnimationChangeBlock:^(id<ANStorageUpdatableInterface> storageController) {
    [storageController updateSectionHeaderModel:headerModel forSectionIndex:0];
    [storageController updateSectionFooterModel:footerModel forSectionIndex:0];
}];

sample sample

Table sticked footer

ANTableView provides an ability to set custom sticked footer.

[self.tableView addStickyFooter:self.footerView withFixedHeight:100];
[self.tableView updateStickerHeight:200];

sample

Demo

See projects example or use it by web (Appetize.io link) To run the example project, clone the repo or download, and run pod install from the Example directory first.

Requirements

Xcode 7.2 or higher iOS 9 or higher

Installation

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

pod "Alister"

Changelog

0.2

renamed methods in ANStorage:

  • setHeaderModel: sectionIndex:
  • setFooterModel: sectionIndex:

to update ... model

Author

Oksana Kovalchuk, [email protected]

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].