OC, oc Language
Features of the OC language 1. hyperset of the C-language statement, which allows the C-language program source code to be used in the OC. the compiler is compatible with the C-language program. 2. It has a complete pipeline object-oriented feature.
3. contains a runtime system.
5. Rich class libraries.
Division/remainder %
Use self to call its own object Methods
Object-Oriented Programming (OOP)
Class: Abstraction of things with the same features and Behaviors
The object is an instance of the class. The class is the object type.
Process-oriented programming philosophy: Event-centric, focus on the steps to solve the problem and implement a function call (step by step)
Object-Oriented Programming (OOP): It is centered on things and focuses on the objects involved in the question. To accomplish this problem is only a small function of all the functions of the object.
@ Interface
@ Interface Person: NSObject // interface Name: parent class
Class interface: starts with @ intherface and ends with @ end
@ Intherface + class name: (indicating inheritance) + parent class name {instance} method @ end
Declare the instance variables and methods of the class between @ intherface and @ end.
The Interface part of a class can be defined as long as it complies with this form.
@ Implementation
Class implementation: @ implementation starts with @ end
@ Implementation + class name
@ Implementation and @ end intermediate write, class method implementation
The class implementation can be completed as long as it complies with this form.