diff --git a/MBProgressHUD.m b/MBProgressHUD.m index a7ef24937..f142085ca 100755 --- a/MBProgressHUD.m +++ b/MBProgressHUD.m @@ -33,6 +33,8 @@ @implementation MBProgressHUD { CGAffineTransform _rotationTransform; NSTimeInterval _showStarted; __weak UIView *indicator; + __weak UILabel *label; + __weak UILabel *detailLabel; } #pragma mark Accessors @@ -41,8 +43,6 @@ @implementation MBProgressHUD { @synthesize wasHiddenBlock; -@synthesize label, detailLabel; - @synthesize minSize; @synthesize customView; @@ -380,6 +380,19 @@ - (void)setMode:(MBProgressHUDMode)newMode { }); } +- (void)setCustomView:(UIView *)newCustomView { + if ([newCustomView isEqual:customView]) + return; + + customView = newCustomView; + + if (mode != MBProgressHUDModeCustomView) + return; + + mode = MBProgressHUDModeIndeterminate; + self.mode = MBProgressHUDModeCustomView; +} + - (CGFloat)progress { if (mode != MBProgressHUDModeDeterminate) return 0.0f;