I am using Core Data and would like to run some custom code when setting a property.
@interface FTRecord : NSManagedObject
@property (nonatomic) NSTimeInterval timestamp;
@implementation FTRecord
@dynamic timestamp;
-(void)setTimestamp:(NSTimeInterval)newTimestamp
{
//run custom code....
//and now how to pass the value to the actual property?
[self setTimestamp:newTimestamp];
}
In this case I have defined the setter body for the timestamp property. But how do I set the value of the property without running into a recursion loop?