skip to Main Content

I’m making an iPhone app that primarily focuses on loading webpages in UIWebviews. To show the user that the web page is currently loading, I’d like the screen to display a loading animation while the page loads, similar to the eBay app:

eBay app loading animation

How can I do this? Or, at least, what UIWebView methods could I use to tell me if the page is loading and that there is internet connection (so it’s not blindly trying to load forever).

2

Answers


  1. A simple way is just having it there until you need it and setting the alpha from 0 to 1.

    You would just need a gray thing (or whatever that thing is) and a activity indicator.

    You could also dig into the alerts section in apple but I think the above is easier.

    Login or Signup to reply.
  2. You can use MBProgressHUD, a open source component which will do a lot of the work for you.

    You’ll need to create a delegate of the UIWebView and respond to the didStartLoading and didFinishLoading messages (that’s when you’ll show an hide the progress view).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search