diff --git a/SVProgressHUD/SVProgressHUD.h b/SVProgressHUD/SVProgressHUD.h index 6aa935c0..8b426de3 100644 --- a/SVProgressHUD/SVProgressHUD.h +++ b/SVProgressHUD/SVProgressHUD.h @@ -125,6 +125,7 @@ typedef void (^SVProgressHUDDismissCompletion)(void); + (void)showSuccessWithStatus:(nullable NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showSuccessWithStatus: and setDefaultMaskType: instead."))); + (void)showErrorWithStatus:(nullable NSString*)status; + (void)showErrorWithStatus:(nullable NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showErrorWithStatus: and setDefaultMaskType: instead."))); ++ (void)showTextWithStatus:(nullable NSString*)status; // shows a image + status, use white PNGs with the imageViewSize (default is 28x28 pt) + (void)showImage:(nonnull UIImage*)image status:(nullable NSString*)status; diff --git a/SVProgressHUD/SVProgressHUD.m b/SVProgressHUD/SVProgressHUD.m index 2b669920..9ba51700 100644 --- a/SVProgressHUD/SVProgressHUD.m +++ b/SVProgressHUD/SVProgressHUD.m @@ -318,6 +318,11 @@ + (void)showErrorWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)ma #endif } ++ (void)showTextWithStatus:(nullable NSString*)status { + NSTimeInterval displayInterval = [self displayDurationForString:status]; + [[self sharedView] showImage:nil status:status duration:displayInterval]; +} + + (void)showImage:(UIImage*)image status:(NSString*)status { NSTimeInterval displayInterval = [self displayDurationForString:status]; [[self sharedView] showImage:image status:status duration:displayInterval];