Activity indicator

Discussion in 'iOS Programming' started by joshsroka, Mar 15, 2009.

  1. joshsroka macrumors member

    Joined:
    Oct 2, 2008
    #1
    Why does my ball not stop spinning?

    - (void)viewDidLoad {

    NSString *urlAddress = @"http://reader.mac.com/mobile/v1/http%3A%2F%2Fwww.wjfk.com%2Fpages%2Fpodcast%2F119567.rss";

    //Create a URL object.
    NSURL *url = [NSURL URLWithString:urlAddress];

    //URL Requst Object
    NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];

    //Load the request in the UIWebView.
    [webView loadRequest:requestObj];

    UIApplication* app = [UIApplication sharedApplication];
    app.networkActivityIndicatorVisible = YES;
    }

    - (void)webViewDidFinishLoad:(UIWebView*)webView {
    UIApplication* app = [UIApplication sharedApplication];
    app.networkActivityIndicatorVisible = NO;
    }
     
  2. fishkorp macrumors 68020

    fishkorp

    Joined:
    Apr 10, 2006
    Location:
    Ellicott City, MD
    #2
    Do you have that setup as the UIWebViewDelegate? Otherwise that method will never get called.
     

Share This Page