我通过将进度视图和标签作为子视图添加到警报视图来显示进度视图和标签,这在 IOS6 上运行良好,我在 IOS7 上测试了相同的东西,并且进度视图和标签没有显示。下面是我的代码。需要进行哪些更改才能使其在 ios7 上运行?
alert = [[UIAlertView alloc] initWithTitle:@"Please Wait..Downloading reports..." message:nil delegate:self cancelButtonTitle:nil otherButtonTitles: nil] ;
alert.frame=CGRectMake(50, 50, 280, 40);
prgView = [[UIProgressView alloc]initWithProgressViewStyle:UIProgressViewStyleBar];
prgView.frame = CGRectMake(10, 60, 265, 20);
prgView.hidden=NO;
[alert addSubview:prgView];
statusLabel = [[UILabel alloc] init];
statusLabel.backgroundColor = [UIColor clearColor];
statusLabel.textColor = [UIColor whiteColor];
statusLabel.font = [UIFont fontWithName:@"AmericanTypewriter-Condensed" size:18.0];
statusLabel.frame = CGRectMake(120, 80, 80, 20);
[alert addSubview:statusLabel];
[alert show];