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

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -