In Layman's words:
when the extern field is used, the declared variable is a global variable and can be called, as well as a narrower term: extern is able to extend a variable in a class to a class;
Static variables are statically declared, and when the value of the variable is changed, the change is saved and the value is read once each time it is used.
Const declares that the value of a variable is immutable. is a property of ReadOnly and cannot change the value of a variable.
Detailed use Method:
How to use 1.static: static nsstring *str = @ "haha";
How to use 2.const: nsstring *const str = @ "haha";
How to use 3.extern: Declare a variable extern nsstring *str = @ "123" inside A.h; This declares a global variable. In B.h inside the same write code extern nsstring *str, and then b.m inside directly print STR will be able to print out 123来, the use of the time does not need to import A.h file header, or whether the classification has been created and so on.
Hope to have some help, later when writing code can be more tall on some, is also a skill.
Chubby say things------iOS extern,static and const differences and how to use