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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:37:08+00:00 2026-05-10T14:37:08+00:00

You can use a standard dot notation or a method call in Objective-C to

  • 0

You can use a standard dot notation or a method call in Objective-C to access a property of an object in Objective-C.

myObject.property = YES; 

or

[myObject setProperty:YES]; 

Is there a difference in performance (in terms of accessing the property)? Is it just a matter of preference in terms of coding style?

  • 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. 2026-05-10T14:37:08+00:00Added an answer on May 10, 2026 at 2:37 pm

    Dot notation for property access in Objective-C is a message send, just as bracket notation. That is, given this:

    @interface Foo : NSObject @property BOOL bar; @end  Foo *foo = [[Foo alloc] init]; foo.bar = YES; [foo setBar:YES]; 

    The last two lines will compile exactly the same. The only thing that changes this is if a property has a getter and/or setter attribute specified; however, all it does is change what message gets sent, not whether a message is sent:

    @interface MyView : NSView @property(getter=isEmpty) BOOL empty; @end  if ([someView isEmpty]) { /* ... */ } if (someView.empty) { /* ... */ } 

    Both of the last two lines will compile identically.

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

Sidebar

Ask A Question

Stats

  • Questions 89k
  • Answers 89k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can open a new thread and have it do… May 11, 2026 at 5:50 pm
  • Editorial Team
    Editorial Team added an answer This is just a theory, but after I recently upgraded… May 11, 2026 at 5:50 pm
  • Editorial Team
    Editorial Team added an answer You might find this article to be of interest as… May 11, 2026 at 5:50 pm

Related Questions

I know that you can use java.util.Properties to read Java properties files. See: Java
First, context: I'm trying to create a command-line-based tool (Linux) that requires login. Accounts
Does ASP.NET MVC provide a standard validator functionality or do you have to create
Why would someone use numeric(12, 0) datatype for a simple integer ID column? If

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.