My app freezes whenever I parse an XML feed.
I have tried calling this instead:
[NSThread detachNewThreadSelector:@selector(parseXML) toTarget:self withObject:nil];
which calls:
-(void) parseXML {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[self parseXMLFileAtURL:path];
[pool drain];
}
but my app has become quite unstable as a result…the iPhone Simulator just crashed with no error warning.
Rather than calling :
you should call :
Your UI is freezing because you are doing lengthy operations in UI Thread.