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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -