Generating NSManagedObject Class Automatically

Discussion in 'iOS Programming' started by teguh123, May 11, 2011.

  1. teguh123, May 11, 2011
    Last edited by a moderator: May 11, 2011

    teguh123 macrumors member

    Mar 22, 2011
    I see that Xcode properly add these methods on Business.m

    - (void)addDistrictsObject:(District *)value {    
        NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
        [self willChangeValueForKey:@"Districts" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
        [[self primitiveValueForKey:@"Districts"] addObject:value];
        [self didChangeValueForKey:@"Districts" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
        [changedObjects release];
    Unfortunately xcode do not add

    (void)addDistrictsObject:(District *)value;
    On Business.h


    I got compilerwarning when I tried to use function addDistrictsObject

    Also I do not want to change either Business.h or Business.m The xdatamodel will still change a lot.

    So what should I do?

Share This Page