Point notation is only available for properties and, of course, C. structures. Do you prefer:
foo.aProperty = bar.anotherProperty;
or
[foo setAProperty:[bar anotherProperty]]
... it's a matter of taste. I personally prefer the second, because it is absolutely clear that two calling methods are involved. You cannot say at a glance in this case:
CGFloat x = myView.frame.origin.x;
This is equivalent to:
CGFloat x = [myView frame].origin.x;
The second example clearly shows that the method call is involved, but the first example tends to be more readable.
So, use what suits you, both are fine (although I believe most developers tend to use the former, in part because they are faster to type and tend to be more picky).
source share