Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3602770
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:47:18+00:00 2026-05-18T20:47:18+00:00

I am kind of newbie on Objective-C and I was looking at a code,

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T20:47:19+00:00Added an answer on May 18, 2026 at 8:47 pm

    Check the top of the implementation file; you should see a line that reads

    @synthesize contrast = contrast_;
    

    The reason one would do this would be to make sure that you access properties through their setters and getters (created with @synthesize), rather than directly.

    In that second piece of code, self.fetchMe grabs the fetchMe_ property using its setter. If this guy had forgotten to use self. and simply written

    FetchClass *fetchOne = [fetchMe contrast];
    

    He’d get an error, since fetchMe doesn’t exist (but fetchMe_ does). As with all things, it’s up to you whether or not to use protection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm kind of a jQuery newbie so bear with me on this. I'm trying
This is kind of newbie question on objective-c: I would like to create a
I`m a newbie at JavaScript trying to understand this tutorial about currying from Oreilly
I'm kind of a newbie to objective programming, so sorry for the dumb question.
Firstly: I am totally a newbie for this kind of work. I have a
This is a very newbie kind of ASP.NET question: I simply don't know and
I'm newbie. Now i face this kind of question. I am using the CustomHttpClient
My Rails skills is (to be kind) rusty so this is probably a newbie
This is a kind of newbie question, but I couldn't find a solution. I
I am kind of a newbie so excuse me if this question is too

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.