作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想在消息中添加一个事件指示器,即 uiAlert 消息,我基本上尝试了互联网上的所有内容,但没有任何效果,我只需要 uialertview,这是我的代码
UIAlertView *waitAlert = [[UIAlertView alloc] initWithTitle:@"Please Wait...." message:@"\n\n" delegate:self cancelButtonTitle:nil otherButtonTitles: nil];
UIActivityIndicatorView *progress= [[UIActivityIndicatorView alloc] initWithFrame: CGRectMake(125, 50, 30, 30)];
progress.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
progress.color = [UIColor blackColor];
[waitAlert addSubview: progress];
[progress startAnimating];
[waitAlert show];
这就是我最终得到的
我错过了什么!?
最佳答案
在 iOS 7 中你不能在 UIAlertView 上添加 subview ,直到 iOS 6.1 才有可能。所以 MBProgressHud 是最好和简单的解决方案
关于ios - 将 UIActivityIndicatorView 添加到 UIAlertView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23079967/
我是一名优秀的程序员,十分优秀!