3
I want to display the activity after the click of a button. This button will update the app. I followed examples and documentation, but it doesn’t work...
- (void)viewDidLoad {
// .. snip
indicator = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
[self.view addSubview:indicator];
[indicator stopAnimating];
//indicator.hidden = TRUE;
//[indicator setHidden:YES];
}
-(IBAction)actAtualizar:(id)sender {
//[indicator setHidden:YES];
//indicator.hidden = FALSE;
[indicator startAnimating];
//[indicator setHidden:NO];
//[indicator stopAnimating];
//indicator.hidden = TRUE;
[self carregaDados];
NSLog(@"teste de atualizacao", nil);
}
-(void)carregaDados{
// ...
[indicator stopAnimating];
}
I got... my object was not related to the view and not to the Indicator,,... very cool your answer Valew
– FlipNovid