デリゲートメソッドに引数を追加したい(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;
}
ありがとうございました