In my iPhone app I am downloading some data from an FTP server. To show the action I am using UIActivityIndicator
. If I put UIProgressView
there in
You can display progress of progress bar with these line of code
-(void) connection:(NSURLConnection *) connection
didReceiveData:(NSData *) data {
if (file)
{
[file seekToEndOfFile];
progressView.progress = ((float)recievedData / (float) xpectedTotalSize);
}
[file writeData:data];
recievedData += data.length;
NSLog(@"Receiving Bytes: %d", recievedData);
}