eunmi.kim 8 gadi atpakaļ
vecāks
revīzija
65b4bee9f3

+ 1 - 1
OneCable/Base.lproj/Main.storyboard

@@ -5969,7 +5969,7 @@
                                                 <rect key="frame" x="0.0" y="28" width="320" height="151"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="OiY-nb-fUX" id="u2m-Xz-g6m">
-                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="151"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="150"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6Qt-zh-SIL" userLabel="View - cell">

+ 14 - 14
OneCable/Base.lproj/Rules.storyboard

@@ -231,12 +231,12 @@
                                             </mask>
                                         </variation>
                                     </view>
-                                    <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="115" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="NbQ-kG-vPj" customClass="CustomTableView">
-                                        <rect key="frame" x="0.0" y="70" width="320" height="498"/>
+                                    <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="77" sectionHeaderHeight="1" sectionFooterHeight="1" translatesAutoresizingMaskIntoConstraints="NO" id="NbQ-kG-vPj" customClass="CustomTableView">
+                                        <rect key="frame" x="0.0" y="70" width="320" height="444"/>
                                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                         <prototypes>
                                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="CellIdentifier" rowHeight="77" id="seo-Ln-j89" customClass="RulesTableViewCell">
-                                                <rect key="frame" x="0.0" y="28" width="320" height="77"/>
+                                                <rect key="frame" x="0.0" y="1" width="320" height="77"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="seo-Ln-j89" id="90i-G5-Obo">
                                                     <rect key="frame" x="0.0" y="0.0" width="320" height="77"/>
@@ -336,7 +336,7 @@
                                                 </connections>
                                             </tableViewCell>
                                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="AddCellIdentifier" rowHeight="135" id="2Cp-uM-Hvw" customClass="RulesCreateTableViewCell">
-                                                <rect key="frame" x="0.0" y="105" width="320" height="135"/>
+                                                <rect key="frame" x="0.0" y="78" width="320" height="135"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="2Cp-uM-Hvw" id="oE6-vc-qee">
                                                     <rect key="frame" x="0.0" y="0.0" width="320" height="135"/>
@@ -431,7 +431,7 @@
                                     <constraint firstItem="NbQ-kG-vPj" firstAttribute="leading" secondItem="YQj-KO-tgi" secondAttribute="leading" id="Fur-yN-WZT"/>
                                     <constraint firstItem="SuE-qN-Zxf" firstAttribute="top" secondItem="ygd-Rh-dSU" secondAttribute="bottom" id="Grt-N3-Vnn"/>
                                     <constraint firstAttribute="bottom" secondItem="SuE-qN-Zxf" secondAttribute="bottom" constant="54" id="Iux-3I-miJ"/>
-                                    <constraint firstAttribute="bottom" secondItem="NbQ-kG-vPj" secondAttribute="bottom" id="KbU-ky-DWz"/>
+                                    <constraint firstAttribute="bottom" secondItem="NbQ-kG-vPj" secondAttribute="bottom" constant="54" id="KbU-ky-DWz"/>
                                     <constraint firstAttribute="trailing" secondItem="ygd-Rh-dSU" secondAttribute="trailing" id="Kwe-L0-Kj7"/>
                                     <constraint firstItem="DZt-QG-oeT" firstAttribute="leading" secondItem="YQj-KO-tgi" secondAttribute="leading" id="LzN-DF-J5m"/>
                                     <constraint firstAttribute="trailing" secondItem="pzq-Zx-Yfh" secondAttribute="trailing" id="PKP-5U-c0w"/>
@@ -3336,7 +3336,7 @@
                                 <color key="separatorColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
                                 <prototypes>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="TitleCellIdentifier" rowHeight="95" id="C3q-Tu-fkj" customClass="RulesDetailTitleTableViewCell">
-                                        <rect key="frame" x="0.0" y="55.5" width="320" height="95"/>
+                                        <rect key="frame" x="0.0" y="56" width="320" height="95"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="C3q-Tu-fkj" id="eFT-zg-dzR">
                                             <rect key="frame" x="0.0" y="0.0" width="320" height="94"/>
@@ -3406,7 +3406,7 @@
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="HeaderCellIdentifier" rowHeight="56" id="sUn-TA-1qW" customClass="RulesDetailHeaderTableViewCell">
-                                        <rect key="frame" x="0.0" y="150.5" width="320" height="56"/>
+                                        <rect key="frame" x="0.0" y="151" width="320" height="56"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="sUn-TA-1qW" id="Gfk-T5-xzJ">
                                             <rect key="frame" x="0.0" y="0.0" width="320" height="55"/>
@@ -3451,7 +3451,7 @@
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="RulesCellIdentifier" rowHeight="80" id="KwC-wU-t0G" userLabel="RulesCellIdentifier" customClass="RulesDetailTableViewCell">
-                                        <rect key="frame" x="0.0" y="206.5" width="320" height="80"/>
+                                        <rect key="frame" x="0.0" y="207" width="320" height="80"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KwC-wU-t0G" id="mbB-ah-EzW">
                                             <rect key="frame" x="0.0" y="0.0" width="320" height="79"/>
