修改弹窗

This commit is contained in:
2025-12-22 15:49:28 +08:00
parent 1c9ae7bc06
commit 9e33c93763
3 changed files with 11 additions and 3 deletions

View File

@@ -366,7 +366,7 @@ static NSString * const kKBSkinMetadataThemeKey = @"theme_json";
#if __has_include("KBNetworkManager.h") #if __has_include("KBNetworkManager.h")
// http/https // http/https
NSLog(@"[SkinBridge] will GET zip: %@", zipURL); 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) { [[KBNetworkManager shared] GETData:zipURL parameters:nil headers:nil completion:^(NSData *data, NSURLResponse *response, NSError *error) {
NSLog(@"[SkinBridge] GET finished, error = %@", error); NSLog(@"[SkinBridge] GET finished, error = %@", error);
if (error || data.length == 0) { if (error || data.length == 0) {
@@ -766,4 +766,3 @@ static NSString * const kKBSkinMetadataThemeKey = @"theme_json";
} }
@end @end

View File

@@ -58,6 +58,12 @@ static __weak UIView *sContainerView = nil; // 缺省承载视图(
if (!hostView) { return nil; } if (!hostView) { return nil; }
MBProgressHUD *hud = sHUD; 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) { if (!hud) {
hud = [MBProgressHUD showHUDAddedTo:hostView animated:YES]; hud = [MBProgressHUD showHUDAddedTo:hostView animated:YES];
sHUD = hud; sHUD = hud;
@@ -70,6 +76,9 @@ static __weak UIView *sContainerView = nil; // 缺省承载视图(
hud.margin = 16; hud.margin = 16;
hud.label.numberOfLines = 0; hud.label.numberOfLines = 0;
hud.detailsLabel.numberOfLines = 0; hud.detailsLabel.numberOfLines = 0;
} else {
// If a previous hide is in progress, bring it back.
[hud showAnimated:YES];
} }
// show // show
[self applyMaskType:mask hud:hud]; [self applyMaskType:mask hud:hud];

View File

@@ -293,7 +293,7 @@ typedef NS_ENUM(NSInteger, KBSkinDetailSection) {
mode:KBSkinSourceModeRemoteZip mode:KBSkinSourceModeRemoteZip
completion:^(BOOL success) { completion:^(BOOL success) {
if (success) { if (success) {
[KBHUD showSuccess:KBLocalized(@"已开始下载")]; // [KBHUD showSuccess:KBLocalized(@"已开始下载")];
} else { } else {
[KBHUD showInfo:KBLocalized(@"下载失败")]; [KBHUD showInfo:KBLocalized(@"下载失败")];
} }