三控、两控页面适配iPhone X
This commit is contained in:
+14
-4
@@ -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)];
|
||||
|
||||
Reference in New Issue
Block a user