@@ -3558,7 +3558,7 @@
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="PushCellIdentifier" rowHeight="80" id="O2M-nJ-QAx" customClass="RulesDetailPushTableViewCell">
-                                        <rect key="frame" x="0.0" y="286.5" width="320" height="80"/>
+                                        <rect key="frame" x="0.0" y="287" width="320" height="80"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="O2M-nJ-QAx" id="u9g-Vv-oaW">
                                             <rect key="frame" x="0.0" y="0.0" width="320" height="79"/>
@@ -3627,7 +3627,7 @@
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ConditionHeaderCellIdentifier" rowHeight="81" id="sol-wu-t7q" userLabel="ConditionHeaderCellIdentifier" customClass="RulesDetailConditionHeaderTableViewCell">
-                                        <rect key="frame" x="0.0" y="366.5" width="320" height="81"/>
+                                        <rect key="frame" x="0.0" y="367" width="320" height="81"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="sol-wu-t7q" id="x2d-Ob-O1p">
                                             <rect key="frame" x="0.0" y="0.0" width="320" height="80"/>
@@ -3637,7 +3637,7 @@
                                         <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ConditionCellIdentifier" rowHeight="234" id="F60-Jy-GKn" customClass="RulesDetailConditionTableViewCell">
-                                        <rect key="frame" x="0.0" y="447.5" width="320" height="234"/>
+                                        <rect key="frame" x="0.0" y="448" width="320" height="234"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="F60-Jy-GKn" id="41z-cO-ScW">
                                             <rect key="frame" x="0.0" y="0.0" width="320" height="233"/>
@@ -3667,7 +3667,7 @@
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ExecutionCellIdentifier" rowHeight="112" id="PeZ-UO-vg2" customClass="RulesDetailExecutionTableViewCell">
-                                        <rect key="frame" x="0.0" y="681.5" width="320" height="112"/>
+                                        <rect key="frame" x="0.0" y="682" width="320" height="112"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="PeZ-UO-vg2" id="0m9-Sf-UwG">
                                             <rect key="frame" x="0.0" y="0.0" width="320" height="111"/>
@@ -3714,7 +3714,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="12" width="56" height="32"/>
+                                                                    <rect key="frame" x="248" y="11.5" width="56" height="32"/>
                                                                     <constraints>
                                                                         <constraint firstAttribute="height" constant="32" id="TMX-zt-Vpu"/>
                                                                         <constraint firstAttribute="width" constant="54" id="nTi-dr-Efd"/>
@@ -3832,7 +3832,7 @@
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="FooterCellIdentifier" rowHeight="0.0" id="sLC-uE-eKS" customClass="RulesDetailFooterTableViewCell">
-                                        <rect key="frame" x="0.0" y="793.5" width="320" height="0.0"/>
+                                        <rect key="frame" x="0.0" y="794" width="320" height="0.0"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="sLC-uE-eKS" id="nmS-Rg-aZV">
                                             <rect key="frame" x="0.0" y="-0.5" width="320" height="0.5"/>

+ 2 - 1
OneCable/Classes/ViewControllers/RuelsScreens/RulesAddViewController.m

@@ -393,8 +393,9 @@
     NSArray *triggers       = [self items:_triggers];
     NSArray *actions        = [self items:_actions];
     
+    
     //추가 푸시
-    if (_txvMessage.text.length > 0) {
+    if (_txvMessage.text.length > 0 && !EQUALS(_txvMessage.text, _txvMessage.placeHolder)) {
         
         NSMutableArray *mutableActions = [actions mutableCopy];
         [mutableActions addObjectsFromArray:[self items:[self makePushData]]];

+ 4 - 0
OneCable/Classes/ViewControllers/RuelsScreens/RulesViewController.m

@@ -430,12 +430,15 @@
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
     
     NSInteger count = 1;
+    
     if (_ruleList.count > 0 && section == 0) {//규칙이 있을 경우,
         count = _ruleList.count;
     }
+    
     return count;
 }
 
+
 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
 
     CGFloat height = kfRulesTableViewCellHeight;
@@ -452,6 +455,7 @@
 //        height = _ruleList.count ? 190.0f : IPHONE_HEIGHT - kfNavigationBarHeight;
 //        _tableView.scrollEnabled = _ruleList.count;
 //    }
+
     return height;
 }
 

+ 6 - 1
OneCable/Classes/ViewControllers/ThingsScreens/ThingsViewController.m

@@ -1044,7 +1044,12 @@
         DeviceModel *device =_deviceList[indexPath.row];
         cell.indexPath = indexPath;
         
-        cell.lblDeviceName.text = device.prdName;
+        if ([device.prdName isEqualToString:device.prdUserName] || [device.prdUserName isEqualToString:@""]) {
+            cell.lblDeviceName.text = device.prdName;
+        } else {
+            cell.lblDeviceName.text = device.prdUserName;
+        }
+        
         
         //        [cell.btnDevice sd_setImageWithURL:[NSURL URLWithString:device.imageFileName] forState:UIControlStateNormal
         //                          placeholderImage:nil options:SDWebImageRefreshCached completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {