objective c - Call Superclass method -
In Objective-C, how do I call the object's super class method?
For example, say I have an example of an object "foo".
There is a method in "foo" which is override. I do not want to call this overriden method. Instead, I want to call the original method at the foo object instance.
You can not do this:
I know that I can add a method for foo: and more: Any other ways? I really do not want to make any way to do this. keyword In this case, the [[Instance Super] super_math]; So far as I know how can I go about doing this?
- (zero) calls on {{super super_method]; }
[foo calluper];
super This does it for you most commonly it is
- Init is seen in the methods here.
- (id) init {if (self = [super init]) {// custom initialization} auto back; }
super keyword is used to call this class which is the
-init method Implementation is called.
Super can be used on any method that implements your superclass.
Comments
Post a Comment