I have a simple "model" class, for example (complete with constructor, of course)
@implementation Widget @synthesize name; @synthesize color; - (id) init { if (self = [super init]) { self.name = @"Default Name"; self.color = @"brown"; } return self; } @end
I declared it an internal member of my controller as follows:
and ... I'm trying to initialize it inside my controller as follows:
but .. it does not seem to initialize my object because my text field becomes empty every time. Any clues?
cocoa-touch
Dave
source share