| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- //
- // KSHudLoagingManager.h
- // GuanYueTeam
- //
- // Created by 王智 on 2022/11/14.
- //
- #import <Foundation/Foundation.h>
- #import <MBProgressHUD/MBProgressHUD.h>
- #import "KSCustomLoadingView.h"
- #import "KSProgressLoadingView.h"
- typedef void(^KSLoadingCancel)(void);
- #define LOADING_MANAGER ([KSHudLoagingManager shareInstance])
- NS_ASSUME_NONNULL_BEGIN
- @interface KSHudLoagingManager : NSObject
- @property (nonatomic, strong) MBProgressHUD *HUD;
- @property (nonatomic, strong) KSCustomLoadingView *loadingView;
- @property (nonatomic, strong) KSProgressLoadingView *progressLoading;
- + (instancetype)shareInstance;
- - (void)showCustomLoading:(NSString *)text;
- - (void)showCancelCustomLoading:(NSString *)text cancel:(KSLoadingCancel)cancel;
- - (void)removeCustomLoading;
- - (void)showHUD;
- - (void)removeHUD;
- - (void)removeHUDNoDelay;
- - (void)MBPShow:(NSString*)str inView:(UIView *)displayView;
- - (void)MBShowAUTOHidingInWindow:(NSString *)str;
- - (void)MBShowInWindow:(NSString *)str;
- - (MBProgressHUD *)MBPShowLoadingHubWithText:(NSString *)text;
- // 提示后续操作
- - (void)KSShowMsg:(NSString *)message inView:(UIView *)displayView promptCompletion:(void(^)(void))promptCompletion;
- // 提示后续操作
- - (void)KSShowMsg:(NSString *)message promptCompletion:(void(^)(void))promptCompletion;
- /// 加载进度loading
- /// - Parameters:
- /// - text: 文本
- /// - progress: 进度比例 0~1
- - (void)showProgressLoading:(NSString *)text progress:(CGFloat)progress;
- /// 加载进度loading
- /// - Parameters:
- /// - text: 文本
- /// - progress: 进度比例 0~1
- - (void)showProgressNoAnimationLoading:(NSString *)text progress:(CGFloat)progress;
- /// 加载进度loading 完成后回调
- /// - Parameters:
- /// - text: 文本
- /// - progress: 进度比例 0~1
- /// - promptCompletion: 回调
- - (void)showProgressLoading:(NSString *)text progress:(CGFloat)progress promptCompletion:(void(^)(void))promptCompletion;
- /// 移除进度loading
- - (void)removeProgressLoading;
- // 进度loading后续操作
- - (void)KSShowProgressMsg:(NSString *)message promptCompletion:(void(^)(void))promptCompletion;
- @end
- NS_ASSUME_NONNULL_END
|