添加@interface MedicalRecordViewController : UIViewController<UITextFieldDelegate,NSXMLParserDelegate,UITextViewDelegate>
我的应用程序后仍然显示警告
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];
警告信息
Sending 'XmlParser *' to parameter of incompatible type 'id<NSXMLParserDelegate>'
我的代码有什么问题吗?我应该添加任何其他内容吗?