سؤال

If I have a read-only string property, is it necessary to specify strong (or retain) or copy in the declaration? If I don't specify, is one of them assumed?

It seems to me the ownership attribute is only useful when you have a setter.

@property (nonatomic, readonly) NSString *name;

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top