0

在头文件中,我声明了以下对象:

@interface EmpresasTableViewController : UITableViewController{
    NSArray *categorias;
    NSMutableData *data;
    NSDictionary *categoriaDescription;
}

在实现文件中,我合成了 NSDictionary :

@synthesize categoriaDescription;

在另一个头文件中,我也在做同样的事情:

@interface DetalleEmpresaViewController : UIViewController{
    NSArray *categorias;
    NSMutableData *data;
    NSDictionary *detalleDescription;
}

但是在实现文件中,综合代码行被标记为错误:

@synthesize detalleDescription;;

错误是:

Property implementation must have its declaration in interface 'DetalleEmpresaViewController'

我不明白为什么它在第一个文件中而不是在第二个文件中......

4

1 回答 1

1

您需要在.h文件中声明属性。

@property (nonatomic, strong) NSDictionary *detalleDescription;
于 2014-02-28T06:31:25.687 回答