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 495339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:35:02+00:00 2026-05-13T05:35:02+00:00

i am developing an application where i am loading a urlrequest in the UIWebView

  • 0

i am developing an application where i am loading a urlrequest in the UIWebView and it happened successfully.

But now i am trying to display a UIProgressView when the loading is in progress( starting from 0.0 to 1.0), which is changed dynamically with the progress of loading.

How can i do that?

  • 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-05-13T05:35:02+00:00Added an answer on May 13, 2026 at 5:35 am

    UIWebView doesn’t give you any progress information in the normal mode. What you need to do is first fetch your data asynchronously using an NSURLConnection.
    When the NSURLConnection delegate method connection:didReceiveResponse, you’re going to take the number you get from expectedContentLength and use that as your max value. Then, inside the delegate method connection:didReceiveData, you’re going to use the length property of the NSData instance to tell you how far along you are, so your progress fraction will be length / maxLength , normalized to between 0.0 and 1.0.

    Finally, you’re going to init the webview with data instead of a URL (in your connection:didFinishLoading delegate method).

    Two caveats:

    1. It is possible that the expectedContentLength property of the NSURLResponse is going to be -1 (NSURLReponseUnknownLength constant). In that case, I would suggest throwing up a standard UIActivityIndicator that you shut off inside connection:didFinishLoading.

    2. Make sure that any time you manipulate a visible control from one of the NSURLConnection delegate methods, you do so by calling performSelectorOnMainThread: – otherwise you’ll start getting the dreaded EXC_BAD_ACCESS errors.

    Using this technique, you can show a progress bar when you know how much data you’re supposed to get, and a spinner when you don’t know.

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

Sidebar

Related Questions

I am developing an application in Android 2.1 which requires loading of views dyamically
I am developing an iPhone application in which I am loading lots of data
I'm developing a spring application that uses large MySQL tables. When loading large tables,
I am developing application which is having Gujarati font in text-view but my problem
I am developing one application, it contains purchasing of products. I am loading the
I'm developing an iPhone application that will access XML files (or something similar) from
I am developing a windows application using c#. I am loading a file (html,
I am developing an application where it should get data from my server with
I am developing an application using asp.net 2.0 (C#), in which I am trying
I'm developing a Desktop Application in java(jdk 1.6) with swing but having a problem

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.