Possible Duplicate:
Style: Dot notation vs. message notation in Objective-C 2.0
Objective-C Property Access
Before giving me thumbs down for noob-question: I have no idea what to search for when it comes to this question.. Anyway, let's say I'm trying to change the background color of an imageview, what is the difference between:
imageView.backgroundColor = [UIColor orangeColor];
and
[imageView setBackgroundColor:[UIColor orangeColor]];
I know that the first one can be used to GET the actual value, that I can say
UIColor *imageViewColor = imageView.backgroundColor;
and that I can't do this with the other one, but why does then the other one exist? Or is it simply wrong to use the first one as a way of setting values? But then, why does it work?
This question has nothing spesific to do about changing the background color of and imageView by the way, I'm just asking in general, what's the actual difference..