This question already has an answer here:
- Alert view is showing white rectangle in iOS7 3 answers
I need to UIActivityIndicatorView
in UIAlertView
when loading. But UIActivityIndicatorView
is not displaying when I add this with UIActivityIndicatorView not displaying in UIAlertView - iOS7 in iOS 7. And this is working good in iOS 6 & lowest versions. Below is my code.
Is there any solution ? . thanks.
UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:nil message:@"\n\n\n\nloading.." delegate:self cancelButtonTitle:@"ok" otherButtonTitles:nil];
[alertView show];
UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
activityIndicator.frame= CGRectMake(50, 10, 37, 37);
activityIndicator.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin;
[alertView addSubview:activityIndicator];
[activityIndicator startAnimating];