Forráskód Böngészése

Merge branch 'master' of 61.40.220.21:/cable/git-repo/mobile/ios

KaRam Kim 8 éve
szülő
commit
1c923ead6f

+ 3 - 16
OneCable/Base.lproj/Rules.storyboard

@@ -731,7 +731,6 @@
                                                 <constraint firstItem="1JJ-mh-ORT" firstAttribute="leading" secondItem="lIC-Ns-3x1" secondAttribute="trailing" constant="8" id="rjc-ah-PnQ"/>
                                                 <constraint firstItem="BTK-wN-ulX" firstAttribute="trailing" secondItem="lIC-Ns-3x1" secondAttribute="trailing" id="u3S-Kn-NqU"/>
                                                 <constraint firstItem="Gmr-CA-EoF" firstAttribute="leading" secondItem="e4k-tc-UZm" secondAttribute="trailing" id="wdQ-VW-aul"/>
-                                                <constraint firstAttribute="bottomMargin" secondItem="lIC-Ns-3x1" secondAttribute="bottom" constant="9.5" id="x2B-3g-HTH"/>
                                                 <constraint firstAttribute="bottom" secondItem="e4k-tc-UZm" secondAttribute="bottom" id="xrJ-tc-Moy"/>
                                                 <constraint firstItem="NDr-Zf-Jre" firstAttribute="leading" secondItem="eCd-V5-AEI" secondAttribute="trailing" id="zYe-na-5xa"/>
                                             </constraints>
@@ -1107,7 +1106,7 @@
                                         </state>
                                         <state key="highlighted" backgroundImage="common_button_left_bg_press"/>
                                         <connections>
-                                            <action selector="btnCancelTouched:" destination="Xxr-u0-LpV" eventType="touchUpInside" id="Pe7-aT-SZ7"/>
+                                            <action selector="btnCancelTouched:" destination="Xxr-u0-LpV" eventType="touchUpInside" id="6QA-gq-on9"/>
                                         </connections>
                                     </button>
                                     <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="160" placeholderIntrinsicHeight="70" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dJO-5a-BHI" customClass="CustomButton">
@@ -1119,7 +1118,7 @@
                                         </state>
                                         <state key="highlighted" backgroundImage="common_button_right_bg_press"/>
                                         <connections>
-                                            <action selector="btnConfirmTouched:" destination="Xxr-u0-LpV" eventType="touchUpInside" id="Ua8-30-NDd"/>
+                                            <action selector="btnConfirmTouched:" destination="Xxr-u0-LpV" eventType="touchUpInside" id="vAY-TX-Aws"/>
                                         </connections>
                                     </button>
                                 </subviews>
@@ -1857,9 +1856,6 @@
                                         <color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
                                     </state>
                                     <state key="highlighted" backgroundImage="common_button_left_bg_press"/>
-                                    <connections>
-                                        <action selector="btnCancelTouched:" destination="Xxr-u0-LpV" eventType="touchUpInside" id="HL0-OO-jHk"/>
-                                    </connections>
                                 </button>
                                 <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="160" placeholderIntrinsicHeight="70" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cOo-cq-r0Q" customClass="CustomButton">
                                     <rect key="frame" x="160" y="0.0" width="160" height="50"/>
@@ -1869,9 +1865,6 @@
                                         <color key="titleColor" red="0.01176470588" green="0.60392156860000001" blue="0.87450980389999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                     </state>
                                     <state key="highlighted" backgroundImage="common_button_right_bg_press"/>
-                                    <connections>
-                                        <action selector="btnConfirmTouched:" destination="Xxr-u0-LpV" eventType="touchUpInside" id="EGK-4z-v2Y"/>
-                                    </connections>
                                 </button>
                             </subviews>
                             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
@@ -2577,9 +2570,6 @@
                                                 <color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
                                             </state>
                                             <state key="highlighted" backgroundImage="common_button_left_bg_press"/>
