修改iPhoneX适配问题

This commit is contained in:
xuemh 2018-03-28 20:46:46 +08:00
parent 4aa8fe2bbc
commit 62c7398284
4 changed files with 35 additions and 4 deletions

View File

@ -0,0 +1,14 @@
//
// CommonMacros.h
// Ifish
//
// Created by Minghao Xue on 2018/3/28.
// Copyright © 2018年 lianlian. All rights reserved.
//
#ifndef CommonMacros_h
#define CommonMacros_h
#define is_iPhone_X ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
#endif /* CommonMacros_h */

View File

@ -90,9 +90,14 @@
self.button.tag=231+i;
CGFloat y = 0;
if (is_iPhone_X) {
y = kScreenSize.height -180 - 34 + 10;
} else {
y = kScreenSize.height -180 + 10;
}
self.button.frame=CGRectMake((wspace+i * (btnwidth+wspace)), (kScreenSize.height -180 + 10),btnwidth, btnwidth * 243/210);
self.button.frame=CGRectMake((wspace+i * (btnwidth+wspace)), y,btnwidth, btnwidth * 243/210);
[self.button setImage:[UIImage imageNamed:nomalarr[i]] forState:UIControlStateNormal];
[self.button addTarget:self action:@selector(fourControlBtnCilck:) forControlEvents:UIControlEventTouchUpInside];

View File

@ -973,8 +973,14 @@ withFilterContext:(id)filterContext
{
if (!self.connectingView) {
CGFloat yOffset = 0;
if (is_iPhone_X) {
yOffset = 88;
} else {
yOffset = 64;
}
IfishConnectingView *connectingView=[[IfishConnectingView alloc] initWithFrame:CGRectMake(0,64, kScreenSize.width, CGRectGetMaxY(self.wifiSecFiled.frame))];
IfishConnectingView *connectingView=[[IfishConnectingView alloc] initWithFrame:CGRectMake(0,yOffset, kScreenSize.width, CGRectGetMaxY(self.wifiSecFiled.frame))];
self.connectingView =connectingView;
[self.connectingView.textChangeView animationWithTexts:[NSArray arrayWithObjects:@"正在拼命连接中...",@"请将摄像头放在wifi信号良好的位置",@"连接时,请开大手机音量",@"连接过程会持续40s左右请耐心等待",@"连接不上,请点击下方说明书",nil]];

View File

@ -169,8 +169,14 @@ extern BOOL isfromCameraView;
{
if (!self.connectingView) {
CGFloat yOffset = 0;
if (is_iPhone_X) {
yOffset = 88;
} else {
yOffset = 64;
}
IfishConnectingView *connectingView=[[IfishConnectingView alloc] initWithFrame:CGRectMake(0,64, kScreenSize.width, CGRectGetMaxY(self.wifiTextFiled.frame))];
IfishConnectingView *connectingView=[[IfishConnectingView alloc] initWithFrame:CGRectMake(0,yOffset, kScreenSize.width, CGRectGetMaxY(self.wifiTextFiled.frame))];
self.connectingView =connectingView;