iPhone SDK NSURL help

Joined
Mar 20, 2007
Messages
46
Reaction score
1
Points
8
I've got a fairly simple test app setup that has two views, one which draws a loading screen (simply a view with a label) which then loads and draws another view if it gets a response from an NSURL request.

My problem is that no views are drawn until the NSURL request completes, that is you never get to see the loading screen view at all, it simply shows a black screen for a little bit (while the URL responds) then jumps straight to the second view.

I've got the NSURL code embedded within the viewDidLoad method of the first view controller, was just wondering if anyone could give me some advice or point me to a tutorial on correctly getting the view to draw first, then wait for the NSURL response. Is there, for example, something within IB that will fire a method once the view exists and is drawn?
 
OP
U
Joined
Mar 20, 2007
Messages
46
Reaction score
1
Points
8
Figured out the best way was to use the NSURLConnection class as it's asynchronous.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top