ios - Property Setter and Getter Not able to overwrite -


so have objective-c header file animal class:

#import <foundation/foundation.h>  @interface animal : nsobject  @property nsstring *name; @property nsstring *favoritefood; @property nsstring *sound;  @property float weight;  -(instancetype) initwithname:(nsstring *) defaultname;  -(void) getinfo;  -(float) getweightinkg: (float) weightinlbs;  -(nsstring *) talktome: (nsstring *) myname;  -(int) getsum: (int) num1    nextnumber: (int) num2;  @end 

and reason when try overwrite setter or getter methods @property nsstring *name in implementation file of animal class, not able , gives me warning saying "writable atomic property 'name' cannot pair synthesized getter user defined setter". doing wrong here? because thought @property creates ivar , setter , getter methods automatically can override in implementation file. can please me issue. thank in advance!

define properties as:

@property (nonatomic) nsstring *name; @property (nonatomic) nsstring *favoritefood; @property (nonatomic) nsstring *sound; 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -