In lack of more info I'm going to assume somethings about your implementation..
So I guess you have a delegate (which implements the NSXMLParserDelegate Protocol) for your NSXMLParser doing all the parsing.. Right?
So the delegate protocol specifies a method called:
- (void)parserDidEndDocument:(NSXMLParser *)parser
If you implement that in your delegate you will know when the document has been parsed. So now you need to tell your viewcontroller about this event. Basically there are two ways of doing this. Either you make a "hard" connection between the NSXMLParserDelegate and your viewcontroller. This is basically done by specifying a property for that particular viewcontroller and setting that property to point to the viewcontroller when you've allocated the NSXMLParserDelegate object.
And then you will be able to send a message to the "parent" in the parserDidEndDocument delegate method
- (void)parserDidEndDocument:(NSXMLParser *)parser{
[viewcontroller jobCompleted];
}
The other way is to take advantage of the delegate pattern and specifying a NSXMLParserDelegateDelegate Protocol (or named something else). That could look something like this:
@protocol NSXMLParserDelegateDelegate
-(void)parserDidEndDocument:(NSXMLParserDelegate *)parserDelegate;
@end
and then make a delegate property in your NSXMLParserDelegate
@interface NSXMLParserDelegate : NSObject<NSXMLParserDelegate>{
id<NSXMLParserDelegateDelegate> _delegate;
}
@property (assign) id<NSXMLParserDelegateDelegate> _delegate;
@end
remember to synthesize it in the .m file.
The latter way of doing it will give you a more lose connection thus making it easier to move the thing around.
Hope it helped.. Else let me know... And if I'm totally wrong here guys - let me know =)