• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to override properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to override properties


  • Subject: How to override properties
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Fri, 02 Oct 2015 11:28:25 +0700

I inherited some code with:

@interface BaseThing : NSObject <NSCopying>

@property (nonatomic) SomeDataClass *stuff;

@end


@interface SubThing : BaseThing

@property (nonatomic) SubDataClass* stuff;	//	SubDataClass is a subclass of SomeDataClass

@end


@implementation SubThing

// nothing about stuff here

@end


Xcode 7.0 tells me:
warning: auto property synthesis will not synthesize property ‘stuff’; it will be implemented by its superclass, use @dynamic to acknowledge intention.

I don’t think that I want ’stuff’ to be implemented by its superclass. Rather I want it to be overridden. So I am not sure, whether @dynamic is the right thing to do.

How to make the compiler happy?

Gerriet.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: How to override properties
      • From: Graham Cox <email@hidden>
    • Re: How to override properties
      • From: Jens Alfke <email@hidden>
    • Re: How to override properties
      • From: Charles Srstka <email@hidden>
  • Prev by Date: Re: NSTableView - Detecting when user has finished scrolling
  • Next by Date: Re: How to override properties
  • Previous by thread: UIStackView Change Upon Device Orientation...
  • Next by thread: Re: How to override properties
  • Index(es):
    • Date
    • Thread