Objective-C - Overriding method in subclass

Viewed 56093

I am having some trouble figuring out hour to accurately override a method in one of my subclasses.

I have subclass (ClassB) of another customclass (ClassA):

@interface ClassB : ClassA {
}

and within ClassA, there is a method called:

-(void)methodName;

which fires correctly.

However, I need this method to fire in ClassB.

I've tried implementing (in ClassB):

-(void)methodName {
  [super methodName];
}

but it still won't fire in ClassB.

How can I override methodName so that it will fire in ClassB?

5 Answers
Related