You can use the @property approach in conjunction with @synthesize to automatically generate getters and setters.
That is the new way of doing things, it makes working with getters/setters a lot easier because you don’t have to write them yourself. The instance variable (which is defined between the braces, like in your example above) is also created for you, so there is no need to do this manually unless you want to support older versions of the system.
More information here
2
solved objective c syntax: @property keyword [duplicate]