When I am declaring a method like this:
- (void)doAnythingWithThisBlock:(void(^)(NSString *, ... NS_REQUIRES_NIL_TERMINATION))AnythingBlock;
It is giving compilation error:
Expected ')'
but when I am declaring it like this:
- (void)doAnythingWithThisBlock:(void(^)(NSString *, ...))AnythingBlock;
It compiles fine and works as expected
Cannot we use - NS_REQUIRES_NIL_TERMINATION while declaring a method which accepts input as block with variable number of arguments?
I am trying it in XCode 4.2
I guess NS_REQUIRES_NIL_TERMINATION is only for method declarations 1
However you can try to typedef your block to certain type and pass it as an argument: may be clang will eat it then?