开发者

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

开发者 https://www.devze.com 2022-12-22 21:23 出处:网络
I am implementing view controllers that shall have different behaviour. They have a common base class, which we will call \"SuperClass\".

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 meth开发者_开发百科od 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?


B from SubClass

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号