修改松诺一些界面适配问题

This commit is contained in:
xuemh 2018-06-12 09:44:33 +08:00
parent fd30935104
commit 85cebc7912
2 changed files with 87 additions and 85 deletions

View File

@ -125,87 +125,6 @@
-(void)initSongNuoBDUI
{
NSArray *nameArr=@[@"PFLight1_off",@"PFLight1_off",@"ChongLang_off",@"O2_off",@"",@"PFkilLlight_off",@"JiaReBang_off"];
CGFloat btnControlWith = 70;
CGFloat btnControlPlace = (kScreenSize.width - 3*btnControlWith )/4;
for (int i = 0; i < 3; i ++) {
self.button = [[UIButton alloc] init] ;
self.button.frame = CGRectMake(btnControlPlace +i*(btnControlPlace + btnControlWith),kScreenSize.height - 3*btnControlPlace - 2 *btnControlWith -10 , btnControlWith, btnControlWith +11);
[self.button setImage:[UIImage imageNamed:nameArr[i]] forState:UIControlStateNormal];
//self.button.backgroundColor = [UIColor redColor];
self.button.tag=600000+i;
[self.button addTarget:self action:@selector(songNuoBDBtnClick:) forControlEvents:UIControlEventTouchUpInside];
UILabel* textLbl = [[UILabel alloc] initWithFrame:CGRectMake(btnControlPlace +i*(btnControlPlace + btnControlWith),kScreenSize.height - 3*btnControlPlace - 2 *btnControlWith -20 + btnControlWith , btnControlWith, btnControlPlace - 5)];
//textLbl.backgroundColor = [UIColor blackColor];
textLbl.textColor = [UIColor colorWithRed:250/255.0f green:255/255.0f blue:255/254.0f alpha:1];
textLbl.textAlignment = NSTextAlignmentCenter;
NSArray *arr = @[@"灯1",@"灯2",@"水泵"];
textLbl.text = arr[i];
textLbl.font = [UIFont boldSystemFontOfSize:14];
[self.tableView addSubview:textLbl];
[self.tableView addSubview:self.button];
if (i==0) {
self.nuoLight1Btn = self.button;
self.light1Name = textLbl;
}else if (i==1){
self.nuoLight2Btn = self.button;
self.light2Name = textLbl;
}else if (i==2){
self.nuoWaterPumpBtn = self.button;
self.waterPumpName = textLbl;
}
}
CGFloat btnControlPlace1 = (kScreenSize.width - 2*btnControlWith )/3;
for (int i = 0; i < 3; i ++) {
self.button = [[UIButton alloc] init] ;
self.button.frame =CGRectMake(btnControlPlace +i*(btnControlPlace + btnControlWith),kScreenSize.height - 2*btnControlPlace - btnControlWith -25, btnControlWith, btnControlWith +11);
[self.button setImage:[UIImage imageNamed:nameArr[i+3]]forState:UIControlStateNormal];
self.button.tag= 600003+i;
[self.button addTarget:self action:@selector(songNuoBDBtnClick:) forControlEvents:UIControlEventTouchUpInside];
UILabel* textLbl = [[UILabel alloc] initWithFrame:CGRectMake(btnControlPlace1 +i*(btnControlPlace1 + btnControlWith), kScreenSize.height - 2*btnControlPlace - btnControlWith -35 + btnControlWith, btnControlWith, btnControlPlace - 5)];
//textLbl.backgroundColor = [UIColor blackColor];
textLbl.textAlignment = NSTextAlignmentCenter;
textLbl.textColor = [UIColor colorWithRed:250/255.0f green:255/255.0f blue:255/254.0f alpha:1];
NSArray *arr = @[@"氧泵",@"柜灯",@"加热棒"];
textLbl.font = [UIFont boldSystemFontOfSize:14];
textLbl.text = arr[i];
[self.tableView addSubview:textLbl];
[self.tableView addSubview:self.button];
if (i==0) {
self.nuoAirPumpBtn = self.button;
self.airPumpName = textLbl;
}else if (i==1){
self.nuoGuiDengBtn = self.button;
self.guiDengName = textLbl;
}else if (i==1){
self.nuoJiaReBtn = self.button;
self.jiaReName = textLbl;
}
}
// self.bubble frame
CGFloat animViewHeight= kScreenSize.width/4;
if (kScreenSize.height==480) {
@ -247,8 +166,91 @@
}
[self initCHNames];
NSArray *nameArr=@[@"PFLight1_off",@"PFLight1_off",@"ChongLang_off",@"O2_off",@"",@"PFkilLlight_off",@"JiaReBang_off"];
CGFloat btnControlWith = 70;
CGFloat btnControlPlace = (kScreenSize.width - 3*btnControlWith )/4;
CGFloat currentY = CGRectGetMaxY(self.bubble.frame);
for (int i = 0; i < 3; i ++) {
self.button = [[UIButton alloc] init] ;
self.button.frame = CGRectMake(btnControlPlace +i*(btnControlPlace + btnControlWith),currentY , btnControlWith, btnControlWith +11);
[self.button setImage:[UIImage imageNamed:nameArr[i]] forState:UIControlStateNormal];
//self.button.backgroundColor = [UIColor redColor];
self.button.tag=600000+i;
[self.button addTarget:self action:@selector(songNuoBDBtnClick:) forControlEvents:UIControlEventTouchUpInside];
UILabel* textLbl = [[UILabel alloc] initWithFrame:CGRectMake(btnControlPlace +i*(btnControlPlace + btnControlWith),currentY + btnControlWith +11 - 6, btnControlWith, 14)];
//textLbl.backgroundColor = [UIColor blackColor];
textLbl.textColor = [UIColor colorWithRed:250/255.0f green:255/255.0f blue:255/254.0f alpha:1];
textLbl.textAlignment = NSTextAlignmentCenter;
NSArray *arr = @[@"灯1",@"灯2",@"水泵"];
textLbl.text = arr[i];
textLbl.font = [UIFont boldSystemFontOfSize:14];
[self.tableView addSubview:textLbl];
[self.tableView addSubview:self.button];
if (i==0) {
self.nuoLight1Btn = self.button;
self.light1Name = textLbl;
}else if (i==1){
self.nuoLight2Btn = self.button;
self.light2Name = textLbl;
}else if (i==2){
self.nuoWaterPumpBtn = self.button;
self.waterPumpName = textLbl;
}
if (i == 2) {
currentY = CGRectGetMaxY(textLbl.frame);
}
}
for (int i = 0; i < 3; i ++) {
self.button = [[UIButton alloc] init] ;
self.button.frame =CGRectMake(btnControlPlace +i*(btnControlPlace + btnControlWith),currentY + 6, btnControlWith, btnControlWith +11);
[self.button setImage:[UIImage imageNamed:nameArr[i+3]]forState:UIControlStateNormal];
self.button.tag= 600003+i;
[self.button addTarget:self action:@selector(songNuoBDBtnClick:) forControlEvents:UIControlEventTouchUpInside];
UILabel* textLbl = [[UILabel alloc] initWithFrame:CGRectMake(btnControlPlace +i*(btnControlPlace + btnControlWith),currentY + btnControlWith +11, btnControlWith, 14)];
//textLbl.backgroundColor = [UIColor blackColor];
textLbl.textAlignment = NSTextAlignmentCenter;
textLbl.textColor = [UIColor colorWithRed:250/255.0f green:255/255.0f blue:255/254.0f alpha:1];
NSArray *arr = @[@"氧泵",@"柜灯",@"加热棒"];
textLbl.font = [UIFont boldSystemFontOfSize:14];
textLbl.text = arr[i];
[self.tableView addSubview:textLbl];
[self.tableView addSubview:self.button];
if (i==0) {
self.nuoAirPumpBtn = self.button;
self.airPumpName = textLbl;
}else if (i==1){
self.nuoGuiDengBtn = self.button;
self.guiDengName = textLbl;
}else if (i==2){
self.nuoJiaReBtn = self.button;
self.jiaReName = textLbl;
}
}
[self initCHNames];
}
-(void)songNuoBDBtnClick:(UIButton*)btn{

View File

@ -825,8 +825,8 @@
-(void)songNuoremindCyclePicDone{
if (_indexpath.section==0&&_indexpath.row==3) {
// if (_indexpath.section==0&&_indexpath.row==3) {
ChangeWaterCell*cell=[self.tableView cellForRowAtIndexPath:_indexpath];
NSString *str=_remindPic.picViewResultString;
@ -867,7 +867,7 @@
[_remindPic removeFromSuperview];
}
// }
}
#pragma mark