DJ1
DJ1

Reputation: 944

how to add text while displaying MBProgressHud in iOS?

I want to add text while displaying progress hud. But i don't know how to use it. Please help me out for this.

MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
hud.mode = MBProgressHUDModeIndeterminate;

[hud hideAnimated:YES];

Upvotes: 2

Views: 2880

Answers (2)

user5930025
user5930025

Reputation:

#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];

download from this link: https://github.com/jdg/MBProgressHUD

Upvotes: 6

Bhargav B. Bajani
Bhargav B. Bajani

Reputation: 927

u can set labeltext

 hud.labelText = @"Loading";

for details

hud.detailsLabelText = @"Details";

Upvotes: 1

Related Questions