修复加热棒的显示
This commit is contained in:
+13
-2
@@ -185,7 +185,7 @@
|
||||
|
||||
}
|
||||
|
||||
NSArray *nameArr=@[@"PFLight1_off",@"PFLight1_off",@"ChongLang_off",@"O2_off",@"",@"PFkilLlight_off",@"JiaReBang_off"];
|
||||
NSArray *nameArr=@[@"PFLight1_off",@"PFLight1_off",@"ChongLang_off",@"O2_off",@"",@"PFkilLlight_off",@"JiaReBang"];
|
||||
|
||||
CGFloat btnControlWith = 70;
|
||||
CGFloat btnControlPlace = (kScreenSize.width - 3*btnControlWith )/4;
|
||||
@@ -242,7 +242,18 @@
|
||||
|
||||
self.button.tag= 600003+i;
|
||||
[self.button addTarget:self action:@selector(songNuoBDBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
if (i == 2) {
|
||||
[self.button setImage:[UIImage imageNamed:nameArr.lastObject] forState:UIControlStateNormal];
|
||||
UILabel *tempLbl = [UILabel new];
|
||||
[self.button addSubview:tempLbl];
|
||||
tempLbl.tag = 1;
|
||||
tempLbl.font = [UIFont boldSystemFontOfSize:16];
|
||||
tempLbl.textColor = [UIColor lightGrayColor];
|
||||
tempLbl.textAlignment = NSTextAlignmentCenter;
|
||||
tempLbl.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
[NSLayoutConstraint constraintWithItem:tempLbl attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self.button attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:0.0].active = YES;
|
||||
[NSLayoutConstraint constraintWithItem:tempLbl attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.button attribute:NSLayoutAttributeCenterY multiplier:1.0 constant:-4.0].active = YES;
|
||||
}
|
||||
UILabel* textLbl = [[UILabel alloc] initWithFrame:CGRectMake(btnControlPlace +i*(btnControlPlace + btnControlWith),currentY + btnControlWith +11, btnControlWith, 14)];
|
||||
//textLbl.backgroundColor = [UIColor blackColor];
|
||||
textLbl.textAlignment = NSTextAlignmentCenter;
|
||||
|
||||
Reference in New Issue
Block a user