How to override properties
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