I would like to add one property to UIView. I know I could subclass an UIView but as I want to add onelly one property I would like just to extend it.
I try like this :
@interface UIView (Util)
@property(nonatomic, assign) BOOL isShow;
@end
@implementation UIView (Util)
@dynamic isShow;
-(void)setIsShow:(BOOL)isShow{
self.isShow = isShow;
}
@end
but it doesn't work. It throw an exception : Thread 1: EXC_BAD_ACCESS(code=2,address,...)