diff --git a/Shared/KBSkinInstallBridge.m b/Shared/KBSkinInstallBridge.m index ce01f7d..3c67915 100644 --- a/Shared/KBSkinInstallBridge.m +++ b/Shared/KBSkinInstallBridge.m @@ -366,7 +366,7 @@ static NSString * const kKBSkinMetadataThemeKey = @"theme_json"; #if __has_include("KBNetworkManager.h") // 远程下载(http/https) NSLog(@"[SkinBridge] will GET zip: %@", zipURL); - [KBHUD show]; + [KBHUD showWithStatus:@"正在下载..."]; [[KBNetworkManager shared] GETData:zipURL parameters:nil headers:nil completion:^(NSData *data, NSURLResponse *response, NSError *error) { NSLog(@"[SkinBridge] GET finished, error = %@", error); if (error || data.length == 0) { @@ -766,4 +766,3 @@ static NSString * const kKBSkinMetadataThemeKey = @"theme_json"; } @end - diff --git a/keyBoard/Class/Common/V/KBHUD.m b/keyBoard/Class/Common/V/KBHUD.m index a462414..20fe2c0 100644 --- a/keyBoard/Class/Common/V/KBHUD.m +++ b/keyBoard/Class/Common/V/KBHUD.m @@ -58,6 +58,12 @@ static __weak UIView *sContainerView = nil; // 缺省承载视图( if (!hostView) { return nil; } MBProgressHUD *hud = sHUD; + if (hud && hud.superview != hostView) { + // Host view changed or HUD was removed; discard and recreate. + [hud removeFromSuperview]; + hud = nil; + sHUD = nil; + } if (!hud) { hud = [MBProgressHUD showHUDAddedTo:hostView animated:YES]; sHUD = hud; @@ -70,6 +76,9 @@ static __weak UIView *sContainerView = nil; // 缺省承载视图( hud.margin = 16; hud.label.numberOfLines = 0; hud.detailsLabel.numberOfLines = 0; + } else { + // If a previous hide is in progress, bring it back. + [hud showAnimated:YES]; } // 遮罩与交互(按本次 show 的入参应用) [self applyMaskType:mask hud:hud]; diff --git a/keyBoard/Class/Shop/VC/KBSkinDetailVC.m b/keyBoard/Class/Shop/VC/KBSkinDetailVC.m index f68b25e..34f199e 100644 --- a/keyBoard/Class/Shop/VC/KBSkinDetailVC.m +++ b/keyBoard/Class/Shop/VC/KBSkinDetailVC.m @@ -293,7 +293,7 @@ typedef NS_ENUM(NSInteger, KBSkinDetailSection) { mode:KBSkinSourceModeRemoteZip completion:^(BOOL success) { if (success) { - [KBHUD showSuccess:KBLocalized(@"已开始下载")]; +// [KBHUD showSuccess:KBLocalized(@"已开始下载")]; } else { [KBHUD showInfo:KBLocalized(@"下载失败")]; }