Swiftpack.co - OhKanghoon/RxDataSources-Texture as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by OhKanghoon.
OhKanghoon/RxDataSources-Texture 1.4.0
ASTable and ASCollection Data Sources for RxSwift (Texture)
⭐️ 36
🕓 3 years ago
iOS
.package(url: "https://github.com/OhKanghoon/RxDataSources-Texture.git", from: "1.4.0")

Swift Build Status Version License Platform

Usage

  1. Turn your data into an Observable sequence
  2. Bind the data to the tableNode / collectionNode using :
  • rx.items(dataSource:protocol<RxASTableDataSourceType, ASTableDataSource>)
let dataSource = RxASTableSectionedReloadDataSource<SectionModel<String, Int>>(
    configureCellBlock: { (_, _, _, num) in
        return {
            let cell = ASTextCellNode()
            cell.text = "\(num)"
            return cell
        }
})

Observable.just([SectionModel(model: "title", items: [1, 2, 3])])
    .bind(to: tableNode.rx.items(dataSource: dataSource))
    .disposed(by: disposeBag)

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

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

pod 'RxDataSources-Texture'

Development

$ make project
$ open RxDataSources-Texture.xcworkspace

Author

OhKanghoon, [email protected]

License

RxDataSources-Texture is available under the MIT license. See the LICENSE file for more info.

GitHub

link
Stars: 36
Last commit: 3 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

v1.3.0
3 years ago
  • Let's Texture 3.0 (#21)

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics