我想向委托方法添加一个参数(来自 NSXMLParserDelegate)
这是迄今为止的方法:
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string{
// save the characters for the current item...
if ([string isEqual: @"off"]) {
myObject.isON = NO; //doesn't know what is myObject
}
我想要的是 :
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string:(MyObject*)anObject{
// save the characters for the current item...
if ([string isEqual: @"off"]) {
anObject.isON = NO;
}
谢谢