Closed loumzy closed 8 years ago
Now, I use the code blow solving the problem
- (MBProgressHUD *)HUD {
if (!_HUD) {
_HUD = [[MBProgressHUD alloc] initWithView:self.view];
[self.view addSubview:self.HUD];
}
for (UIView *view in _HUD.subviews) {
if ([view isKindOfClass:[UIActivityIndicatorView class]]) {
if(view.hidden)view.hidden = NO;
if(!((UIActivityIndicatorView *)view).isAnimating) [(UIActivityIndicatorView *)view startAnimating];
}
}
return _HUD;
}
@property (nonatomic, strong) MBProgressHUD *HUD;
When use lazy loading mode,MBProgressHUD activityIndicator not show again when use "self.HUD show:YES" after using “self.HUB hide:YES”