Try setting the color to white:
[av setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleWhite];
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?
Solution
Try setting the color to white:
[av setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleWhite];