修改弹窗
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user