Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MACloop

macrumors 6502
Original poster
May 18, 2009
393
0
Germany
Hello,
I have a tableView with clickable cells, letting the user navigate to another tableView. I use the code:
Code:
[self.navigationController pushViewController:theViewToBeShowed animated:YES];
to get the view to be displayed.
The view will be "created" everytime the user clicks on one of the cells. My problem is that I, in the viewDidLoad section, have an NSURLConnection and a XMLParser to get the info to be showed in the view and I only want to make this once or at least not everytime the view is displayed. Is it possible to only make it once?

Thanks in advance
MACloop
 
So I took a look at the example and one question has come up:

in the applicationDidLaunching method the following code is used:
Code:
 static NSString *feedURLString = @"http://earthquake.usgs.gov/eqcenter/catalogs/7day-M2.5.xml";
    NSURLRequest *earthquakeURLRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:feedURLString]];
    self.earthquakeFeedConnection = [[[NSURLConnection alloc] initWithRequest:earthquakeURLRequest delegate:self] autorelease];

If I would like to read data from say 5 or 10 different urls to fill into my different views - should I create seperate URLConnections for each and every of them? How should I do with the parsing? Do I optimally create parsers for all of my xml-files?

Thanks in advance,
MACloop
 
Any ideas?
Should I use the same structure as in the sample app and define different parsers for the different xml-files to be read? Should I serve the different viewcontrollers with data from the AppDelegate? How do I do this in an optimal way?
Thanks in advance!
MACloop
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.