【发布时间】:2013-06-15 22:25:25
【问题描述】:
我是 Objective-C 的新手,我很菜鸟。
我正在尝试将SecondViewController 中的UITextField 中的文本传递给FirstViewController。
我现在拥有的是:
(SecondViewController.h)
@interface SecondViewController : UIViewController <UITextFieldDelegate>
@property (weak, nonatomic) IBOutlet UITextField *PrimaryPhone;
@end
(FirstViewController.m)
#import "SecondViewController.h"
@interface FirstViewController ()
@end
@implementation FirstViewController
@synthesize PrimaryPhone;
.m 文件中包含其他默认项。
但它在哪里说:
@synthesize PrimaryPhone;
Xcode 给了我标题中的错误。 (属性实现必须在接口“FirstViewController”中声明)
【问题讨论】:
标签: objective-c properties declaration synthesize