Where to put network intensive code
So I have an app that pulls in an RSS feed and parses it. It then displays this in the second tab of a UITabView controller. Trouble is, it takes about ~5-20 secs to pull the RSS and when I've put the code in viewDidLoad, viewDidAppear, and awakeFromNib it has either waited to pull the RSS while the app launched, or before the new view would appear in the tab bar.
What I would like to happen is have the app launch and it start pulling the RSS but not at the expense of startup time, or at least have it start when the tab is selected (but again, the view needs to appear, it can't lock up while it pulls the rss). Is there some method I should be placing it in besides these, or some other way. Thank you!
|