Is NSXMLParser\'s parse method asynchronous?
in other words if i have an NSXMLParse object and I call [someParseObject parse]
from the main thread, will it
you can do like this NSXMLParser as asynchronous
dispatch_async( dispatch_get_global_queue(0, 0), ^{
NSString * dovizUrl=@"http://www.tcmb.gov.tr/kurlar/today.xml";
NSURL *url = [NSURL URLWithString:dovizUrl];
NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url];
xmlParser.delegate = self;
// call the result handler block on the main queue (i.e. main thread)
dispatch_async( dispatch_get_main_queue(), ^{
// running synchronously on the main thread now -- call the handler
[xmlParser parse];
});
});