iphone - Is it possible to use NSThreads for parsing four different URLs using NSXMLParser -


if try parse single http url, done quickly. if have parse 4 different urls @ application launch, feasible use nsthreads , nsoperation queue. can 1 explain small example if possible?

sagos

write nsoperation subclass, , in main method, this:

- (void)main {     nsxmlparser *parser = [[[nsxmlparser alloc] initwithcontentsofurl:myurl_] autorelease];     [parser setdelegate:self];     [parser parse]; } 

implement parser delegate methods on nsoperation subclass. instantiate subclasses, assign them urls, , add them operation queue. use notifications or delegates know when finished.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -