dispute
dispute

Reputation: 1454

is subclass re-synthesized variable the same as its superclass

I learned that give two class subA and A, when subclass access superclass property directly(without super call) need some workaround, below is one of them I found

@interface A : NSObject
@property (nonatomic, strong) NSString * name;
@end

@interface subA : A
@end

@implementation subA
@synthesize name = _name;
- (void)setName(NSString *)name {
    _name = name;
}
@end

the question is that @synthesize in the subA looks as if it re-synthesized a new iVar, is that true?

Upvotes: 0

Views: 35

Answers (0)

Related Questions