Whether the two methods are the same in OC, regardless of the parameter type and return value. The sum of the methods is related to the method name.
For example, in the same fatigue in OC, this function form is incorrect.
-(Void) theage :( INT) Age name :( nsstring *) Name
-(Nsstring *) theage :( INT) Age name :( nsstring *) Name
The syntax rules inherited by oC are:
@ Interface subclass: parent class
Permission control:
Any place inside the modifier class subclass
Private
Yes
Protected
Yes Yes
Public
Yes YesYes
Several methods related to classes:
-(Bool) iskindofclass :( class) Aclass; is the object a member or subclass of Aclass?
-(Bool) ismemberofclass :( class) Aclass; whether the object is an Aclass Member
-(Bool) issubclassofclass :( class) Aclass; is the object a subclass of Aclass?
-(Bool) respondstoselector :( SEL) aselector; whether the object can respond to the method specified by aselector
-(ID) performselector: (SEL) aselector; the object calls the method specified by aselector.
-(ID) specify mselector :( SEL) aselector withobject :( ID) object; the object calls the method specified by aselector and passes the parameter object
-(ID) specify mselector :( SEL) aselector withobject :( ID) object1 withobject :( ID) object2; gambling Xia ing calls the method specified by aselector and passes the object1 and object2 Parameters