-                                            <connections>
-                                                <action selector="btnCancelTouched:" destination="Xxr-u0-LpV" eventType="touchUpInside" id="VUE-Ic-TqO"/>
-                                            </connections>
                                         </button>
                                         <button opaque="NO" contentMode="scaleToFill" ambiguous="YES" placeholderIntrinsicWidth="160" placeholderIntrinsicHeight="70" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jOg-rP-q7G" customClass="CustomButton">
                                             <rect key="frame" x="160" y="0.0" width="160" height="50"/>
@@ -2589,9 +2579,6 @@
                                                 <color key="titleColor" red="0.01176470588" green="0.60392156860000001" blue="0.87450980389999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                             </state>
                                             <state key="highlighted" backgroundImage="common_button_right_bg_press"/>
-                                            <connections>
-                                                <action selector="btnConfirmTouched:" destination="Xxr-u0-LpV" eventType="touchUpInside" id="QM7-fN-UJr"/>
-                                            </connections>
                                         </button>
                                     </subviews>
                                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
@@ -3755,7 +3742,7 @@
                                                                     <state key="normal" image="img_rule_list_playbtn_active"/>
                                                                 </button>
                                                                 <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="AaP-dC-mWc">
-                                                                    <rect key="frame" x="248" y="11.5" width="56" height="32"/>
+                                                                    <rect key="frame" x="248" y="12" width="56" height="32"/>
                                                                     <constraints>
                                                                         <constraint firstAttribute="height" constant="32" id="TMX-zt-Vpu"/>
                                                                         <constraint firstAttribute="width" constant="54" id="nTi-dr-Efd"/>

+ 3 - 2
OneCable/Classes/CommonUI/DeviceSelectPopupView.h

@@ -25,7 +25,8 @@
 
 
 - (id)initFromNib;
-
+- (id)initFromNibWithRefDevices:(NSMutableArray<ItemModel> *)refDevices
+                       typeCode:(NSString*)typeCode;
 @end
 
 
@@ -36,4 +37,4 @@
 @property (weak, nonatomic) IBOutlet CustomCheckBox *chkSelect;
 @property (weak, nonatomic) IBOutlet CustomRadioButton *rdoSelect;
 
-@end
+@end

+ 14 - 3
OneCable/Classes/CommonUI/DeviceSelectPopupView.m

@@ -84,7 +84,21 @@
     return self;
 }
 
+- (id)initFromNibWithRefDevices:(NSMutableArray<ItemModel> *)refDevices
+                       typeCode:(NSString*)typeCode {
+
+    id popup = [self initFromNib];
+    
+    _typeCode = typeCode;
+    [self setRefDevices:refDevices];
+    
+    NSLog(@"refDevices : %@", refDevices);
+    
+    return popup;
+}
+
 - (void)initTableViewAsDefaultStyle:(CustomTableView *)tableView {
+    
     tableView.dataSource = self;
     tableView.delegate = self;
     
@@ -94,9 +108,6 @@
     tableView.tableFooterView = [[UIView alloc] init]; //this call table events;
 }
 
