Objective-C 101: dot notation and object properties?

Property creates automatic message declarations, just like writing.

Property creates automatic message declarations, just like writing (int)thing; (void)setThing:(int)value; @synthesize automatically creates the implementations, i.e. (int)thing { return thing; } (void)setThing:(int)value { thing = value; } If you give a definition yourself, it overrides the @synthesized version. So as long as you name a method correctly, it will work, with or without @synthesize in there.

Dot notation works with either synthesized or custom method implementations.

A thing to note here is that the actual name setThing is important. If your setter has a different name, you can override that with the setter attribute of the @property declaration. – nall Oct 8 '09 at 17:58.

This is not correct. You can still use dot-notation even if you write custom getters or setters provided of course that your getters and setters maintain the correct method naming for the property.

From the docs: @synthesize You use the @synthesize keyword to tell the compiler that it should synthesize the setter and/or getter methods for the property if you do not supply them within the @implementation block. It only synthesizes if you haven't already written them. If you've written them, they don't get synthesized.

As long as your getters and setters are KVC compliant for getters and setters, dot notation should work. – pxl Oct 8 '09 at 17:47 What's that got to do with @synthesize? – Terry Wilcox Oct 12 '09 at 19:28 What did this get voted down for?

Acurracy? – Terry Wilcox Oct 12 '09 at 19:29.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions