scourGINHO
scourGINHO

Reputation: 699

Unknown type name 'XMLParser'; did you mean 'NSXMLParser'?

Why I get this error "Unknown type name 'XMLParser'; did you mean 'NSXMLParser'?" ? I have imported XMLParser.h, so I can't understand what the problem is.

#import <UIKit/UIKit.h>
#import "XMLParser.h"
#import "televisionList.h"
#import "ListingCell.h"

@interface TelevisionDetail : UIViewController <UITableViewDataSource, UITableViewDelegate>
{
    XMLParser *xmlParser;
}
@end

Upvotes: 1

Views: 351

Answers (1)

Dmitry Zhukov
Dmitry Zhukov

Reputation: 1816

Seems like Xcode bug, but also it's a good practice to avoid unnecessary import in .h file.

So try to add this before @interface..:

@class XMLParser;

And add #import "XMLParser.h" in your .m file.

Upvotes: 2

Related Questions