When I use [SVProgressHUD show]
, delay 2 seconds, then use [SVProgressHUD dismiss]
, the HUD dismiss.
But when I use [SVProgressHUD showErrorWithStatus:@"test"]
, the hud can' show.
Can someone stay me why?
- (void)viewDidLoad {
[super viewDidLoad];
[SVProgressHUD show];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[SVProgressHUD dismiss];
[SVProgressHUD showErrorWithStatus:@"test"];
});
}
The SVProgressHUD.showInfoWithStatus
will hide the message after some time. so probably second HUD won't show cause it is still remove the first one. [SVProgressHUD show];
If you wanna update don't call dismiss [SVProgressHUD dismiss];