Ok, so I have this, but it wont work:
@interface UILabel (touches)
@property (nonatomic) BOOL isMethodStep;
@end
@implementation UILabel (touches)
-(BOO
There is actually a way, which may not be ideal, but does work.
For it to work, you will need to create a category for a class X and can only be used on subclasses of the same X (e.g. category UIView (Background) can be used with class MyView : UIView, but not directly with UIView)
// UIView+Background.h
@interface UIView (Background)
@property (strong, nonatomic) NSString *hexColor;
- (void)someMethodThatUsesHexColor;
@end
// UIView+Background.h
@implementation UIView (Background)
@dynamic hexColor; // Must be declared as dynamic
- (void)someMethodThatUsesHexColor {
NSLog(@"Color %@", self.hexColor);
}
@end
Then
// MyView.m
#import "UIView+Background.h"
@interface MyView : UIView
@property (strong, nonatomic) NSString *hexColor;
@end
@implementation MyView ()
- (void)viewDidLoad {
[super viewDidLoad];
[self setHexColor:@"#BABACA"];
[self someMethodThatUsesHexColor];
}
@end
Using this method, you will need to "redeclare" your properties, but after that, you can do all of its manipulation inside your category.