我已经看过很多次等待面板(带有uiactivityindicatorview
的面板)黑色/深色,带有一些透明度和白色标签。
像这样:
我猜这是一个标准元素。 我在哪里可以找到它?
答案 0 :(得分:1)
试试这个。这是我遇到的展示活动的最佳解决方案。 MBProgressHUD
答案 1 :(得分:0)
截至目前,iOS中没有标准UIElement
。
但请查看此library:
答案 2 :(得分:0)
MBProgressHUD看起来不错。您也可以查看http://code.google.com/p/toast-notifications-ios/。
答案 3 :(得分:0)
没有iOS组件可以做到这一点。
如果您不想仅为此组件包含外部库,则可以使用UI组件来执行此操作。
/* Warning, typed from memory */
// Create the UIView that's the background
UIView *pleaseWaitView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 80)];
[pleaseWaitView setBackgroundColor:[UIColor colorWithWhite:0.5 alpha:0.5]];
[[pleaseWaitView layer] setCornerRadius:5.0f];
// And create an activity indicator
UIActivityIndicator *i = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
[i startAnimating];
[pleaseWaitView addSubview:i];
[i release];
// Add it to the main view (in the middle)
[pleaseWaitView setCenter:CGPointMake(self.view.bounds.size.width/2, self.view.bounds.size.height/2)];
[self.view addSubview:pleaseWaitView];
您可以添加UILabel,其中包含您想要的任何文本(在您的情况下,“身份验证”),方法与添加活动指示符相同。
棘手的部分是设置角半径 - 您可能需要在.m文件的顶部:
#import <QuartzCore/QuartzCore.h>
注意您可以在界面构建器中执行此操作(如果需要)(除了角半径位!);)
答案 4 :(得分:0)
我回答了一个包含这样的叠加层的问题。我包含了你需要的代码和叠加图像。看看这个答案,看看它创建的屏幕截图。我在后台发送电子邮件时使用此叠加层,因此您需要编辑代码以执行您的功能,但叠加代码已经到位。
Locking the Fields in MFMailComposeViewController
快乐的编码!
答案 5 :(得分:0)
结帐DSActivityView。我在一些项目中成功地使用了它。