Question

I have the following code part:

UIActivityIndicatorView  *av;
-(void) createAndShowLoadingIndicator
{
    av = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray] ;
    av.frame=CGRectMake(10, 10, 250, 250);
    //av.center = self.view.center;
    av.tag  = 1000;
    [self.view addSubview:av];
    [self.view bringSubviewToFront:av];
    [av startAnimating];
}

In MyViewController.m, I am calling with [self createAndShowLoadingIndicator]; and wondering why isn't visible!? I can't see any mistakes. What is the problem, how to make it visible?

Was it helpful?

Solution

Try setting the color to white:

[av setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleWhite];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top