iPhone - a question about @property

Posted by Roger on Stack Overflow See other posts from Stack Overflow or by Roger
Published on 2010-12-28T05:42:22Z Indexed on 2010/12/28 5:54 UTC
Read the original article Hit count: 225

Filed under:

Hi, I am kind of newbie on Objective-C and I was looking at a code, trying to understand a few things, and I come across with this .h file:

there was a declaration like that on the @interface section

MyVideoClass *contrast_;

then below we have

@property (nonatomic, retain) MyVideoClass *contrast;
@property (nonatomic, retain) FetchClass *fetchMe;

The strange part is that the first has an underscrore after the name and the second one, doesn't.

The other strange thing is that the guy has a call to these properties like this:

FetchClass *fetchOne = [self.fetchMe contrast];

What kind of call is that? This seems pretty insane to me. I simply cannot understand what is going on here, but the code works. pretty insane.

Can you guys explain me that? Forgive the stupid question, but I am still learning...

thanks

© Stack Overflow or respective owner

Related posts about iphone