iPhone SDK : Spinner not Working

Posted by iPhone Developer on Stack Overflow See other posts from Stack Overflow or by iPhone Developer
Published on 2011-01-03T17:23:43Z Indexed on 2011/01/03 17:54 UTC
Read the original article Hit count: 216

Filed under:

I would like to use a spinner. But, this code below does not display a spinner and I'm not sure why. How to make this work? BTW, It is being called from a submit button I created.

    //spinner declared in .h file
    UIActivityIndicatorView   *aSpinner; 

    //throw up spinner from submit btn we created
    aSpinner = [[UIActivityIndicatorView alloc]  initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];

    [self.view addSubview:aSpinner]; 
    [aSpinner release]; 
    [aSpinner startAnimating]; 

    //send blocking request 
    [request startSynchronous];

//get rid of spinner when finished delegate is fired - (void)requestFinished:(ASIHTTPRequest *)request { NSLog(@"REQUEST FINISHED"); [aSpinner stopAnimating]; //[aSpinner release]; }

© Stack Overflow or respective owner

Related posts about iphone-sdk-3.0