-- (void)didMoveToSuperview {
-
-}
 
 - (void)setRefDevices:(NSMutableArray<ItemModel> *)refDevices {
     _refDevices = refDevices;

+ 32 - 50
OneCable/Classes/CommonUI/DeviceSelectPopupView.xib

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina4_0" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -162,63 +162,59 @@
                                         </mask>
                                     </variation>
                                 </view>
-                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bIs-li-8bz" userLabel="View - Buttons">
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FKg-oH-VO0">
                                     <rect key="frame" x="0.0" y="400" width="270" height="50"/>
                                     <subviews>
-                                        <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="145" placeholderIntrinsicHeight="70" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FKG-xS-HlM" customClass="CustomButton">
-                                            <rect key="frame" x="135" y="0.0" width="135" height="50"/>
-                                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IOO-Nc-3Aa" customClass="CustomButton">
+                                            <rect key="frame" x="0.0" y="0.0" width="135" height="50"/>
                                             <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
-                                            <state key="normal" title="확인" backgroundImage="img_popup_btn_right">
-                                                <color key="titleColor" red="0.011764705882352941" green="0.60392156862745094" blue="0.87450980392156863" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                                            <state key="normal" title="취소" backgroundImage="img_popup_btn_left">
+                                                <color key="titleColor" red="0.53333333329999999" green="0.56078431370000004" blue="0.6588235294" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                             </state>
                                             <connections>
-                                                <action selector="btnConfirmTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="JvU-lL-1vP"/>
+                                                <action selector="btnCancelTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="MSr-UH-1TU"/>
                                             </connections>
                                         </button>
-                                        <button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="249" horizontalCompressionResistancePriority="749" placeholderIntrinsicWidth="144" placeholderIntrinsicHeight="70" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EtP-9O-R3A" customClass="CustomButton">
-                                            <rect key="frame" x="0.0" y="0.0" width="135" height="50"/>
-                                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="C2n-lo-raN" customClass="CustomButton">
+                                            <rect key="frame" x="135" y="0.0" width="135" height="50"/>
                                             <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
-                                            <state key="normal" title="취소" backgroundImage="img_popup_btn_left">
-                                                <color key="titleColor" red="0.53333333333333333" green="0.5607843137254902" blue="0.6588235294117647" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                                            <state key="normal" title="확인" backgroundImage="img_popup_btn_right">
+                                                <color key="titleColor" red="0.01176470588" green="0.60392156860000001" blue="0.87450980389999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                             </state>
                                             <connections>
-                                                <action selector="btnCancelTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="g5k-Tn-E33"/>
+                                                <action selector="btnConfirmTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="Hca-Pb-RuD"/>
                                             </connections>
                                         </button>
                                     </subviews>
                                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
                                     <constraints>
-                                        <constraint firstItem="FKG-xS-HlM" firstAttribute="leading" secondItem="EtP-9O-R3A" secondAttribute="trailing" id="0AU-2p-yGY"/>
-                                        <constraint firstItem="FKG-xS-HlM" firstAttribute="top" secondItem="bIs-li-8bz" secondAttribute="top" id="0yR-1i-GwA"/>
-                                        <constraint firstItem="EtP-9O-R3A" firstAttribute="leading" secondItem="bIs-li-8bz" secondAttribute="leading" id="67J-Py-gk4"/>
-                                        <constraint firstAttribute="bottom" secondItem="FKG-xS-HlM" secondAttribute="bottom" id="8MT-GB-MNs"/>
-                                        <constraint firstItem="EtP-9O-R3A" firstAttribute="width" secondItem="FKG-xS-HlM" secondAttribute="width" id="DiX-p6-sAJ"/>
-                                        <constraint firstAttribute="height" constant="50" id="MuW-zZ-xbQ"/>
-                                        <constraint firstAttribute="bottom" secondItem="EtP-9O-R3A" secondAttribute="bottom" id="fRL-cw-Qpb"/>
-                                        <constraint firstAttribute="trailing" secondItem="FKG-xS-HlM" secondAttribute="trailing" id="fo2-7B-AAN"/>
-                                        <constraint firstItem="EtP-9O-R3A" firstAttribute="top" secondItem="bIs-li-8bz" secondAttribute="top" id="rXg-T2-2wj"/>
+                                        <constraint firstItem="C2n-lo-raN" firstAttribute="leading" secondItem="IOO-Nc-3Aa" secondAttribute="trailing" id="3Gs-zy-6g6"/>
+                                        <constraint firstAttribute="trailing" secondItem="C2n-lo-raN" secondAttribute="trailing" id="BJu-ha-Bjm"/>
+                                        <constraint firstAttribute="height" constant="50" id="R9E-tF-S4a"/>
+                                        <constraint firstItem="IOO-Nc-3Aa" firstAttribute="leading" secondItem="FKg-oH-VO0" secondAttribute="leading" id="YM8-40-caY"/>
+                                        <constraint firstAttribute="bottom" secondItem="IOO-Nc-3Aa" secondAttribute="bottom" id="fkO-L4-bML"/>
+                                        <constraint firstItem="IOO-Nc-3Aa" firstAttribute="top" secondItem="FKg-oH-VO0" secondAttribute="top" id="pZG-WV-e07"/>
+                                        <constraint firstItem="C2n-lo-raN" firstAttribute="top" secondItem="FKg-oH-VO0" secondAttribute="top" id="qfN-3d-Hcv"/>
+                                        <constraint firstAttribute="bottom" secondItem="C2n-lo-raN" secondAttribute="bottom" id="rYC-ve-f10"/>
+                                        <constraint firstItem="C2n-lo-raN" firstAttribute="width" secondItem="IOO-Nc-3Aa" secondAttribute="width" id="yhe-DE-Z7x"/>
                                     </constraints>
                                 </view>
                             </subviews>
                             <constraints>
-                                <constraint firstAttribute="bottom" secondItem="bIs-li-8bz" secondAttribute="bottom" id="PPn-dU-NOE"/>
-                                <constraint firstAttribute="trailing" secondItem="7nf-Ia-7Kq" secondAttribute="trailing" id="QFZ-sI-FTg"/>
-                                <constraint firstItem="Mw5-GF-3oQ" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="RFN-Kf-txX"/>
+                                <constraint firstItem="FKg-oH-VO0" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="EYc-R3-6nL"/>
                                 <constraint firstItem="7nf-Ia-7Kq" firstAttribute="top" secondItem="3Np-sH-ysD" secondAttribute="top" id="SU0-8W-BVB">
                                     <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
                                 </constraint>
-                                <constraint firstAttribute="trailing" secondItem="bIs-li-8bz" secondAttribute="trailing" id="UaC-ap-Ulp"/>
-                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="trailing" secondItem="Mw5-GF-3oQ" secondAttribute="trailing" id="fbA-Cy-O1e"/>
+                                <constraint firstItem="Mw5-GF-3oQ" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="SVc-0g-Xv7"/>
+                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="Wh6-f1-7XP"/>
+                                <constraint firstAttribute="trailing" secondItem="FKg-oH-VO0" secondAttribute="trailing" id="fyN-rW-gMQ"/>
                                 <constraint firstItem="Mw5-GF-3oQ" firstAttribute="top" secondItem="7nf-Ia-7Kq" secondAttribute="bottom" constant="1" id="hfD-i1-Fhe">
                                     <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
                                 </constraint>
-                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="j4G-mB-NeU"/>
-                                <constraint firstItem="bIs-li-8bz" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="s6c-op-QFh"/>
-                                <constraint firstItem="bIs-li-8bz" firstAttribute="top" secondItem="Mw5-GF-3oQ" secondAttribute="bottom" id="wPf-du-0AV"/>
+                                <constraint firstAttribute="bottom" secondItem="FKg-oH-VO0" secondAttribute="bottom" id="jJm-9C-H9D"/>
+                                <constraint firstAttribute="trailing" secondItem="Mw5-GF-3oQ" secondAttribute="trailing" id="qX4-wb-r4I"/>
+                                <constraint firstAttribute="trailing" secondItem="7nf-Ia-7Kq" secondAttribute="trailing" id="t9t-st-zOV"/>
+                                <constraint firstItem="FKg-oH-VO0" firstAttribute="top" secondItem="Mw5-GF-3oQ" secondAttribute="bottom" id="uYP-7E-3ks"/>
                             </constraints>
                             <variation key="default">
                                 <mask key="subviews">
@@ -226,15 +222,8 @@
                                     <exclude reference="Mw5-GF-3oQ"/>
                                 </mask>
                                 <mask key="constraints">
-                                    <exclude reference="QFZ-sI-FTg"/>
                                     <exclude reference="SU0-8W-BVB"/>
-                                    <exclude reference="fbA-Cy-O1e"/>
-                                    <exclude reference="j4G-mB-NeU"/>
-                                    <exclude reference="RFN-Kf-txX"/>
                                     <exclude reference="hfD-i1-Fhe"/>
-                                    <exclude reference="UaC-ap-Ulp"/>
-                                    <exclude reference="s6c-op-QFh"/>
-                                    <exclude reference="wPf-du-0AV"/>
                                 </mask>
                             </variation>
                             <variation key="heightClass=regular-widthClass=compact">
@@ -243,15 +232,8 @@
                                     <include reference="Mw5-GF-3oQ"/>
                                 </mask>
                                 <mask key="constraints">
-                                    <include reference="QFZ-sI-FTg"/>
                                     <include reference="SU0-8W-BVB"/>
-                                    <include reference="fbA-Cy-O1e"/>
-                                    <include reference="j4G-mB-NeU"/>
-                                    <include reference="RFN-Kf-txX"/>
                                     <include reference="hfD-i1-Fhe"/>
-                                    <include reference="UaC-ap-Ulp"/>
-                                    <include reference="s6c-op-QFh"/>
-                                    <include reference="wPf-du-0AV"/>
                                 </mask>
                             </variation>
                         </view>
@@ -352,8 +334,8 @@
                 </mask>
             </variation>
             <connections>
-                <outlet property="btnCancel" destination="EtP-9O-R3A" id="mr5-zY-bQM"/>
-                <outlet property="btnConfirm" destination="FKG-xS-HlM" id="zTF-29-eYq"/>
+                <outlet property="btnCancel" destination="IOO-Nc-3Aa" id="fSr-OH-aLg"/>
+                <outlet property="btnConfirm" destination="C2n-lo-raN" id="TR4-lH-iKs"/>
                 <outlet property="containerView" destination="3Np-sH-ysD" id="uJs-dG-r2k"/>
                 <outlet property="imgTitleBar" destination="GIP-xS-Bhg" id="HZ5-OD-3dY"/>
                 <outlet property="lblTitle" destination="IE2-24-gHl" id="DFB-ut-ky2"/>

+ 2 - 0
OneCable/Classes/JDFacade.m

@@ -940,6 +940,8 @@ static NSString *const ksKeychainArchiveData = @"_archiveData";
         }
     }
     
