Latest0.1.0
Homepagehttps://github.com/tr1ckyf0x/RxCell
LicenseMIT
Platformsios 8.0
DependenciesRxSwift
FrameworksUIKit, Foundation
Authors

Version
License
Platform

If you’re using RxSwift, you’ve probably encountered the following code more than a few times.

class MyCell: UITableViewCell {
  var reuseBag = DisposeBag()

  override func prepareForReuse() {
    super.prepareForReuse()
    reuseBag = DisposeBag()
  }
}

Instead of adding a new property to every object, use this library to add it for you, to any subclass of UITableViewCell, UITableViewHeaderFooterView, UICollectionReusableView.

thing
.bind(to: otherThing)
.disposed(by: rx.reuseDisposeBag)

Installation

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

pod 'RxCell'

In AppDelegate.swift, just import RxCell framework and enable it.

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
  RxCell.activate()
  return true
}

Example

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

Author

tr1ckyf0x, [email protected]
Inspired by https://github.com/bmoliveira/Cell-Rx

License

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

Latest podspec

{
    "name": "RxCell",
    "version": "0.1.0",
    "summary": "RxSwift extensions on UITableViewCell and UICollectionViewCell.",
    "description": "Adds rx.reuseDisposeBag property for UITableViewCell and UICollectionViewCell like a NSObject-Rx adds rx.disposeBag for NSObject.",
    "homepage": "https://github.com/tr1ckyf0x/RxCell",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Vladislav Lisyanskiy": "[email protected]"
    },
    "source": {
        "git": "https://github.com/tr1ckyf0x/RxCell.git",
        "tag": "0.1.0"
    },
    "social_media_url": "https://facebook.com/Vladislav.Lisyanskiy",
    "platforms": {
        "ios": "8.0"
    },
    "swift_version": "4.0",
    "source_files": "RxCell/Classes/**/*",
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "dependencies": {
        "RxSwift": [
            "~> 4.0"
        ]
    }
}

Pin It on Pinterest

Share This