是否可以在MBProgressHUD覆盖中加载自定义 View ,MBProgressHUD类具有自定义 View 选项,但是我可以使用customView分配XIB View 吗?

最佳答案

是的,您可以执行以下操作:

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

关于uiview - 在MBProgressHUD中加载自定义 View ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10938620/

10-12 03:45