diff --git a/Ifish/Common/CommonMacros.h b/Ifish/Common/CommonMacros.h new file mode 100644 index 0000000..7ca0e47 --- /dev/null +++ b/Ifish/Common/CommonMacros.h @@ -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 */ diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/FourControl/FourControlNormalCenterController.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/FourControl/FourControlNormalCenterController.m index 70212e4..0665339 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/FourControl/FourControlNormalCenterController.m +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/FourControl/FourControlNormalCenterController.m @@ -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]; diff --git a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/YooseeNextConnectViewController.mm b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/YooseeNextConnectViewController.mm index e448b91..5fafbae 100644 --- a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/YooseeNextConnectViewController.mm +++ b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/YooseeNextConnectViewController.mm @@ -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]]; diff --git a/Ifish/controllers/leftcontrollers/SecondConnectWifiController.m b/Ifish/controllers/leftcontrollers/SecondConnectWifiController.m index 2e0d000..0d3c8bd 100644 --- a/Ifish/controllers/leftcontrollers/SecondConnectWifiController.m +++ b/Ifish/controllers/leftcontrollers/SecondConnectWifiController.m @@ -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;