+    NSLog(@"getUrlWithCustAndGroupID str : %@, arr : %@", str, arr);
+    
     return [self getUrlWithArr:str arguments:arr];
 }
 

+ 1 - 1
OneCable/Classes/ViewControllers/RuelsScreens/ExternHeatPopupView.h

@@ -32,7 +32,7 @@
 @property (weak, nonatomic) IBOutlet CustomButton *btnSelect; // 지역 선택 버튼
 @property (weak, nonatomic) IBOutlet CustomTextField *txtLocation; // 기준지역 선택 박스
 @property (weak, nonatomic) IBOutlet CustomButton *btnPlus; // 플러스버튼
-@property (weak, nonatomic) IBOutlet CustomTextField *txtTemper;  // 온도입력
+@property (weak, nonatomic) IBOutlet CustomTextField *tfTemper;  // 온도입력
 
 //methods
 - (id)initFromNib;

+ 23 - 2
OneCable/Classes/ViewControllers/RuelsScreens/ExternHeatPopupView.m

@@ -30,6 +30,8 @@
     
     WeatherLocationPopupView *_cpopup;
     TemperaturePopupView *_tpopup;
+    
+    BOOL tempPlus;
 }
 
 @end
@@ -119,12 +121,19 @@
     _externHeatTrigger = externHeatTrigger;
 
     if (_externHeatTrigger.itemSubTypeCode && [_externHeatTrigger.itemSubTypeCode isEqualToString:ksItemSubTypeCodeHeat]) {//기존 데이터가 있을 경우,
+        
         ItemSubModel *subItem = _externHeatTrigger.heats[0];
         
         _btnOver.selected = [subItem.conditionTypeCode isEqualToString:ksConditionTypeCodeGreatOrEqual];
         _btnBelow.selected = !_btnOver.selected;
         
         _temperature = subItem.cmdclsValue;
+        
+        _btnZeroDegree.selected = [_temperature containsString:@"-"];
+        NSString *tempNumber = [_temperature stringByReplacingOccurrencesOfString:@"+" withString:@""];
+        tempNumber = [tempNumber stringByReplacingOccurrencesOfString:@"-" withString:@""];
+        
+        _tfTemper.text = tempNumber;
         _lblHeat.text = [NSString stringWithFormat:@"%@℃ 보다", _temperature];
         [_lblHeat setUnderLine:[NSString stringWithFormat:@"%@℃", _temperature]];
         
@@ -134,7 +143,7 @@
         _externHeatTrigger.itemSubTypeCode = ksItemSubTypeCodeHeat;
         
         _btnOver.selected = YES;
-        
+        _btnZeroDegree.selected = NO;
         _temperature = @"0";
         _lblHeat.text = @"0℃ 보다";
         [_lblHeat setUnderLine:@"0℃"];
@@ -146,8 +155,8 @@
 }
 
 - (void)setRefConditions:(NSMutableArray<ItemModel> *)refConditions {
-    _refConditions = refConditions;
     
+    _refConditions = refConditions;
     [TimePickerPopupView setRefConditions:_refConditions chkDays:_chkDays];
 }
 
