login 适配 se 5s 新增icon 主页修改
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// GIGAMBHUDHelper.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/4.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "MBProgressHUD.h"
|
||||
|
||||
@interface GIGAMBHUDHelper : NSObject
|
||||
/**
|
||||
* Paramas is hud, notic MBProgress message.
|
||||
*/
|
||||
+ (void)networkError:(MBProgressHUD *)hud;
|
||||
+ (void)networkError:(MBProgressHUD *)hud
|
||||
title:(NSString *)aTitle;
|
||||
+ (void)networkSucc:(MBProgressHUD *)hud
|
||||
title:(NSString *)aTitle;
|
||||
+ (void)networkInfo:(MBProgressHUD *)hud
|
||||
title:(NSString *)aTitle;
|
||||
/**
|
||||
* Paramas is view, notic MBProgress message in view.
|
||||
*/
|
||||
+ (void)networkErrorAddto:(UIView *)aView;
|
||||
+ (void)networkErrorAddto:(UIView *)aView
|
||||
title:(NSString *)aTitle;
|
||||
+ (void)networkSuccAddto:(UIView *)aView
|
||||
title:(NSString *)aTitle;
|
||||
+ (void)networkInfoAddto:(UIView *)aView
|
||||
title:(NSString *)aTitle;
|
||||
+ (void)messageAddto:(UIView *)aView title:(NSString *)aTitle;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,91 @@
|
||||
//
|
||||
// GIGAMBHUDHelper.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/4.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GIGAMBHUDHelper.h"
|
||||
|
||||
@implementation GIGAMBHUDHelper
|
||||
+ (void)networkError:(MBProgressHUD *)hud
|
||||
{
|
||||
hud.mode = MBProgressHUDModeCustomView;
|
||||
hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hud_error"]];
|
||||
hud.labelText = GIGALocalComm(@"toast_hud_net_error");
|
||||
[hud hide:YES afterDelay:HUD_DISPLAY_DURATION];
|
||||
|
||||
}
|
||||
+ (void)networkError:(MBProgressHUD *)hud
|
||||
title:(NSString *)aTitle
|
||||
{
|
||||
hud.mode = MBProgressHUDModeCustomView;
|
||||
hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hud_error"]];
|
||||
hud.labelText = aTitle;
|
||||
[hud hide:YES afterDelay:HUD_DISPLAY_DURATION];
|
||||
}
|
||||
+ (void)networkSucc:(MBProgressHUD *)hud
|
||||
title:(NSString *)aTitle
|
||||
{
|
||||
hud.mode = MBProgressHUDModeCustomView;
|
||||
hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hud_ok"]];
|
||||
hud.labelText = aTitle;
|
||||
[hud hide:YES afterDelay:HUD_DISPLAY_DURATION];
|
||||
}
|
||||
+ (void)networkInfo:(MBProgressHUD *)hud
|
||||
title:(NSString *)aTitle
|
||||
{
|
||||
hud.mode = MBProgressHUDModeCustomView;
|
||||
hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hud_info"]];
|
||||
hud.labelText = aTitle;
|
||||
[hud hide:YES afterDelay:HUD_DISPLAY_DURATION];
|
||||
}
|
||||
|
||||
/**
|
||||
* Paramas is view, notic MBProgress message in view.
|
||||
*/
|
||||
+ (void)networkErrorAddto:(UIView *)aView
|
||||
{
|
||||
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:aView animated:YES];
|
||||
hud.mode = MBProgressHUDModeCustomView;
|
||||
hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hud_error"]];
|
||||
hud.labelText = GIGALocalComm(@"");
|
||||
|
||||
[hud hide:YES afterDelay:HUD_DISPLAY_DURATION];
|
||||
}
|
||||
+ (void)networkErrorAddto:(UIView *)aView
|
||||
title:(NSString *)aTitle
|
||||
{
|
||||
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:aView animated:YES];
|
||||
hud.mode = MBProgressHUDModeCustomView;
|
||||
hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hud_error"]];
|
||||
hud.labelText = aTitle;
|
||||
[hud hide:YES afterDelay:HUD_DISPLAY_DURATION];
|
||||
}
|
||||
+ (void)networkSuccAddto:(UIView *)aView
|
||||
title:(NSString *)aTitle
|
||||
{
|
||||
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:aView animated:YES];
|
||||
hud.mode = MBProgressHUDModeCustomView;
|
||||
hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hud_ok"]];
|
||||
hud.labelText = aTitle;
|
||||
[hud hide:YES afterDelay:HUD_DISPLAY_DURATION];
|
||||
}
|
||||
+ (void)networkInfoAddto:(UIView *)aView
|
||||
title:(NSString *)aTitle
|
||||
{
|
||||
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:aView animated:YES];
|
||||
hud.mode = MBProgressHUDModeCustomView;
|
||||
hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hud_info"]];
|
||||
hud.labelText = aTitle;
|
||||
[hud hide:YES afterDelay:HUD_DISPLAY_DURATION];
|
||||
}
|
||||
+ (void)messageAddto:(UIView *)aView title:(NSString *)aTitle
|
||||
{
|
||||
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:aView animated:YES];
|
||||
hud.labelText = aTitle;
|
||||
[hud hide:YES afterDelay:1.0f];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user