Reputation: 2651
When I declare a @property
it is obvious that I would like to use it later. For some reasons declaring @property
is not enough and I have to tell compiler to @synthetize
it in every .m
file. Because of this every .m
file in my projects starts with @synthetize
.
Why they did not do it in a C# way, where just declaration is enough and compiler do the rest?
Upvotes: 1
Views: 544
Reputation: 1441
You get standard Accessors almost for free and its possible to roll your own Getters / Setter if necessary.
Upvotes: 0
Reputation: 992995
By making @synthesize
optional, you are free to implement your getter and setter methods in any way you choose.
You can find more information in Apple's Declared Properties documentation, particularly the section titled "Property Implementation Directives".
Upvotes: 4