@@ -199,6 +208,13 @@
 }
 
 #pragma mark - UI Events
+- (IBAction)changeTempPlusMinus:(id)sender {
+    
+    UIButton *btn = sender;
+    btn.selected = !btn.selected;
+    
+}
+
 - (IBAction)btnActionBelowOver:(id)sender {
     _btnBelow.selected = NO;
     _btnOver.selected = NO;
@@ -249,6 +265,7 @@
     }
 
     ItemSubModel *subItem = nil;
+    
     if (_externHeatTrigger.subItems && _externHeatTrigger.subItems.count) {
         subItem = _externHeatTrigger.subItems[0];
     } else {
@@ -257,6 +274,10 @@
         _externHeatTrigger.heats = (NSMutableArray<ItemSubModel> *)[[NSMutableArray alloc] init];
         [_externHeatTrigger.heats addObject:subItem];
     }
+    
+    _temperature = [NSString stringWithFormat:@"%@%@",
+                    _btnZeroDegree.selected ? @"-" : @"+",
+                    _tfTemper.text];
 
     //externHeats
     subItem.sourceId = _weatherLocation.commonCode;

+ 8 - 5
OneCable/Classes/ViewControllers/RuelsScreens/ExternHeatPopupView.xib

@@ -222,14 +222,17 @@
                                                         <action selector="btnActionBelowOver:" destination="qLf-va-EAG" eventType="touchUpInside" id="VOL-1q-AyD"/>
                                                     </connections>
                                                 </button>
