三控、两控页面适配iPhone X

This commit is contained in:
xuemh
2018-04-03 00:02:49 +08:00
parent 951a1f082e
commit a8f9a034dc
4 changed files with 49 additions and 15 deletions
@@ -94,9 +94,14 @@ typedef NS_ENUM(NSInteger,ThreeControBackMsgTape){
self.button.tag=201+i;
CGFloat y = 0;
if (is_iPhone_X) {
y = kScreenSize.height - (btnControlPlace - 10) - btnControlWith -10 -64 - 34;
} else {
y = kScreenSize.height - (btnControlPlace - 10) - btnControlWith -10 -64;
}
self.button.frame=CGRectMake(btnControlPlace +i*(btnControlPlace + btnControlWith * 105 / 122), kScreenSize.height - (btnControlPlace - 10) - btnControlWith -10 -64 , btnControlWith * 105 / 122, btnControlWith );
self.button.frame=CGRectMake(btnControlPlace +i*(btnControlPlace + btnControlWith * 105 / 122), y, btnControlWith * 105 / 122, btnControlWith );
//self.button.frame=CGRectMake1(wSpace1+(i%3)*(60+wSpace1), kScreenSize.height-80-64,60, 60);
@@ -121,8 +126,13 @@ typedef NS_ENUM(NSInteger,ThreeControBackMsgTape){
NSArray*arry=@[@"灯1",@"灯2",@"UV/冲浪"];
for (int j=0; j<nomalarr.count; j++){
self.buttonNameLabel=[[UILabel alloc]initWithFrame:CGRectMake(btnControlPlace +j*(btnControlPlace + btnControlWith * 105 / 122), kScreenSize.height - (btnControlPlace - 10) - 20 -64, btnControlWith * 7 / 8, btnControlPlace -10)];
CGFloat y = 0;
if (is_iPhone_X) {
y = kScreenSize.height - (btnControlPlace - 10) - 20 -64 - 34;
} else {
y = kScreenSize.height - (btnControlPlace - 10) - 20 -64;
}
self.buttonNameLabel=[[UILabel alloc]initWithFrame:CGRectMake(btnControlPlace +j*(btnControlPlace + btnControlWith * 105 / 122), y, btnControlWith * 7 / 8, btnControlPlace -10)];
// self.timeLabel=[[UILabel alloc]initWithFrame:CGRectMake1(wSpace+(i%3)*(60+wSpace), kScreenSize.height-30-64,60, 20)];