Tutorial :No declaration of property error in Objective-C


I wonder what is wrong with this?

.h file:

typedef enum {      N4LoupeTypeRound,      N4LoupeTypeRectangle,  } N4LoupeType;    @interface N4LoupeLayer : CALayer {      N4LoupeType _type;      UIView *_originalView;      CALayer *_mask;      CALayer *_overlay;  }    @property (nonatomic) N4LoupeType type;  @property (nonatomic, assign) UIView *originalView;    @end  

.m file:

#import "N4LoupeLayer.h"    @interface N4LoupeLayer (Privates)    @property (nonatomic, retain) CALayer *mask;  @property (nonatomic, retain) CALayer *overlay;    @end    @implementation N4LoupeLayer    @synthesize type = _type;  @synthesize originalView = _originalView;  @synthesize mask = _mask;  @synthesize overlay = _overlay; // ******I GET THE ERROR HERE*********     @end  

No declaration of property 'overlay' found in the interface in N4LoupeLayer.m


You defined the properties for the Privatescategory, but you are trying to synthesize them in N4LoupeLayer.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »