Cocoa help thread

Associate
Joined
9 Jun 2009
Posts
1,397
Location
Suffolk
Thanks to you all for the suggestions for cocoa books, I've been trying to get my first simple app working, where I am breaking apart a JSON feed in order to print some information to the screen, now I'm getting stuck with this code and I can't for the life of me work out whats wrong:

Code:
...
@property (strong, nonatomic) NSString *serverName;
@property (strong, nonatomic) NSNumber *serverPop;
@property (strong, nonatomic) NSNumber *serverPatch;

@end

@implementation ncStatsViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    ncStats *feed = [[ncStats alloc]init];
    [feed getStatus];
    _serverName = feed.serverName;
    _serverPop = feed.population;
    _serverPatch = feed.patch;
    
}

- (IBAction)changeGreeting:(id)sender {
    self.serverLabel.text = _serverName;
    self.popLabel.text = _serverPop;
    self.patchLabel.text = _serverPatch;
}
...

the serverLabel, popLabel and patchLabel are linked to labels in the UI that I am trying to update with the information from the feed of serverName, population and patch.

Any help to fix this would be appreciated!

TIA
 
Back
Top Bottom