Re: NSURL produces spinning beach ball - how to get rid?
Re: NSURL produces spinning beach ball - how to get rid?
- Subject: Re: NSURL produces spinning beach ball - how to get rid?
- From: "John C. Randolph" <email@hidden>
- Date: Mon, 10 Sep 2001 00:35:19 -0700
On Sunday, September 9, 2001, at 09:24 PM, Yuhui wrote:
Hi
I have a portion of code that uses NSURL to get a HTML file, e.g.
data = [NSMutableString stringWithContentsOfURL:[NSURL
URLWithString:@"http://www.apple.com/"]];
where data is, sensibly enough, a NSMutableString.
However, this approach produces the spinning beach ball mouse cursor
and the app seems to freeze up while retrieving the data. Is there a
way to work around this freeze?
Yes. Fetch the data in another thread.
-jcr
For every complex problem there is an answer that is clear, simple, and
wrong. -- H L Mencken