//spinner declared in .h file UIActivityIndicatorView *aSpinner;
Add the property to the header file as well:
@property (nonatomic, retain) UIActivityIndicatorView *aSpinner;
Remember to synthesize the .m file!
//throw up spinner from submit btn we created UIActivityIndicatorView *tempSpinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; self.aSpinner = tempSpinner; [tempSpinner release]; [self.view addSubview:self.aSpinner]; [self.aSpinner startAnimating]; //send blocking request [request startSynchronous]; //get rid of spinner when finished delegate is fire - (void)requestFinished:(ASIHTTPRequest *)request { NSLog(@"REQUEST FINISHED"); [self.aSpinner stopAnimating]; }
In your dealloc method you write: [aSpinner release]; This, however, is only one of many approaches.
source share