Skip to content

A simple way to omit declararing DisposeBag in anywhere if the object inherit from NSObject.

License

Notifications You must be signed in to change notification settings

rinov/RxSmartBag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RxSmartBag

Language License Platform

About

A simple way to omit declararing DisposeBag.

Example

import UIKit
import RxSmartBag

extension UIViewController: SmartBagManagerable {}
import RxSmartBag

class ViewController: UIViewController {
  override func viewDidLoad() {
    super.viewDidLoad()

    // `smartBag` is able to use without declararing, and can bind simply by operator.
    
    // Example 1:
    observable.subscribe(...).disposed(by: smartBag)
    
    // Example 2:
    observable.subscribe(...).disposed(by: self)
    
    // Example 3:
    smartBag += observable.subscribe(...)

}

Installation

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

pod "RxSmartBag"

Swift3: pod "RxSmartBag", "~> 1.0.2"

Swift4: pod "RxSmartBag", "~> 2.0.0"

Author

rinov, rinov@rinov.jp

License

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

About

A simple way to omit declararing DisposeBag in anywhere if the object inherit from NSObject.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages