문제

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?

도움이 되었습니까?

해결책

Try setting the color to white:

[av setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleWhite];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top