如何在iOS中显示MBProgressHud时添加文本



我想在显示进度hud时添加文本。但我不知道如何使用它。请帮帮我解决这个问题。

MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
hud.mode = MBProgressHUDModeIndeterminate;
[hud hideAnimated:YES];
#import "MBProgressHUD.h"
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:markerView animated:YES];
hud.mode = MBProgressHUDModeIndeterminate;
hud.label.text = @"Loading";
hud.detailsLabel.text = @"Wait 3 seconds";
//hide MBProgressHUD when process finish
[hud hideAnimated:YES];

从此链接下载: https://github.com/jdg/MBProgressHUD

您可以设置标签文本

 hud.labelText = @"Loading";

了解详情

hud.detailsLabelText = @"Details";

最新更新