|
|
@@ -22,7 +22,7 @@
|
|
|
#define kfCommandNodeSwitchRightPadding 0.0f
|
|
|
#define kfCommandNodeLockRightPadding 0.0f
|
|
|
|
|
|
-#define kfControlNodeDefaultWidth 256.0f
|
|
|
+#define kfControlNodeDefaultWidth [UIScreen mainScreen].bounds.size.width - 100//256.0f
|
|
|
//#define kfControlMaxWidth IPHONE_WIDTH - 105.0f
|
|
|
#define kfControlNodeDefaultHeight 36.0f
|
|
|
#define kfControlNodeDefaultMargin 0.0f
|
|
|
@@ -34,13 +34,14 @@
|
|
|
|
|
|
for (UIView *view in [CommonUtil nibViews:@"CommandClassControlNodeView"]) {
|
|
|
if (view.tag == cmdClsType) {
|
|
|
-
|
|
|
- NSLog(@"cmdClsType : %d", cmdClsType);
|
|
|
-
|
|
|
+
|
|
|
controlView = (CommandClassControlNodeView *)view;
|
|
|
controlView.width = kfControlNodeDefaultWidth;
|
|
|
controlView.height = kfControlNodeDefaultHeight;
|
|
|
|
|
|
+ NSLog(@"controlView : %f ", controlView.frame.size.width);
|
|
|
+
|
|
|
+
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
@@ -139,12 +140,15 @@
|
|
|
}
|
|
|
|
|
|
if (_nodeEnable) {
|
|
|
+
|
|
|
if ([_subItem.cmdclsValue isEqualToString:cmdclsValueOn.cmdclsValue]) {
|
|
|
[self btnOpenTouched:nil];
|
|
|
} else {
|
|
|
[self btnCloseTouched:nil];
|
|
|
}
|
|
|
+
|
|
|
} else {
|
|
|
+
|
|
|
_btnOpen.selected = NO;
|
|
|
_btnClose.selected = NO;
|
|
|
|
|
|
@@ -221,8 +225,9 @@
|
|
|
|
|
|
CGFloat eWidth = width + kfCommandNodeSwitchLeftPadding + kfCommandNodeSwitchRightPadding;
|
|
|
_constraintBtnOnWidth.constant = eWidth;
|
|
|
- NSLog(@"SubItem : %@", _subItem.cmdclsValueList);
|
|
|
+
|
|
|
if (_subItem.cmdclsValueList.count) {
|
|
|
+
|
|
|
CmdClsValueModel *cmdclsValueOn = _subItem.cmdclsValueList[0];
|
|
|
CmdClsValueModel *cmdclsValueOff = _subItem.cmdclsValueList[1];
|
|
|
|
|
|
@@ -238,6 +243,7 @@
|
|
|
} else {
|
|
|
[self btnOffTouched:nil];
|
|
|
}
|
|
|
+
|
|
|
} else {
|
|
|
_btnOn.selected = NO;
|
|
|
_btnOff.selected = NO;
|