почему мой UILabel отображает NSInteger

У меня есть классы ViewController и GameController, которые просто подклассы из NSObject. С контроллером представления связана одна кнопка, и он запускает IBAction, который входит в класс GameController. В начале класса GameController находится CADisplayLink, который добавляет единицу к счету с именем int. В отладчике счет идет вверх, но метка будет отображать только 0.

в ViewController

-(void)setScore:(NSInteger)gameScore{
NSString *string = [NSString stringWithFormat:@"%i", gameScore];
scoreLabel.text = string;
NSLog(@"the score is %i", gameScore);
}

-(IBAction)play:(id)sender{
gameController = [[GameController alloc] init];
//in my header is GameController* gameController;
}

в GameController

-(id)init{
self = [super init];
if (self) {

viewController = [[ViewController alloc] init];
//in header ViewController* viewController;
displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(gameLoop:)];
[displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode: NSRunLoopCommonModes];

//in the header CADisplayLink* displayLink;
}
return self;

}

-(void)gameLoop:(CADisplayLink *)sender{
deltaScore++;
if (deltaScore >= 20) {
deltaScore -= 20;
score++;
//deltaScore and score are NSIntegers
[viewController setScore:score];
}
}

Ответы на вопрос(6)

Ваш ответ на вопрос