-                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lG2-aU-aoq" customClass="CustomButton">
+                                                <button opaque="NO" tag="1000" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lG2-aU-aoq" customClass="CustomButton">
                                                     <rect key="frame" x="25" y="24" width="36" height="36"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="36" id="nWJ-JO-5lr"/>
                                                         <constraint firstAttribute="width" constant="36" id="vrh-Wj-jL4"/>
                                                     </constraints>
                                                     <state key="normal" backgroundImage="img_btn_temper_above"/>
-                                                    <state key="highlighted" backgroundImage="img_btn_temper_above_press"/>
+                                                    <state key="selected" backgroundImage="img_btn_temper_below"/>
+                                                    <connections>
+                                                        <action selector="changeTempPlusMinus:" destination="qLf-va-EAG" eventType="touchUpInside" id="7oV-oW-75t"/>
+                                                    </connections>
                                                 </button>
                                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2IO-bi-KXd">
                                                     <rect key="frame" x="0.0" y="0.0" width="25" height="84"/>
@@ -248,7 +251,7 @@
                                                         </constraint>
                                                     </constraints>
                                                     <fontDescription key="fontDescription" type="system" pointSize="22"/>
-                                                    <textInputTraits key="textInputTraits" keyboardType="numberPad" secureTextEntry="YES"/>
+                                                    <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
                                                     <userDefinedRuntimeAttributes>
                                                         <userDefinedRuntimeAttribute type="rect" keyPath="rectForCapBackground">
                                                             <rect key="value" x="16" y="16" width="16" height="16"/>
