来自*.h的@property不会显示在*.m中

cac*_*acá 2 properties objective-c ios

我对应用程序编程很感兴趣,因此我开始使用Todd Moore的书为iphone编写应用程序.我想在他的书中重新创建第一个例子.因此我需要在我的ViewController.m中的一些属性,我在ViewController.h中通过拖动功能"New Referencing Outlet"声明:

@property (retain, nonatomic) IBOutlet UILabel *label;
@property (retain, nonatomic) IBOutlet UITextField *antwort;
- (IBAction)antworte:(id)sender;
Run Code Online (Sandbox Code Playgroud)

我的问题是ViewController.m中没有显示.你能帮助我吗?最好的祝福!

Jes*_*sak 5

它实际上不会出现在您的.m文件中,但您仍然可以从那里使用它们.(如果这本书来自几年前,它可能会显示以前代码放在.m文件中的代码,但不再需要该代码.)