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??
Asked
Active
Viewed 6,923 times
1 Answers
11
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];

Gustav
- 2,902
- 1
- 25
- 31
-
4I think you should add the init line of `MBProgressHUD`. – Raptor Jun 18 '14 at 04:01
-
Did not add hud view to parent view – kakaiikaka Apr 14 '21 at 09:59