Synthesize property errors when compiling an iPhone application

I am following tutotial on the Apple website to create your first iPhone application, as this is the field I would like to participate in.

I finished the application, but then decided to combine it with another application. (One simply changes the image when pressed, one displays text from the text field when the button is pressed, so itโ€™s not too difficult to combine)

I successfully copied most of the code, but somewhere I made a mistake, since I get an error 6 times

@synthesize property must be in implementation context

for 6 things that I synthesize.

It seems to me that I copied everything and I checked all the instances of the synthesized elements, so they definitely exist, so I donโ€™t know why this is happening.

When I put lines that cause errors in cointext (e.g. @implemtation and @end), I get

no declaration of property 'X' found in the interface

x - , .

? , Interface Builder .

+3
2

@interface CustomAlertViewController : UIViewController {
    UIView  *alertView;
    UILabel *label;
}
@property (nonatomic, retain) IBOutlet UIView *alertView; <--- Property
@property (nonatomic, retain) IBOutlet UILabel *label;    <--- Property
0

@synthesize

, @implementation @end. .m

+1

Source: https://habr.com/ru/post/1767590/


All Articles