Comments (6)
You have to store the chain of operations otherwise it will be disposed.
from signalkit.
Could you provide example please? Is it possible to use DisposeBag or I got it wrong? Thanks
from signalkit.
Yes you can use DisposableBag
to store your observations/bindings here is an example:
class MyClass {
let disposableBag = DisposableBag()
// .....
private func setupObservations() {
object.observe().keyPath("age", value: object.age)
.next { print($0) }
.disposeWith(disposableBag)
}
}
Thanks
from signalkit.
Well I tried that too but what I'm getting is Value of type 'KVOSignal<Int>' has no member 'disposeWith'
from signalkit.
Ah, the 3.0 version hasn't been released on cocoapods, still using 2.0, thats the problem. Thanks for your help!
from signalkit.
Just updated the podspec on the cocoapods.
Thanks
from signalkit.
Related Issues (18)
- Option to emit the initial observable value HOT 5
- OS X Support
- Rename `ControlSignal` to `UIControlSignal` HOT 1
- Aliases for `.all({ $0 })` and `.some({ $0 })` HOT 1
- Nested ObservableArray not calling the correct ArrayBindingObserver initialiser in .observe() HOT 2
- Support for `UIBarButtonItem` HOT 1
- Undeclared CollectionChangeSet type in 3.0 release HOT 2
- Add `deinit` and propagated `dispose` method to `DisposableBag` class HOT 1
- and() or() not() for SignalKit.Signal<(A, B, C)> HOT 4
- Swift 3.0 compatibility HOT 8
- NotificationObserverTests.testDisposeOnDeinit() is failed with Swift 3 fork
- The correct way to do an "initial" sendNext to get combineLatestWith to work HOT 3
- how would i create a Timer signal HOT 2
- Swift 2.0 HOT 1
- ObservableArray HOT 1
- UIKit generic type extensions
- Pod doesn't include ObservableType HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from signalkit.