If I understand this correctly, copy enforces the setter to create a copy of the object passed in. However, if I use it together with readonly, there won’t be a setter. So is my assumption correct, that combining @property (copy, readonly) doesn’t make any sense or am I missing something?
If I understand this correctly, copy enforces the setter to create a copy of
Share
It does make sense. For instance, if you want to access a property’s setter in your implementation only:
and in the class continuation in the
.mfile:Note that the
copy, readonlydeclaration in the public header is required in this case!