Tomen
Tomen

Reputation: 4854

Objective-C: Will super send a message to the overwritten sub-method?

I am implementing view controllers that shall have different behaviour. They have a common base class, which we will call "SuperClass".

In SuperClass there is a method A which sends a message to method B. Let's say i create a SubClass and overwrite B.

If i now create an instance of SubClass and call A, will A call B from SuperClass or from SubClass?

Upvotes: 1

Views: 217

Answers (1)

Ross
Ross

Reputation: 14425

B from SubClass

Upvotes: 2

Related Questions