【发布时间】:2015-05-21 10:42:56
【问题描述】:
我正在尝试在 Xcode 6.3.2 上遵循来自 here 的公认解决方案,但指示器拒绝显示,或者由于某种原因我在 iPhone 6 plus 上看不到它。没有错误消息,带有标题等的警报显示和空白空间。
我做错了什么?按下应用上的连接按钮后会触发警报...
UIAlertView *alertWithInd;
UIActivityIndicatorView *alertInd;
alertWithInd = [[UIAlertView alloc] initWithTitle:@"Connecting..." message:@"Please wait...\n\n\n\n\n\n\n\n\n" delegate:self cancelButtonTitle:nil otherButtonTitles:nil];
alertInd = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
alertInd.frame=CGRectMake(0, 20, 270, 100);
[alertInd startAnimating];
[alertWithInd addSubview:alertInd];
[alertWithInd show];
【问题讨论】:
-
addSubviewforUIAlertView不再受支持。 -
试试 UIAlertViewController
-
@MOHAMMADISHAQ,这有什么帮助?他也无法在那里添加指标。
-
在带有 UIAlertViewController 的 Swift 中,我可以显示 UIPIcker,所以我也可以显示指示器吗?
-
可以添加子视图..
标签: ios objective-c cocoa-touch uialertview uiactivityindicatorview