Objective-c – How to call a method in Objective-C

objective c

I am trying to build an iPhone app. I created a
method like this:

- (void)score {
    // some code
}

and I have tried to call it in an other method like this:

- (void)score2 {
    @selector(score);
}

But it does not work. So, how do I call a method correctly?

Best Answer

To send an objective-c message in this instance you would do

[self score];

I suggest you read the Objective-C programming guide Objective-C Programming Guide