修改弹窗
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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(@"下载失败")];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user