objc-guide
objc-guide copied to clipboard
Property Patterns
Convention
- Properties should maintain state
- No mutable collections in properties
- Property accessor methods should have minimal, predictable side effects
- When overriding the getter, we almost certainly want to override the setter
- If overriding the setter, you need to override the getter unless the setter override calls super
Rationale
Different rationales per convention, but generally these are good patterns to follow to make your code more maintainable and match the way Apple use properties.
Example
TBD