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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -