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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:18:37+00:00 2026-06-10T10:18:37+00:00

I encountered a problem with properties when referring to the getter and setter from

  • 0

I encountered a problem with properties when referring to the getter and setter from a sub class:

In the base class, I have a property called listItems with a custom setter:

@interface BaseList{
    NSArray *_listItems;
}
@property (nonatomic, retain) NSArray *listItems;
@end

@implementation BaseList
@synthesize listItems = _listItems;

-(void)setListItems:(NSArray *)listItems
{
    [_listItems release];
    _listItems = [listItems retain];
    //... some logic
}
@end

The sub class has a property with a more specific name for listItems, e.g. addresses:

@interface AddressList
@property (nonatomic, retain, getter = listItems, setter = setListItems:) NSArray *addresses;
@end

The addresses property is not synthesized in the implmentation of AddressList, because it should use the getter and setter of the super’s listItems property. However, after setting:

self.addresses = [NSArray array];

the property is still nil. Funny thing is, I believe this worked well with earlier versions of Xcode. I’m currently using Xcode 4.4 (4.4.1) and I’m not sure if I’m simply doing it wrong, or if some property related stuff changed in this context. I’d be very grateful if someone can tell me how to do it correctly.

  • 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-10T10:18:38+00:00Added an answer on June 10, 2026 at 10:18 am

    Apple changed the way accessors are synthesized in Xcode 4.4. You don’t need to declare an ivar anymore and you don’t have to synthesize the accessors. You still can of course declare your own ivars and synthesizors, but since you don’t, the compiler does it for you.

    You can suppress this by using @dynamic instead.

    There is a warning that you can turn on in the Build Settings called Implicit Synthesized Properties. Turn that on to temporarily get warnings about all the accessors that are synthesized for you.

    Starting in Xcode 4.4, the Apple LLVM Compiler will implicitly
    synthesize properties that are not explicitly synthesized using
    @synthesize. This warning warns about such implicit behavior, even
    though the property is still synthesized. This is essentially a
    backwards compatability warning, or for those who wish to continue to
    explicitly use @synthesize.

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

Sidebar

Related Questions

I have encountered a problem with creating a thumbnail from an uploaded image file,
I recently updated from mathematica 7.0 to 8.0, and have now encountered problem with
I have encountered a problem while setting up the font properties file to train
So I encountered a problem. I have this object called myTree . And that
I encountered a problem when I tried to use java from matlab. I read
I encountered a problem. I noticed that a Property (say MyProp ) in my
I encountered a problem after switching from server-side JavaScript to CoffeeScript in a Node.js
I've recently encountered a problem designing a web page. I needed to have rounded
Suppose I've a custom class (any class), with its methods and properties: public class
Here's an odd problem I encountered using Subversion: when merging from a development branch

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.