@@ -760,8 +763,8 @@
                 <outlet property="lblTitle" destination="IE2-24-gHl" id="DFB-ut-ky2"/>
                 <outlet property="maskingView" destination="4c3-gb-BwR" id="9bJ-5l-qJq"/>
                 <outlet property="popUpView" destination="sqq-aQ-dqD" id="BCO-MT-Cf2"/>
+                <outlet property="tfTemper" destination="oTn-Kh-f8b" id="SMQ-yH-d2l"/>
                 <outlet property="txtLocation" destination="olY-a6-PBm" id="yZy-LT-Blm"/>
-                <outlet property="txtTemper" destination="oTn-Kh-f8b" id="CCq-J8-Y8o"/>
                 <outletCollection property="chkDays" destination="1Oy-jS-Ud8" id="qSR-Ht-5MK"/>
                 <outletCollection property="chkDays" destination="tEs-LC-Apx" id="Xda-6P-3et"/>
                 <outletCollection property="chkDays" destination="q2d-7q-uU8" id="X6N-Re-1GY"/>
@@ -790,7 +793,7 @@
         <image name="common_toggle_right_press" width="43" height="36"/>
         <image name="common_toggle_right_select" width="43" height="36"/>
         <image name="img_btn_temper_above" width="36" height="36"/>
-        <image name="img_btn_temper_above_press" width="36" height="36"/>
+        <image name="img_btn_temper_below" width="36" height="36"/>
         <image name="img_common_temper_unit" width="24" height="36"/>
         <image name="img_input_round_bg_default" width="50" height="35"/>
         <image name="img_popup_bg_body" width="2" height="2"/>

+ 15 - 8
OneCable/Classes/ViewControllers/RuelsScreens/RulesAddViewController.m

@@ -211,7 +211,7 @@
 }
 
 - (void)viewWillDisappear:(BOOL)animated {
-    [self viewWillDisappear:animated];
+    [super viewWillDisappear:animated];
     
     [self removeObserverKeyboard] ;
 }
@@ -236,7 +236,6 @@
 }
 
 
