From SVProgressHUD project doc, to dismiss your HUD you need to call one of the following method:
+ (void)dismiss;
+ (void)dismissWithSuccess:(NSString*)successString;
+ (void)dismissWithSuccess:(NSString*)successString afterDelay:(NSTimeInterval)seconds;
+ (void)dismissWithError:(NSString*)errorString;
+ (void)dismissWithError:(NSString*)errorString afterDelay:(NSTimeInterval)seconds;
Dismiss it in viewWillDisappear
method of your UIViewController
, if it has not be dismissed earlier. viewDidUnload
is called on specific memory condition (e.g low memory), instead viewWillDisappear
is called whenever your view
's controller disappears from screen.
Hope it helps.