4

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?

1
  • Same stuff I had, same solution: stackoverflow.com/a/17493750/529543 I can't believe it is not an auto config for that progress something.. Commented Aug 6, 2013 at 19:52

1 Answer 1

4

Try setting the color to white:

[av setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleWhite];
Sign up to request clarification or add additional context in comments.

2 Comments

@matheszabi Remember the check!
also there is a case when is not visible: the indicator is small and centered, if there is a popup message to ui from somewhere, that will hide it!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.