I am currently using blocks in my UIButton category. However I have come across this error which I cannot solve:
error: /usr/include/objc/objc-class.h: No such file or directory
This is the line of code that uses blocks:
FTButtonBlock block = objc_getAssociatedObject(self, "buttonBlock");
Change
#import <objc/objc-class.h>
to
#import <objc/runtime.h>
From the blog entry: error: objc/objc-class.h: No such file or directory
Replace current line with following line:
#import <objc/runtime.h>
Thanks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With