Objective-C Language Instance methods


Example

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

@end

@implementation MyClass

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

@end