我需要在加载时在
有解决方案吗?谢谢。
UIAlertView
中使用UIActivityIndicatorView
。但是,当我在iOS 7中添加UIActivityIndicatorView not displaying in UIAlertView - iOS7时,UIActivityIndicatorView
没有显示出来。这在iOS 6和更低版本中运行良好。以下是我的代码。有解决方案吗?谢谢。
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];