Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dispose SignalProducer created via Action #3716

Closed
ivedeneev opened this issue Oct 13, 2020 · 1 comment
Closed

Dispose SignalProducer created via Action #3716

ivedeneev opened this issue Oct 13, 2020 · 1 comment

Comments

@ivedeneev
Copy link

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?

@ivedeneev
Copy link
Author

ReactiveSwift is more suitable place for such an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant