Thursday, 14 February 2013

To set a entity attribute value from .m file where other attributes are dynamically filled.




-(id)initWithEntity:(NSEntityDescription *)entity insertIntoManagedObjectContext:(NSManagedObjectContext *)context
{
    self = [super initWithEntity:entity insertIntoManagedObjectContext:context];
    if (self) {
        self.isEnabled = [NSNumber numberWithInt:1];
    }
    return self;
}