ReactiveCocoa / ReactiveSwift

Streams of values over time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dispose SignalProducer created by Action

ivedeneev opened this issue · comments

Hello, im using Action for downloading file from server. I bind button tap events to action like this
downloadAction.bindingTarget <~ button.reactive.controlEvents(.touchUpInside) Also Im able to stop this download. Binding target created like this

public var bindingTarget: BindingTarget<Input> {
	return BindingTarget(lifetime: lifetime) { [weak self] in self?.apply($0).start() }
}

If im manually call downloadAction.apply() method I could store disposable and dispose it when I need to cancel download. How could I do this using binding target approach?

Hello. 👋 Thanks for opening this issue. Due to inactivity, we will soft close the issue. If you feel that it should remain open, please let us know. 😄