objective c - In ObjectiveC, is it necessary to declare strong vs copy for a readonly property? -


in objective-c, it's common declare nsstring/nsarray/nsdictionary copy, necessary readonly property or there no difference? if nsstring readonly, never set, declaring strong or copy have same effect right?

//use strong rather copy here , work same since never copied?

@property (nonatomic, readonly) nsstring *string;

if read-only don't need specify it. if you're going redeclare privately readwrite want specify it. readonly properties has no effect no setter created.


Comments

Popular posts from this blog

java - BeanIO write annotated class to fixedlength -

Using Java 8 lambdas/transformations to combine and flatten two Maps -

How to connect android app to App engine -