У меня есть IBAction и он связан с кнопкой в .xib. Но для действия нужен этот код;
- (void) reportScore: (int64_t) score forCategory: (NSString*) category
{
GKScore *scoreReporter = [[GKScore alloc] initWithCategory:category];
scoreReporter.value = counter;
[scoreReporter reportScoreWithCompletionHandler: ^(NSError *error)
{
[self callDelegateOnMainThread: @selector(scoreReported:) withArg: NULL error: error];
NSLog(@"Nice: %d", counter);
}];
}
Есть ли способ соединить мою кнопку с пустотой? Или что-то вроде того?
- (IBAction) subScore {
//data
}