Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RACSubject *subject = [RACReplaySubject replaySubjectWithCapacity:1];
- [subject sendCompleted];
- [subject finally:^{
- NSLog(@"never called");
- }];
- [subject subscribeCompleted:^{
- NSLog(@"called");
- }];
- void (^block)() = ^ {
- NSLog(@"like finally!");
- };
- [subject subscribeError:^(NSError *error) {
- block();
- } completed:^{
- block();
- }];
- RACSubject *subject = [RACSubject subject];
- [subject finally:^{
- NSLog(@"never called");
- }];
- [subject subscribeCompleted:^{
- NSLog(@"called");
- }];
- [subject sendCompleted];
- RACSubject *subject = [RACReplaySubject replaySubjectWithCapacity:1];
- [subject sendCompleted];
- [[subject finally:^{
- NSLog(@"called now!");
- }] subscribeCompleted:^{
- NSLog(@"called");
- }];
- RACSubject *subject = [RACReplaySubject replaySubjectWithCapacity:1];
- [subject sendCompleted];
- RACSignal *signalWithFinally = [subject finally:^{
- NSLog(@"finally block");
- }];
- [signalWithFinally subscribeCompleted:^{
- NSLog(@"first subscriber completed");
- }];
- [signalWithFinally subscribeCompleted:^{
- NSLog(@"second subscriber completed");
- }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement