解决方法 :
UIView *view = [UIApplication sharedApplication].keyWindow;
NSLog(@" -- >> 1 subview:%@",view.subviews);
MBProgressHUD *hud = view.subviews[1];
[hud removeFromSuperview];
NSLog(@" -- >> 2 subview:%@",view.subviews);
控制台输出:
2015-08-20 15:33:00.418 Friend [6995:60b] -- >> 1 subview:(
"<UILayoutContainerView: 0x155f1800; frame = (0 0; 320 480); autoresize = W+H; gestureRecognizers = <NSArray: 0x15505e20>; layer = <CALayer: 0x155f1950>>",
"<UMSocialMBProgressHUD: 0x155db7c0; frame = (0 0; 320 480); alpha = 0; opaque = NO; autoresize = LM+RM+TM+BM; layer = <CALayer: 0x155c4220>>"
)
2015-08-20 15:33:00.426 Friend [6995:60b] -- >> 2 subview:(
"<UILayoutContainerView: 0x155f1800; frame = (0 0; 320 480); autoresize = W+H; gestureRecognizers = <NSArray: 0x15505e20>; layer = <CALayer: 0x155f1950>>"
)
把MBProgressHUD移除之后SweetAlert就能弹出来了。