fixed: 1.适配小屏幕机型

feature: 1.忘记密码新增语音和短信验证码切换功能
This commit is contained in:
jiangxuefei718
2019-03-14 08:41:00 +08:00
parent 5746d392a3
commit 91aee9dac1
35 changed files with 293 additions and 129 deletions
+7
View File
@@ -10,5 +10,12 @@
#define CommonMacros_h
#define is_iPhone_X ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
#define STATUS_BAR_HEIGHT [[UIApplication sharedApplication] statusBarFrame].size.height
#define TOP_HEIGHT (STATUS_BAR_HEIGHT + 44)
// 屏幕宽度
#define kScreenWidth ((CGRectGetWidth([UIScreen mainScreen].bounds) > CGRectGetHeight([UIScreen mainScreen].bounds))?(CGRectGetHeight([UIScreen mainScreen].bounds)):(CGRectGetWidth([UIScreen mainScreen].bounds)))
// 屏幕高度
#define kScreenHeight ((CGRectGetWidth([UIScreen mainScreen].bounds) > CGRectGetHeight([UIScreen mainScreen].bounds))?(CGRectGetWidth([UIScreen mainScreen].bounds)):(CGRectGetHeight([UIScreen mainScreen].bounds)))
#endif /* CommonMacros_h */
@@ -0,0 +1,17 @@
//
// UINavigationController+Config.h
// Ifish
//
// Created by JiangXuefei on 2019/3/13.
// Copyright © 2019年 lianlian. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UINavigationController (Config)
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,17 @@
//
// UINavigationController+Config.m
// Ifish
//
// Created by JiangXuefei on 2019/3/13.
// Copyright © 2019年 lianlian. All rights reserved.
//
#import "UINavigationController+Config.h"
@implementation UINavigationController (Config)
+ (void)initialize {
[[UINavigationBar appearance] setTranslucent:NO];
}
@end
+17
View File
@@ -0,0 +1,17 @@
//
// UIViewController+Swizzling.h
// IfishTests
//
// Created by JiangXuefei on 2019/3/13.
// Copyright © 2019年 lianlian. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UIViewController (Swizzling)
@end
NS_ASSUME_NONNULL_END
+29
View File
@@ -0,0 +1,29 @@
//
// UIViewController+Swizzling.m
// IfishTests
//
// Created by JiangXuefei on 2019/3/13.
// Copyright © 2019年 lianlian. All rights reserved.
//
#import "UIViewController+Swizzling.h"
#import <objc/runtime.h>
@implementation UIViewController (Swizzling)
+ (void)load
{
#ifdef DEBUG
Method viewWillAppear = class_getInstanceMethod(self, @selector(viewWillAppear:));
Method logViewWillAppear = class_getInstanceMethod(self, @selector(logViewWillAppear:));
method_exchangeImplementations(viewWillAppear, logViewWillAppear);
#endif
}
- (void)logViewWillAppear:(BOOL)animated
{
NSLog(@"========>%@ will appear",NSStringFromClass([self class]));
[self logViewWillAppear:animated];
}
@end