iPhone SDK : Spinner not Working
- by iPhone Developer
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];
}