• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: progress bar when creating file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: progress bar when creating file


  • Subject: Re: progress bar when creating file
  • From: j o a r <email@hidden>
  • Date: Mon, 7 Nov 2005 12:02:24 +0100


On 7 nov 2005, at 11.53, David Chan wrote:

I am sorry if this is an elementary issue but I am really clueless with
regards to the following matter. I would like to create a progress bar that
shows the progress of my 'file downloading process'.
By 'file downloading process' i mean the below process:
NSURL *theURL= [NSURL URLWithString: theString];
NSData *theData= [NSData dataWithContentsOfURL: theURL]; (1)
[fileManager createFileAtPath: theLocalPath contents: theData attributes:
nil]; (2)
I suspect code on the line (1) and or (2) might be the one which relate to
the progress bar but I am not sure which and how to relate it.
Please enlighten me on this matter. THanks a lot.

You need to use the more capable NSURLConnection / NSURLDownload classes to get hold of that type of functionality:


<http://developer.apple.com/documentation/Cocoa/Conceptual/ URLLoadingSystem/Tasks/UsingNSURLConnection.html#//apple_ref/doc/uid/ 20001836-170129>

I'm not sure if it would work for local file URLs though. I've only used it for HTTP.

j o a r


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: progress bar when creating file
      • From: David Chan <email@hidden>
References: 
 >progress bar when creating file (From: David Chan <email@hidden>)

  • Prev by Date: progress bar when creating file
  • Next by Date: IB wont instantiate a custom subclass.
  • Previous by thread: progress bar when creating file
  • Next by thread: Re: progress bar when creating file
  • Index(es):
    • Date
    • Thread