Advertisement
Guest User

Untitled

a guest
Jun 19th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. RAC(model, actionVisible) = [RACSignal combineLatest:@[RACObserve(self, actionVisibilityCounterProvider),
  2. RACObserve(self, action)]
  3. reduce:^NSNumber *(id <OKCounterProvider> counterProvider, id <OKAction> action) {
  4. BOOL visible = counterProvider.count > 0;
  5. visible |= (action != nil && counterProvider == nil);
  6. return @(visible);
  7. }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement