How I add an UIActivityIndicatorView
before the viewload. I am fetching data from a web server.
Here is my code
spinner=[[UIActivityIndicatorView alloc]initWithFrame:CGRectMake(225, 115, 30, 30)];
[spinner setBackgroundColor:[UIColor clearColor]];
[spinner setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleGray];
[self.view addSubview:spinner];
[spinner startAnimating];
objCountryPreferences=[[CountryPreferences alloc]init];
objLanguagePreference=[[LanguagePreference alloc]init];
objMobilePrefixParser=[[MobilePrefixParser alloc]init];
//this is calling different web services
[objMobilePrefixParser getMobilePrefix];
[objLanguagePreference languagePreference];
[objCountryPreferences getCountryIdArr];