Skip to content

Handy RxSwift extensions on UITableViewCell and UICollectionViewCell, including rx_reusableDisposeBag.

License

Notifications You must be signed in to change notification settings

sergdort/Cell-Rx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cell+Rx

Cell+Rx provides a similar API to NSObject+Rx but for cells who are reused along the way.

I found myself creating DisposeBags that were reset on the prepareForReuse() function which was pretty repetitive.

Instead of adding a new property to every cell, use this library to add it for you, to any subclass of UITableViewCell or UICollectionViewCell.

thing
  .bindTo(otherThing)
  .addDisposableTo(rx_reusableDisposeBag)

It'll work just like a property: when the instance is deinit'd, the DisposeBag gets disposed. It will also reset whenever the cell is reused by detecting prepareForReuse() calls. It's also a read/write property, so you can use your own, too.

Installing

####CocoaPods

This works with RxSwift version 2, which is still prerelease, so you've gotta be fancy with your podfile.

pod 'Cell+Rx'

And that'll be 👌

License

MIT License.

About

Handy RxSwift extensions on UITableViewCell and UICollectionViewCell, including rx_reusableDisposeBag.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 88.7%
  • Objective-C 8.8%
  • Shell 2.3%
  • Ruby 0.2%