I have a question about the following error "Unknown type name VistaDereIzq
"
I have a view called VistaDereIzq
. And I do the following to add that view in this view.
#import <UIKit/UIKit.h>
#import <MessageUI/MessageUI.h>
#import "VistaDereIzq.h"
#import "ViewController.h"
@interface VistaNavegador : UIViewController <UIWebViewDelegate>
{
VistaDereIzq *VistaIzq2; <----- "Unknown type name VistaDereIzq"
}
@end
You probably have a circular dependency/include. Use a forward declaration (@class MONClass;
) rather than #import
ing the header. Since there is no physical dependence, you should be using a forward declaration in the first place (i.e. for much faster builds).
So instead of:
#import "VistaDereIzq.h"
use:
@class VistaDereIzq;
and then add your #import
to an .m
file as needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With