Search code examples
objective-cpropertiesreadonlyretain

Does @property (readonly, retain) have a meaning?


XCode accepts it. But will retain be applied when I internally set the property (no setter outside since readonly but when I initialize the value in a class method) ?

Regards, Apple92


Solution

  • The reason to do this is to allow you to do @property (retain) in a class continuation or category. If you don't have the retain on the outer property, you will get a warning about the properties being mismatched.