Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RAC(model, actionVisible) = [RACSignal combineLatest:@[RACObserve(self, actionVisibilityCounterProvider),
- RACObserve(self, action)]
- reduce:^NSNumber *(id <OKCounterProvider> counterProvider, id <OKAction> action) {
- BOOL visible = counterProvider.count > 0;
- visible |= (action != nil && counterProvider == nil);
- return @(visible);
- }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement