First, the basic knowledge
foundation-basic framework. The framework contains many of the data types commonly used in development, such as structs, enumerations, classes, etc., which are the basis of other iOS frameworks.
If you want to use the data type in the foundation framework, the main header file containing it is available.
namely #import <Foundation/foundation.h>
Add: The Core Foundation framework is relatively low-level, and the code inside is almost all C-language, and the foundation is OC.
Second, the general introduction of the structure and simple use
Commonly used structures:
(i) basic use of Nsrang
Creating variables
(ii) Use of Nspoint/cgpoint
(iii) Use of nssize/cgsize
(iv) Use of Nsrect/cgrect
General usage:
In development, you want to validate the value of a property in a struct, how should I print it?
The frame function is used to transform the corresponding structure into a string, and then the string can be printed directly.
(v) some commonly used structural functions in the foundation framework
Add 1: Import Framework Build Phase->link (+)
Add 2:the coordinates origin in iOS is in the upper left corner.
Foundation framework-Structural body