How to add "loading" screen for UIWebView app each time new page is being loaded?
        Posted  
        
            by AragornSG
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by AragornSG
        
        
        
        Published on 2010-05-15T15:05:58Z
        Indexed on 
            2010/05/15
            15:14 UTC
        
        
        Read the original article
        Hit count: 256
        
I have an app that works with tabs and webview. I already have it setup to refresh the page assigned to a tab each time the item on tabbar is selected. My problem now is that it takes some time to load the page and it's impossible to say if the page being displayed is the old or refreshed one.
What I want to do is add a "loading" screen (a simple image) which will be displayed until the refreshed page is loaded. Here is the function I run on each tab tap:
- (void) goToPage:(NSString *)sid
{
    NSString *newURL = [NSString stringWithFormat:@"%@/mykingdom.php?sid=%@", appURL, sid];
    [secondView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:newURL]]];
}
Thanks!
© Stack Overflow or respective owner