NSString的屬性修飾使用copy和strong的區別

一、不可變字符串屬性、 @property (nonatomic,strong)NSString *strongedString; @property (nonatomic,copy)NSString  *copyedString;       1、當源不可變字符串改變時      使用srong修飾的屬性由於取得的還是源不可變字符串地址、其值會跟隨源字符串改變而改變。      使用copy修飾
相關文章
相關標籤/搜索