I am trying to add a UIActivityIndicator to my custom view (programmatically). I am using the following code. But I dont see anything on the screen. Any idea why ?
Thanks.
UIActivityIndicatorView *activityIndicator=[[[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(75, 395, 200, 200)] autorelease];
[activityIndicator setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleWhiteLarge];
activityIndicator.center=self.view.center;
[self.view addSubview:activityIndicator];
UIActivityIndicatorhas itshidesWhenStoppedproperty equal toYESby default – that is it is hidden if you do not start animating it. So to make it appear on the screen try one of the following (whichever is more suitable for you):hidesWhenStoppedproperty toNO-startAnimatingmethod)