在IOS7之前,我们更改系统的UIAlertView,以实现自己想要的效果:

#pragma mark -- UIAlertViewDelegate

//实现代理增加网络指示器
- (void)willPresentAlertView:(UIAlertView *)alertView{
    indicator = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
    indicator.frame = CGRectMake(110, 20, 50, 50);
    
    [alertView addSubview:indicator];
    [indicator startAnimating];
    [indicator release];
}

在iOS7上不允许我们更改系统的UIAlertView,自己添加的控件将不再显示了。

解决方法:可以采用UIWindow的方式实现,网上有很多具体的做法,就不再描述了。

 

 

相关文章:

  • 2021-11-17
  • 2021-12-08
  • 2022-01-16
  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2021-08-09
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-06
  • 2021-10-17
  • 2021-10-15
相关资源
相似解决方案