While running an application in iOS, when we click on any button (UIButton), a default loading spinner spins in the center of the screen till the action is performed. However, I dont want that loading spinner to pop up, instead I want a custom indicator to spin at another position. I am using UIActivityIndicator here and the custom indicator is working fine at its position. But the default spinner in the center is still coming along on the click. Please suggest the correct way so that the default loading spinner is hidden or does not pop up on the button click.
UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc]
initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
indicator.frame= CGRectMake(textView.frame.size.width+30,
containerView.frame.size.height-45,40,40);
indicator.autoresizingMask=UIViewAutoresizingFlexibleTopMargin |
UIViewAutoresizingFlexibleRightMargin;
[containerView addSubview:indicator];
indicator.backgroundColor = [UIColor clearColor];
[indicator startAnimating];
.
.
.
After button action performed..
[indicator stopAnimating];