Frage

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...

War es hilfreich?

Lösung

You need to declare property in .h file.

@property (nonatomic, strong) NSDictionary *detalleDescription;
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top