Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7780795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:01:13+00:00 2026-06-01T19:01:13+00:00

I am sending a string to a web server from my iphone application. I

  • 0

I am sending a string to a web server from my iphone application. I am using UIProgressView to show the progress of request. Following is my code:

  -(IBAction)sendToServer:(id)sender{

NSString *url = [RequestUtil getWebURL];
NSString *jsonString = [JSONUtil jsonRunData: self.runDetails];
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:url]]; 
[request setTimeOutSeconds:60];
[request setPostValue:jsonString forKey:@"jsondata"];
[request setUploadProgressDelegate:myProgressIndicator];
[request setDelegate:self]; 
[request startAsynchronous];
progressTimer = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(increaseAmount) userInfo:nil repeats:YES];
 }

 - (void)requestFailed:(ASIHTTPRequest *)request{
   self.myProgressIndicator.hidden = TRUE;
 //    alert
 }

 - (void)requestFinished:(ASIHTTPRequest *)request { 
   myProgressIndicator.progress = 1.0;
    // alert
 }

 -(void) increaseAmount{
progressNumber = progressNumber+0.2;
if(progressNumber <= 0.9){
    myProgressIndicator.progress = progressNumber;
}else {
    [progressTimer invalidate];
    progressNumber = 0.0;
}
 }

when i press send to server button, sendToServer is called. and it shows UIProgressView. Problem is that when progress view is showed it fills its progress bar quickly and then start again and acts on timer. Why progress view fills progress bar before it starts acting on behalf of timer?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T19:01:15+00:00Added an answer on June 1, 2026 at 7:01 pm

    I know this is an old question and you’ve probably moved on, but I suspect that the source of the problem is the fact that the progress property is animated by default. Call [myProgressIndicator setProgress:0.0 animated:NO] prior to showing the progress view.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm sending the following JSON string to my server. ( { id = 1;
I'm sending an SMS from my web application which is build in ASP.NET C#
I biuld web service with ZSI from example but after sending request I catch
Using the obsolete System.Web.Mail sending email works fine, here's the code snippet: Public Shared
My client is a web browser, and sending request to myserver using this url:
I am trying to benchmark some code. I am sending a String msg over
A server is sending me dates in the form 2012-04-30T10:00:00 (as a string) which
sending mail along with embedded image using asp.net I have already used following but
am trying to read web page from java code and its fine for general
I got this from a Soap client request: Exception: SoapFault exception: [soap:Client] Server was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.