Objective-C Language Methods Instance methods


An instance method is a method that's available on a particular instance of a class, after the instance has been instantiated:

MyClass *instance = [MyClass new];
[instance someInstanceMethod];

Here's how you define one:

@interface MyClass : NSObject

- (void)someInstanceMethod; // "-" denotes an instance method


@implementation MyClass

- (void)someInstanceMethod {
    NSLog(@"Whose idea was it to have a method called \"someInstanceMethod\"?");