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 7783517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:51:43+00:00 2026-06-01T19:51:43+00:00

I’m starting to learn how to read message syntax in Objective-C and want to

  • 0

I’m starting to learn how to read message syntax in Objective-C and want to reinforce good understanding of message syntax (I come from a Java/C#/Ruby background).

I’m currently looking at the statement:

[self.view addSubview:label];

“Send this message to the addSubView method, with label as the argument, the mthod is on the view object on self. “

(“on” isn’t really a great way to describe the “dot notation” for the objects. I’m open to a better way to transcribe it!)

How do you read and interpret the above statement?

  • 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-06-01T19:51:45+00:00Added an answer on June 1, 2026 at 7:51 pm

    This is actually a nested message send, althogh the dot syntax makes that confusing.* The distinction between messages and methods in ObjC can also be a bit confusing at first. Generally, one can talk about them as equivalent, but strictly, a message is sent to an object; the message is looked up in the object’s method list, and then the associated method is called.**

    It can be rewritten:

    [[self view] addSubview:label];
    

    So the message view is being sent to self, the reciever. The result of that is then in the receiver position for the other message, which is addSubview:. You’re right about label being the argument to addSubview:.

    In English, then, this is: “Add label as a subview of self‘s view” or “send addSubview:, passing label, to the result of sending view to self“.


    *The dot syntax is intended as sugar for property access, that is, for using the property’s setter and getter methods; by default, the name of the getter is the same as the name of the property itself.

    **Should the method not be found, the object can do other things with the message. The only real difference that this method/message distinction makes is that the method associated with a message can be changed at runtime — dynamic binding.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
i want to parse a xhtml file and display in UITableView. what is the
Does anyone know how can I replace this 2 symbol below from the string

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.