Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bobbypotluck

macrumors member
Original poster
Feb 18, 2009
70
0
I'm trying to add an activity indicator over a uiwebview in order to show that the page is loading. The UIwebview is loading a googleMap URL which takes a while to load. I also need to make the network indicator show that the page is loading as well.

Currently i have the activity indicator view declared in my appDelegate and have it hidden. I would like to use the webViewDidFinishLoading method within each viewController file. My understanding is that i should use this method to change indicator.hidden to TRUE or FALSE using if else statements. I thought all i would have to do is import the appDelegate file into each viewController file but every time i get the error that my indicator has not been declared.

Should i declare a new activity indicator in each viewController file? I'm having trouble making it show up that way. The only way i can get the activity indicator to show up at all is to declare it in my AppDelegate file, but it does not go away after the page loads.

I'm using a tab based app to switch views in case that helps. What's the best strategy for this? I'm not having much luck with webViewDidFinishLoading. Is it possible to declare this method in the AppDelegate instead of the viewController files? Any help or links to examples is much appreciated to get me started in the right direction.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.