Coder Social home page Coder Social logo

jh90ios / collectionviewcomponent Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 23 KB

利用React-Native和Weex中组件的**,将UICollectionView布局的页面进行组件化,解决复杂页面的扩展性和可维护性问题。支持pod集成。

License: MIT License

Objective-C 94.55% Ruby 5.45%

collectionviewcomponent's Introduction

CollectionViewComponent

支持pod集成方式 pod 'JHCollectionViewComponent'

利用React-Native和Weex中组件的**,将UICollectionView布局的页面进行组件化,解决复杂页面的扩展性和可维护性问题同时增加组件的复用性。

用户只需要关心数据和Cell样式,不需要进行各种registerNib,registerClass,不需要实现各种 delegat e和 dataSource,用户也不需要再手动缓存高度。

底层使用IGListKit,屏蔽了IGListKit的复杂接口和内部调用,同时将数据驱动扩展到Cell和Header,Footer层级。

使用:

JHIGListCollectionViewComponent* viewComponent = [[JHIGListCollectionViewComponent alloc]initWithCollectionView:self.collectionView viewController:self];
JHIGListSectionComponent* section = [[JHIGListSectionComponent alloc]init];         //section
JHIGListCellComponent* cell = [[JHIGListCellComponent alloc]init];                  //cell
JHIGListSupplementaryViewComponent* header = [[JHIGListSupplementaryViewComponent alloc]init];    //header
JHIGListSupplementaryViewComponent* footer = [[JHIGListSupplementaryViewComponent alloc]init];    //footer

section.components = @[cell];
section.headerComponent = header;
section.footerComponent = footer;

viewComponent.sections = @[section];

collectionviewcomponent's People

Contributors

jh90ios avatar

Stargazers

 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.