/* ----------const NSString *STR1 = @ "123"--- -------| 0x123456 str---0x654321 | | 123----0x654321 | The const modifier is *STR, and *str is the value, so the const modifier is the value 123| STR---0x654221 | | Ads----0x654221 | Because the const modifier is a value, the pointer str is also mutable (can point to other values)----------NSString Const *STR2 = @ "456"----------| 0x123464 str2---0x654311 | | 456----0x654311 | The same as above | STR2---0x654211 | | ZXC----0x654211 | ----------nsstring* Const STR3 = @ "789"----------| 0x123478 STR3---0x654301 | | 789----0x654301 | The const modifier is STR3, and STR3 is the pointer (the address that points to the value), | || | So the const modifier is the value 789 address value | 0x123478 STR3---0x654301 | | Qwe----0x654201 | Because the const modifier is the pointer (the address that points to the value) | || | So the pointer str3 is immutable (cannot point to other addresses)------------------------------------------------------ */
The use of const in IOS when modifying objects