-
 #pragma mark - init
 - (void)initProperties {
     _arrayForHeader = [[NSMutableArray alloc] init];
@@ -266,6 +265,7 @@
 
 
 - (void)prepareViewDidLoad {
+    
     [self requestDeviceListForAction:ksItemTypeCodeTrigger];
     [self requestDeviceListForAction:ksItemTypeCodeAction];
 }
@@ -280,7 +280,6 @@
 //    NSString *path = [NSString stringWithFormat:API_GET_ITEM_DEVICES, ksItemTypeCodeAction];
     NSString *path = [[JDFacade facade] getUrlWithCustAndGroupID:API_GET_ITEM_DEVICES arguments:arr];
     
-    
     [[RequestHandler handler] sendAsyncGetRequestAPIPath:path parameters:nil modelClass:[ItemListModel class] completion:^(id responseObject) {
         if (!responseObject) {//응답결과가 잘못되었거나 없을 경우,
             return;
@@ -297,7 +296,9 @@
                     ItemModel *actionDevice = [_actions objectKey:@"itemSubTypeCode" eqaulToString:ksItemSubTypeCodeDevice];
                     [self matchValueOfDevices:actionDevice devices:_actionDevices];
                 }
+                
             } else {
+                
                 _triggerDevices = fetchedItemList.list;
                 _conditionDevices = [(NSMutableArray<ItemModel> *)[NSMutableArray alloc] initWithArray:_triggerDevices copyItems:YES];
                 
@@ -1331,10 +1332,11 @@
 }
 
 - (void)btnAddActionTouched:(id)sender {
+    
     DeviceSelectPopupView *dpopup = [[DeviceSelectPopupView alloc] initFromNib];
     dpopup.refDevices = _actionDevices;
     dpopup.typeCode = ksItemTypeCodeTrigger;
-    
+
     [dpopup showWithCompletion:^(CustomAlertView *alertView, NSInteger buttonIndex) {
         if (buttonIndex == 0) {//ok
             DeviceNodePopupView *npopup = [[DeviceNodePopupView alloc] initFromNib];
@@ -1371,6 +1373,7 @@
 }
 
 - (void)btnAddPushMessageTouched:(id)sender {
+    
     ItemModel *pushItem = [_actions objectKey:@"itemSubTypeCode" eqaulToString:ksItemSubTypeCodeAppPush];
     if (!pushItem) {//디바이스 아이템이 없을 경우,
         pushItem = [[ItemModel alloc] init];
@@ -1391,9 +1394,11 @@
 
 
 - (void)btnDeleteTriggerTouched:(id)sender {
+    
      CustomButton *btnDelete = (CustomButton *)sender;
     
     ItemModel *item = btnDelete.value;
+    
     if ([item.itemSubTypeCode isEqualToString:ksItemSubTypeCodeDevice]) {//장치일 경우
         ItemSubModel *subItem = [item.subItems matchedObjectName:ksCustomRadioButtonStatus condition:YES];
         if (subItem) {
@@ -1494,6 +1499,12 @@
 
 
 
+- (IBAction)btnCancelTouched:(id)sender {
+    
+    [self dismissViewControllerAnimated:YES completion:nil];
+}
+
+
 
 #pragma mark - UI Events
 - (IBAction)btnConfirmTouched:(id)sender {
@@ -1573,10 +1584,6 @@
     }];
 }
 
-- (IBAction)btnCancelTouched:(id)sender {
-    [self dismissViewControllerAnimated:YES completion:nil];
-}
-
 #pragma mark - MemoryWarning
 - (void)didReceiveMemoryWarning
 {

+ 6 - 0
OneCable/Classes/ViewControllers/RuelsScreens/TriggerSelectPopupView.m

@@ -116,6 +116,9 @@
     [epopup showWithCompletion:^(CustomAlertView *alertView, NSInteger buttonIndex) {
         if (buttonIndex == 0) {//OK
             if (isNewTrigger) {
+                
+                NSLog(@"heatTrigger : %@", heatTrigger);
+                
                 [_refTriggers addObject:heatTrigger];
                 [super btnConfirmTouched:sender];
             }
@@ -124,12 +127,15 @@
 }
 
 - (IBAction)btnDeviceTouched:(id)sender {
+    
     DeviceSelectPopupView *dpopup = [[DeviceSelectPopupView alloc] initFromNib];
     dpopup.refDevices = _refDevices;
     dpopup.typeCode = ksItemTypeCodeTrigger;
     
     [dpopup showWithCompletion:^(CustomAlertView *alertView, NSInteger buttonIndex) {
+        
         if (buttonIndex == 0) {//ok
+            
             DeviceNodePopupView *npopup = [[DeviceNodePopupView alloc] initFromNib];
             npopup.refDevice = dpopup.selectedDevices[0];
             npopup.typeCode = ksItemTypeCodeTrigger;