Tagged with: Object object C class-oriented inheritance
Multiple inheritance is not supported in Point:1, Oc. Dynamic invocation. 2. The data members of a derived class cannot have the same name as the base class, and if the name is the same, the system will not define success 3, the member function of the base class can be the same as the name of the base class member function (equivalent to the virtual function in C + +) 4, in the derived class to call the method in the base class 5, Object-c has the characteristics of single inheritance, each subclass has only one direct parent Class 6, subclasses can inherit to all member methods of the parent class and all member variables 7, most of the time the subclass is always based on the parent class, extending the new method and variable 8, Subclasses containing a phenomenon with the same name as a parent class are called method overrides or method overrides (override), and you must note that the method name and label name must be identical when overridden.
The Load method (class method) is not called and is called automatically by the system. Call Order: base class, derived class, classification method Initialize method (class method) class instantiation The first call is used
The Super keyword is used to qualify the object to invoke the property or method it inherits from the parent class, and as self, super cannot appear in the class method. Callers in a class method can only be the class itself, not the object. The program enforces the use of the Super keyword to specify a data member or method member that invokes the parent class, and can access the member variables that are hidden in the parent class.
"Object-c" inheritance, super keyword