login 适配 se 5s 新增icon 主页修改

This commit is contained in:
lianxiang
2018-09-04 21:54:04 +08:00
parent 3a3e6eeee9
commit 17d4481f2c
66 changed files with 1136 additions and 306 deletions
@@ -24,7 +24,7 @@
-(UIStatusBarStyle)preferredStatusBarStyle
{
return UIStatusBarStyleDefault;
return UIStatusBarStyleLightContent;
}
-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
+9 -4
View File
@@ -7,16 +7,17 @@
//
#import <UIKit/UIKit.h>
#import "GiGaNoNetWorkView.h"
@interface GiGaBaseViewController : UIViewController<UITableViewDelegate,UITableViewDataSource>
{
UIView *_emptyView;
UIView *_noNetWorkView;
GiGaNoNetWorkView *_noNetWorkView;
UITableView *_tableView;
}
@property (nonatomic,strong) UIView * emptyView;
@property (nonatomic,strong) UIView * noNetWorkView;
@property (nonatomic,strong) GiGaNoNetWorkView * noNetWorkView;
@property (nonatomic,strong) UITableView *tableView;
@@ -26,9 +27,13 @@
@property (nonatomic, assign) AFNetworkReachabilityStatus currentNetworkStatus;
- (void)showNoNetWorkView;
- (void)showEmptyView;
- (void)removeNoNetWorkView;
-(void)addNavTitile:(NSString *)title;
- (void)showEmptyView;
- (void)removeEmtyView;
- (void)addNavTitile:(NSString *)title;
@end
+29 -2
View File
@@ -24,6 +24,8 @@
[super viewDidLoad];
// Do any additional setup after loading the view.
[self.navigationController.navigationBar cnSetBackgroundColor:GIGARGB(216, 216, 216, 1)];
}
@@ -33,8 +35,10 @@
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
//[self.navigationController.navigationBar cnSetBackgroundColor:GIGAUIColorFromRGB_A(0xD8D8D8, 0.2)];
}
-(void)addNavTitile:(NSString *)title{
@@ -43,9 +47,13 @@
}
//没有网络返回
- (void)showNoNetWorkView
{
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// if (self.currentNetworkStatus < 1) {
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
@@ -55,8 +63,27 @@
// });
}
- (void)removeNoNetWorkView{
if (_noNetWorkView) {
[_noNetWorkView removeFromSuperview];
_noNetWorkView = nil;
}
}
- (UIView *)noNetWorkView{
if (!_noNetWorkView) {
_noNetWorkView = [GiGaNoNetWorkView new];
}
return _noNetWorkView;
}
-(void)showEmptyView{
}
- (void)removeEmtyView{
}
-(void)testNetworkStatus{
@@ -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
@@ -14,7 +14,8 @@
{
if (self = [super initWithFrame:frame]) {
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, 44)];
label.textColor = GIGAUIColorFromRGBA(0x777777);
//label.textColor = GIGAUIColorFromRGBA(0x777777);
label.textColor = [UIColor whiteColor];
label.text = str;
label.font = [UIFont fontWithName:@"PingFangSC-Medium" size:18.f];
label.textAlignment = NSTextAlignmentCenter;
+13
View File
@@ -0,0 +1,13 @@
//
// GiGaNoNetWorkView.h
// GIGA
//
// Created by lianxiang on 2018/9/4.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface GiGaNoNetWorkView : UIView
@end
+23
View File
@@ -0,0 +1,23 @@
//
// GiGaNoNetWorkView.m
// GIGA
//
// Created by lianxiang on 2018/9/4.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GiGaNoNetWorkView.h"
@implementation GiGaNoNetWorkView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
}
return self;
}
@end