Open CocoaJiang opened 1 year ago
my code
#import <ReactiveObjC/ReactiveObjC.h> -(UIView * _Nonnull (^)(void (^ _Nonnull)(void)))addTouchAction{ @weakify(self); return ^(void(^actionBlock)(void)){ @strongify(self); self.userInteractionEnabled = YES; UITapGestureRecognizer *zer = [[UITapGestureRecognizer alloc]initWithActionBlock:^(id _Nonnull sender) { actionBlock(); }]; [self addGestureRecognizer:zer]; return self; }; }
build error : "error: unexpected '@' in program @weakify(self); ^ " , "error: unexpected '@' in program @strongify(self); "
Try to use my fork, https://github.com/sdkdimon/RACObjC
Also it is separated for UI and Non UI modules.
my code