|
|
@@ -127,14 +127,22 @@
|
|
|
tcell.lbDesc.text = [NSString stringWithFormat:@"추가 가능한 장치 수량 %@", info.remainCtrtCnt];
|
|
|
tcell.btnRadio.value = info;
|
|
|
|
|
|
+
|
|
|
+
|
|
|
if (indexPath.row == 0 && !_isNotFirstLoading) {
|
|
|
_isNotFirstLoading = YES;
|
|
|
tcell.btnRadio.checked = YES;
|
|
|
} else {
|
|
|
- NSLog(@"%@", BOOLToString([tcell.btnRadio getRadioStatusFromValue]));
|
|
|
+// NSLog(@"%@", BOOLToString([tcell.btnRadio getRadioStatusFromValue]));
|
|
|
tcell.btnRadio.checked = [tcell.btnRadio getRadioStatusFromValue];
|
|
|
}
|
|
|
|
|
|
+ if ([info.remainCtrtCnt integerValue] < 1) {
|
|
|
+ tcell.btnRadio.enabled = NO;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
[_rgroup addRadioButton:tcell.btnRadio];
|
|
|
|
|
|
//set background image
|
|
|
@@ -143,12 +151,20 @@
|
|
|
// } else {
|
|
|
// tcell.backgroundView = [[UIImageView alloc] initWithImage:_bgCellImage2];
|
|
|
// }
|
|
|
-
|
|
|
- if (tcell.btnRadio.checked) {
|
|
|
- tcell.backgroundView = [[UIImageView alloc] initWithImage:_bgCellImage1];
|
|
|
+ if (tcell.btnRadio.enabled) {
|
|
|
+ if (tcell.btnRadio.checked) {
|
|
|
+ tcell.backgroundView = [[UIImageView alloc] initWithImage:_bgCellImage1];
|
|
|
+ } else {
|
|
|
+ tcell.backgroundView = [[UIImageView alloc] initWithImage:_bgCellImage2];
|
|
|
+ }
|
|
|
} else {
|
|
|
- tcell.backgroundView = [[UIImageView alloc] initWithImage:_bgCellImage2];
|
|
|
+ tcell.backgroundView = [[UIImageView alloc] initWithImage:_bgCellImage3];
|
|
|
+ tcell.lbTitle.textColor = kUITextColor08;
|
|
|
+ tcell.lbSerial.textColor = kUITextColor08;
|
|
|
+ tcell.lbDesc.textColor = kUITextColor08;
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
|
|
|
return tcell;
|
|
|
}
|
|
|
@@ -157,9 +173,12 @@
|
|
|
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
|
|
|
|
|
HomeHubSelectPopupTableViewCell *tcell = (HomeHubSelectPopupTableViewCell *)[self tableView:tableView cellForRowAtIndexPath:indexPath];
|
|
|
- [_rgroup someRadioButtonTouched:tcell.btnRadio];
|
|
|
-
|
|
|
- [_tableView reloadData];
|
|
|
+ if (tcell.btnRadio.enabled) {
|
|
|
+ [_rgroup someRadioButtonTouched:tcell.btnRadio];
|
|
|
+
|
|
|
+ [_tableView reloadData];
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|