I’ve recently discovered that there is no need to declare a getter as a property to use the dot notation. I don’t know about other compiler versions, but this is true for Apple LLVM 3.1. Does anyone foresees any problems with it? So, basically:
---------Star.h----------
-(UInt32)age;
---------Star.m----------
-(UInt32)age
{
//get star age
return starAge;
}
---------RootViewController.m----------
{
...
//use this instead of [star age] even if there is no synthesized property "age"
NSLog(@"%i", star.age);
...
}
Your code is perfectly acceptable. A compiler wold do something similiar if you wrote: