Reputation: 57
After adding @interface MedicalRecordViewController : UIViewController<UITextFieldDelegate,NSXMLParserDelegate,UITextViewDelegate>
my appilcation still shows the warning in the
NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithData:webData];
XmlParser *parser = [[XmlParser alloc] initXMLParser];
if (serviceRequest==1) {
[parser setPageRequest:2];
}else if (serviceRequest==2) {
[parser setPageRequest:5];
}else if (serviceRequest==3) {
[parser setPageRequest:4];
}else if (serviceRequest==4) {
[parser setPageRequest:4];
}
[xmlParser setDelegate:parser]; // warning here
BOOL success = [xmlParser parse];
warning message
Sending 'XmlParser *' to parameter of incompatible type 'id<NSXMLParserDelegate>'
Whats wrong in my code?Should i want to add any other things?
Upvotes: 0
Views: 225
Reputation:
The XmlParser
class doesn't implement the NSXMLParserDelegate
protocol.
Upvotes: 3