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

  • Home
  • SEARCH
  • 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 8356553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:13:44+00:00 2026-06-09T10:13:44+00:00

I noticed that for a property with a custom getter method @interface MyClass :

  • 0

I noticed that for a property with a custom getter method

@interface MyClass : NSObject
@property (nonatomic,getter=isActive) BOOL active;
@end

both

BOOL b = myObj.isActive

and

BOOL b = myObj.active

can be used to get the value. In both cases the isActive method is called.

  • Is there any difference between these two ways of getting the property value?
  • What is the “recommended” way?
  • 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-09T10:13:45+00:00Added an answer on June 9, 2026 at 10:13 am

    There is no difference between the two. You use a custom name when you want to break the established convention of XYZ+setXYZ in cases when the alternative names make more sense from the point of view of English grammar. For example,

    if ([myRobot isActive]) {
        ....
    }
    

    reads better than

    if ([myRobot active]) {
        ....
    }
    

    You could have declared your property as isActive, but then your setter would be setIsActive, which sounds slightly worse than setActive.

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

Sidebar

Related Questions

I encountered a problem. I noticed that a Property (say MyProp ) in my
I noticed the WinForms RichTextBox has a ZoomFactor property that I assume is exactly
I have a custom control in an aspx page that has a property named
I've noticed that custom NSManagedObject subclass instances do not respond to their accessors when
I noticed something in C# when dealing with custom objects that I found to
Yesterday I updated to firefox 13 and I notice that this property is not
I noticed that the <td align=center> code works differently on the MediaWiki.org page and
I noticed that there are two sets of Hadoop configuration parameters: one with mapred.*
I noticed that Clojure (1.4) seems to be happy to consider vectors equal to
I noticed that IE 9 does not support application cache. How can I use

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.