Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

load custom view in MBProgressHUD

Is it possible to load a custom view in MBProgressHUD overlay, there is a custom view option with the MBProgressHUD class, but can i assign a XIB view etc with customView??

like image 701
Faisal Ameer Avatar asked Jun 07 '12 19:06

Faisal Ameer


1 Answers

Yes you could do something like this:

MBProgressHUD *loadingHUD = [[MBProgressHUD alloc] init];
loadingHUD.mode = MBProgressHUDModeCustomView;
loadingHUD.labelText = nil;
loadingHUD.detailsLabelText = nil;
UIView *customView = [[UIView alloc] initWithFrame:self.view.bounds]; // Set a size
// Add stuff to view here
loadingHUD.customView = customView;
[HUD show:YES];
like image 77
Gustav Avatar answered Sep 21 '22 07:09

Gustav