可能重复:
Objective C: “Property implementation must have its declaration in interface”“物权实现必须有它的接口声明”错误的iOS
我在另一个的viewController声明的一个全球性的viewController的对象。
我敢肯定,
1 - 我已经导入了必要的viewController类
2 - 我有威滕该对象的@属性(非原子,保留)在.h文件中
3 - 我有合成的同一对象.m文件
但是还是我得到的错误,说“物权实现必须有其declaratio n在界面“。我在做什么错在这里....我心中已经被抓我对这个问题的头....
.h文件中
#import "viewController1.h"
@interface viewController2 :UIViewController<UITableViewDelegate,UITableViewDataSource>{
viewController2 *vc2;
}
@property(nonatomic,retain)viewController2 *vc2;
-(void)someMethod;
@end
.m文件
#import "viewController2.h"
@implementation viewController2
@synthesize vc2;
@end
你可以发布你的代码吗? – CarlJ 2012-01-03 12:00:40
也许向我们展示一些代码/截图? – Guillaume 2012-01-03 12:01:04
你可以发布声明属性的类的头文件吗?如果我们能看到一些代码,我们将能够提供帮助。 – Jasarien 2012-01-03 12:01:41