UIActivityIndicatorView not showing in UIAlertView - iOS7

I need UIActivityIndicatorViewto UIAlertViewat boot. But it UIActivityIndicatorViewdoesnโ€™t appear when I add it with UIActivityIndicatorView not displaying in UIAlertView - iOS7 in iOS 7 . And it works well in iOS 6 and the 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];
+4
source share
2 answers

Apple addSubview UIAlertView. , - AlertView, : .

, ,

UIAlertView addSubview iOS7

+4

UIAlertView

documentation

- UIView, / UIAlertView .

0

All Articles