I am learning ReactiveObjC , the ReactiveCocoa Objective-C version.
For the code following: In RACSignal.h
,
- (RACSignal *)reduceEach:(id _Nullable (^)())reduceBlock RAC_WARN_UNUSED_RESULT;
(id _Nullable (^)())
Xcode reports a error:
This block declaration is not a prototype
Multiple parameters could be put in the reduceBlock()
.
As the code following: In UIAlertView+RACSignalSupport.m
, and others ,
- (RACSignal *)rac_buttonClickedSignal {
RACSignal *signal = [[[[self.rac_delegateProxy
signalForSelector:@selector(alertView:clickedButtonAtIndex:)]
reduceEach:^(UIAlertView *alertView, NSNumber *buttonIndex){
return buttonIndex;
}]
......
return signal;
}
Kinda generic. I think I can put zero or more parameters in the block, with void (^block)()
declared.
The syntax is not supported now in Xcode. I want to know how to solve it, and why.
Many Thanks in advance.