Question

In a header file I am declaring the following objects:

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

And in the implementation file, I synthesize the NSDictionary :

@synthesize categoriaDescription;

In another header file I am doing the same:

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

But in the implementation file, the synthesize code line is marked as error:

@synthesize detalleDescription;;

The error is:

Property implementation must have its declaration in interface 'DetalleEmpresaViewController'

I don't understand why is it right in the first file and not in the second file...

Was it helpful?

Solution

You need to declare property in .h file.

@property (nonatomic, strong) NSDictionary *detalleDescription;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top