我试图弄清楚如何在 ios7 上创建带有进度指示器的对话框。
在我使用的旧(适用于 ios6)代码中:
// ... 初始化警报视图 ...
indicator = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(125, 55 + hlines, 30, 30)];
int height = self.frame.size.height + indicator.frame.size.height - 20;
[alert addSubview:indicator];
indicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
[indicator startAnimating];
[alert setFrame:CGRectMake(self.frame.origin.x, self.frame.origin.y, self.frame.size.width, height)];
任何想法?