All Projects → RxSwiftCommunity → Rxrealmdatasources

RxSwiftCommunity / Rxrealmdatasources

Licence: mit
An easy way to bind an RxRealm observable to a table or collection view

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Rxrealmdatasources

Rxasdatasources
RxDataSource for AsyncDisplayKit/Texture
Stars: ✭ 114 (-25.97%)
Mutual labels:  reactive, tableview, collectionview
Rxdatasources
UITableView and UICollectionView Data Sources for RxSwift (sections, animated updates, editing ...)
Stars: ✭ 2,784 (+1707.79%)
Mutual labels:  binding, tableview, collectionview
Fritz2
Easily build reactive web-apps in Kotlin based on flows and coroutines.
Stars: ✭ 308 (+100%)
Mutual labels:  reactive, binding
Realm Js
Realm is a mobile database: an alternative to SQLite & key-value stores
Stars: ✭ 4,648 (+2918.18%)
Mutual labels:  reactive, realm
Modelassistant
Elegant library to manage the interactions between view and model in Swift
Stars: ✭ 26 (-83.12%)
Mutual labels:  tableview, collectionview
Shsegmentedcontroltableview
Both scroll horizontal and vertical for segment scrollview which have a same header. — 类似半糖、美丽说主页与QQ音乐歌曲列表布局效果,实现不同菜单的左右滑动切换,同时支持类似tableview的顶部工具栏悬停(既可以左右滑动,又可以上下滑动)。兼容下拉刷新,上拉加载更多。现已加入swift豪华套餐,使用样例助你快速使用
Stars: ✭ 259 (+68.18%)
Mutual labels:  tableview, collectionview
Differencekit
💻 A fast and flexible O(n) difference algorithm framework for Swift collection.
Stars: ✭ 2,986 (+1838.96%)
Mutual labels:  tableview, collectionview
Realm Core
Core database component for the Realm Mobile Database SDKs
Stars: ✭ 836 (+442.86%)
Mutual labels:  reactive, realm
observable ish
Observable state and events for browser and Flutter.
Stars: ✭ 26 (-83.12%)
Mutual labels:  reactive, binding
Realm Graphql Service
GraphQL service for Realm Object Server
Stars: ✭ 44 (-71.43%)
Mutual labels:  reactive, realm
Rxiglistkit
RxSwift wrapper for IGListKit
Stars: ✭ 44 (-71.43%)
Mutual labels:  reactive, collectionview
Realm Graphql
GraphQL client for Realm Object Server
Stars: ✭ 79 (-48.7%)
Mutual labels:  reactive, realm
SNAdapter
iOS swift tableview and collectionView Adapter
Stars: ✭ 35 (-77.27%)
Mutual labels:  tableview, collectionview
mvcvm-swift-file-templates
Swift file templates for boosting mobile app development.
Stars: ✭ 16 (-89.61%)
Mutual labels:  reactive, tableview
Containercontroller
UI Component. This is a copy swipe-panel from app: Apple Maps, Stocks. Swift version
Stars: ✭ 273 (+77.27%)
Mutual labels:  tableview, collectionview
Pageable
An easy way to Pagination or Infinite scrolling for TableView/CollectionView
Stars: ✭ 44 (-71.43%)
Mutual labels:  tableview, collectionview
Diffabledatasources
💾 A library for backporting UITableView/UICollectionViewDiffableDataSource.
Stars: ✭ 601 (+290.26%)
Mutual labels:  tableview, collectionview
bindkit
Two-way data binding framework for iOS. Only one API to learn.
Stars: ✭ 13 (-91.56%)
Mutual labels:  reactive, binding
WpfExtensions
Some syntactic sugar for Wpf development.
Stars: ✭ 128 (-16.88%)
Mutual labels:  reactive, binding
Rxrealm
RxSwift extension for RealmSwift's types
Stars: ✭ 1,007 (+553.9%)
Mutual labels:  reactive, realm

RxRealmDataSources

Version License Platform

This library is currently WIP.

Example

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

Usage

This library is a light data source implementation for RxRealm. It allows you to easily bind an Observable sequence of Realm objects to a table or a collection view. The library is both iOS and macOS compatible.

Binding to a table view

Check out the included demo app to see this in action.

// create data source
let dataSource = RxTableViewRealmDataSource<Lap>(cellIdentifier: "Cell", cellType: PersonCell.self) {cell, ip, lap in
    cell.customLabel.text = "\(ip.row). \(lap.text)"
}

// RxRealm to get Observable<Results>
let realm = try! Realm(configuration: DataRandomizer.realmConfig)
let laps = Observable.changeset(from: realm.objects(Timer.self).first!.laps)
    .share()

// bind to table view
laps
    .bindTo(tableView.rx.realmChanges(dataSource))
    .disposed(by: bag)

Binding to a collection view

Check out the included demo app to see this in action.

// create data source
let dataSource = RxCollectionViewRealmDataSource<Lap>(cellIdentifier: "Cell", cellType: LapCollectionCell.self) {cell, ip, lap in
    cell.customLabel.text = "\(ip.row). \(lap.text)"
}

// RxRealm to get Observable<Results>
let realm = try! Realm(configuration: DataRandomizer.realmConfig)
let laps = Observable.changeset(from: realm.objects(Timer.self).first!.laps)
    .share()

// bind to collection view
laps
    .bindTo(collectionView.rx.realmChanges(dataSource))
    .disposed(by: bag)

Reacting to cell taps

The library adds an extension to table views and collection views, allowing you to easily subscribe to the cell selected delegate event. Here's a snippet from the example demo app:

tableView.rx.realmModelSelected(Lap.self)
  .map({ $0.text })
  .bind(to: rx.title)
  .disposed(by: bag)

Installation

This library depends on RxSwift, RealmSwift, and RxRealm.

CocoaPods

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

pod "RxRealmDataSources"

TODO

  • Test add platforms and add compatibility for the pod

License

This library belongs to RxSwiftCommunity. It has been created by Marin Todorov.

RxRealm 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].