Skip to content

Commit

Permalink
add text only mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Fidetro committed Mar 19, 2018
1 parent 61c1f02 commit c4931f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions SVProgressHUD/SVProgressHUD.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions SVProgressHUD/SVProgressHUD.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit c4931f7

Please sign in to comment.