Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

What's the meaning of -forwardSignalWhileActive: ? #12

Closed
limboy opened this issue Jan 8, 2014 · 2 comments
Closed

What's the meaning of -forwardSignalWhileActive: ? #12

limboy opened this issue Jan 8, 2014 · 2 comments
Labels

Comments

@limboy
Copy link

limboy commented Jan 8, 2014

don't quite get the idea. can't we just do

[[self didBecomeActiveSignal] subscribeNext: ^(id x)];
@jspahrsummers
Copy link
Member

-forwardSignalWhileActive: will subscribe to a signal when the view model becomes active, and dispose of that subscription when it becomes inactive. This means that work can easily be started and canceled in accordance with the view model's active state.

Also, anything that avoids explicit subscription is a good thing.

@limboy
Copy link
Author

limboy commented Jan 9, 2014

@jspahrsummers thanks 4 ur answer, much clearer.

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

No branches or pull requests

2 participants