Commit d8bd551b cgx

新增网络请求指示器,并适配夜间模式

1 个父辈 f863800b
...@@ -33,10 +33,6 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -33,10 +33,6 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)showDetailInfo:(NSString *)info inView:(UIView *)view; + (void)showDetailInfo:(NSString *)info inView:(UIView *)view;
+ (void)showDetailInfo:(NSString *)info delay:(NSTimeInterval)delay; + (void)showDetailInfo:(NSString *)info delay:(NSTimeInterval)delay;
/** 显示APP重载提示信息 */
+ (void)showDetailInfoForAppReload:(NSString *)info;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// //
#import "DSProgressHUD.h" #import "DSProgressHUD.h"
#import <MBProgressHUD/MBProgressHUD.h> #import <MBProgressHUD.h>
@implementation DSProgressHUD @implementation DSProgressHUD
...@@ -81,20 +81,12 @@ static MBProgressHUD *hud; ...@@ -81,20 +81,12 @@ static MBProgressHUD *hud;
[hud hideAnimated:NO afterDelay:delay]; [hud hideAnimated:NO afterDelay:delay];
} }
+ (void)showDetailInfoForAppReload:(NSString *)info
{
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:DSKeyWindow animated:YES];
hud.mode = MBProgressHUDModeText;
hud.removeFromSuperViewOnHide = YES;
hud.detailsLabel.text = info;
hud.detailsLabel.font = [UIFont systemFontOfSize:14.0];
[hud hideAnimated:NO afterDelay:4.0];
}
+ (void)adjustThemeWithHud:(MBProgressHUD *)hud { + (void)adjustThemeWithHud:(MBProgressHUD *)hud {
hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor; hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
hud.bezelView.dk_backgroundColorPicker = DKColorPickerWithColors(DSBlack, DSWhite, DSWhite); hud.bezelView.dk_backgroundColorPicker = DKColorPickerWithColors(DSBlack, DSWhite, DSWhite);
hud.label.dk_textColorPicker = DKColorPickerWithColors(DSWhite, DSBlack, DSWhite); hud.label.dk_textColorPicker = DKColorPickerWithColors(DSWhite, DSBlack, DSWhite);
hud.detailsLabel.dk_textColorPicker = DKColorPickerWithColors(DSWhite, DSBlack, DSWhite);
hud.contentColor = [hud.dk_manager.themeVersion isEqualToString:DKThemeVersionNormal] ? DSWhite : DSBlack;
} }
@end @end
...@@ -40,7 +40,9 @@ ...@@ -40,7 +40,9 @@
#pragma mark - UserInfoViewDelegate #pragma mark - UserInfoViewDelegate
- (void)didTriggerUserAction:(int)index { - (void)didTriggerUserAction:(int)index {
if (index == 1) { // 退出登录 if (index == 1) { // 退出登录
[DSProgressHUD showProgressHUDWithInfo:@"正在退出"];
[UserRequestModel layoutRequestWithCompletion:^(UserRequestModel * _Nonnull requestModel) { [UserRequestModel layoutRequestWithCompletion:^(UserRequestModel * _Nonnull requestModel) {
[DSProgressHUD dissmissProgressHUD];
if (requestModel.resCode == DSResCodeSuccess) { if (requestModel.resCode == DSResCodeSuccess) {
[self clearUserData:@"退出成功"]; [self clearUserData:@"退出成功"];
// 刷新我的个人信息相关数据 // 刷新我的个人信息相关数据
...@@ -52,7 +54,9 @@ ...@@ -52,7 +54,9 @@
#pragma mark - CloseAlertViewDelegate(注销账号) #pragma mark - CloseAlertViewDelegate(注销账号)
- (void)didClickCloseUserBtn { - (void)didClickCloseUserBtn {
[DSProgressHUD showProgressHUDWithInfo:@"正在注销"];
[UserRequestModel closeUserRequestWithCompletion:^(UserRequestModel * _Nonnull requestModel) { [UserRequestModel closeUserRequestWithCompletion:^(UserRequestModel * _Nonnull requestModel) {
[DSProgressHUD dissmissProgressHUD];
if (requestModel.resCode == DSResCodeSuccess) { if (requestModel.resCode == DSResCodeSuccess) {
[self.closeAlertView dismissCloseUserAlertView]; [self.closeAlertView dismissCloseUserAlertView];
[self clearUserData:@"注销成功"]; [self clearUserData:@"注销成功"];
......
...@@ -10,7 +10,6 @@ target 'DreamSleep' do ...@@ -10,7 +10,6 @@ target 'DreamSleep' do
pod 'DOUAudioStreamer', '~> 0.2.16' pod 'DOUAudioStreamer', '~> 0.2.16'
pod 'MBProgressHUD', '~> 1.2.0' pod 'MBProgressHUD', '~> 1.2.0'
pod 'YYWebImage', '~> 1.0.5' pod 'YYWebImage', '~> 1.0.5'
# pod 'YYImage/WebP'
pod 'YYModel', '~> 1.0.4' pod 'YYModel', '~> 1.0.4'
end end
......
...@@ -75,6 +75,6 @@ SPEC CHECKSUMS: ...@@ -75,6 +75,6 @@ SPEC CHECKSUMS:
YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30 YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30
YYWebImage: 5f7f36aee2ae293f016d418c7d6ba05c4863e928 YYWebImage: 5f7f36aee2ae293f016d418c7d6ba05c4863e928
PODFILE CHECKSUM: f00caaba3112a9603146aa839feedababa93bb83 PODFILE CHECKSUM: f57f9b361f7780fe0e72846ec7653ec88ed1e48c
COCOAPODS: 1.11.3 COCOAPODS: 1.11.3
...@@ -75,6 +75,6 @@ SPEC CHECKSUMS: ...@@ -75,6 +75,6 @@ SPEC CHECKSUMS:
YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30 YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30
YYWebImage: 5f7f36aee2ae293f016d418c7d6ba05c4863e928 YYWebImage: 5f7f36aee2ae293f016d418c7d6ba05c4863e928
PODFILE CHECKSUM: f00caaba3112a9603146aa839feedababa93bb83 PODFILE CHECKSUM: f57f9b361f7780fe0e72846ec7653ec88ed1e48c
COCOAPODS: 1.11.3 COCOAPODS: 1.11.3
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!