Jason Lee il y a 10 ans
Parent
commit
3742698e78

+ 6 - 0
kneet2.xcodeproj/project.pbxproj

@@ -107,6 +107,7 @@
 		A19E83CF1BD9F6C2002B92DB /* QRCodeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A19E83CC1BD9F6C2002B92DB /* QRCodeViewController.m */; };
 		A19E83D21BDA0815002B92DB /* HomeHubStartViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A19E83D11BDA0815002B92DB /* HomeHubStartViewController.m */; };
 		A1C64BBB1BD7594D00701841 /* InvitationAnswerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A1C64BBA1BD7594D00701841 /* InvitationAnswerViewController.m */; };
+		A1C964381BE35492002F9014 /* HomeModeUpdateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A1C964371BE35492002F9014 /* HomeModeUpdateViewController.m */; };
 		A1CA61721BC23397004F807F /* JDProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = A1CA61711BC23397004F807F /* JDProgressHUD.m */; };
 		A1CB82B41BCE1CCB00DA3309 /* MessageBoxViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A1CB82B31BCE1CCB00DA3309 /* MessageBoxViewController.m */; };
 		A1E874ED1BDA21530071EED4 /* HomeHubChangeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A1E874EA1BDA21530071EED4 /* HomeHubChangeViewController.m */; };
@@ -373,6 +374,8 @@
 		A19E83D11BDA0815002B92DB /* HomeHubStartViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeHubStartViewController.m; sourceTree = "<group>"; };
 		A1C64BB91BD7594D00701841 /* InvitationAnswerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InvitationAnswerViewController.h; path = MainScreens/InvitationAnswerViewController.h; sourceTree = "<group>"; };
 		A1C64BBA1BD7594D00701841 /* InvitationAnswerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = InvitationAnswerViewController.m; path = MainScreens/InvitationAnswerViewController.m; sourceTree = "<group>"; };
+		A1C964361BE35492002F9014 /* HomeModeUpdateViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HomeModeUpdateViewController.h; path = MainScreens/HomeModeUpdateViewController.h; sourceTree = "<group>"; };
+		A1C964371BE35492002F9014 /* HomeModeUpdateViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HomeModeUpdateViewController.m; path = MainScreens/HomeModeUpdateViewController.m; sourceTree = "<group>"; };
 		A1CA61701BC23397004F807F /* JDProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JDProgressHUD.h; sourceTree = "<group>"; };
 		A1CA61711BC23397004F807F /* JDProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JDProgressHUD.m; sourceTree = "<group>"; };
 		A1CB82B21BCE1CCB00DA3309 /* MessageBoxViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MessageBoxViewController.h; path = MainScreens/MessageBoxViewController.h; sourceTree = "<group>"; };
@@ -825,6 +828,8 @@
 				A18085351BC646820076973C /* NoticeViewController.m */,
 				A1CB82B21BCE1CCB00DA3309 /* MessageBoxViewController.h */,
 				A1CB82B31BCE1CCB00DA3309 /* MessageBoxViewController.m */,
+				A1C964361BE35492002F9014 /* HomeModeUpdateViewController.h */,
+				A1C964371BE35492002F9014 /* HomeModeUpdateViewController.m */,
 			);
 			name = MainScreens;
 			sourceTree = "<group>";
@@ -1267,6 +1272,7 @@
 				A12BBCB81BA9527300DE1B94 /* UIDevice-Reachability.m in Sources */,
 				A163664A1BBD11FD009A1A16 /* ItemModel.m in Sources */,
 				A12BBCD81BA9527300DE1B94 /* JDTableViewController.m in Sources */,
+				A1C964381BE35492002F9014 /* HomeModeUpdateViewController.m in Sources */,
 				A19E83C01BD9F00B002B92DB /* HomeHubThirdStepViewController.m in Sources */,
 				A12BBCD11BA9527300DE1B94 /* JDObject.m in Sources */,
 				A12BBCCD1BA9527300DE1B94 /* SelectButton.m in Sources */,

+ 6 - 0
kneet2.xcworkspace/contents.xcworkspacedata

@@ -1,6 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Workspace
    version = "1.0">
+   <FileRef
+      location = "group:kneet2/Classes/ViewControllers/MainScreens/HomeModeUpdateViewController.h">
+   </FileRef>
+   <FileRef
+      location = "group:kneet2/Classes/ViewControllers/MainScreens/HomeModeUpdateViewController.m">
+   </FileRef>
    <FileRef
       location = "group:kneet2.xcodeproj">
    </FileRef>

+ 287 - 2
kneet2/Base.lproj/Main.storyboard

@@ -544,6 +544,9 @@
                                                 <include reference="fv5-9y-PsZ"/>
                                             </mask>
                                         </variation>
+                                        <connections>
+                                            <action selector="btnModeHomeTouched:" destination="y8X-SP-N9c" eventType="touchUpInside" id="OxK-D6-miq"/>
+                                        </connections>
                                     </button>
                                     <button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="253" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FsK-Hc-2nk" customClass="CustomButton">
                                         <rect key="frame" x="-23" y="-15" width="46" height="30"/>
@@ -562,6 +565,9 @@
                                                 <include reference="kwd-y1-oAb"/>
                                             </mask>
                                         </variation>
+                                        <connections>
+                                            <action selector="btnModeAwayTouched:" destination="y8X-SP-N9c" eventType="touchUpInside" id="YcP-Bb-ZQw"/>
+                                        </connections>
                                     </button>
                                     <button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="252" placeholderIntrinsicWidth="46" placeholderIntrinsicHeight="30" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0qf-Nc-v3C" customClass="CustomButton">
                                         <rect key="frame" x="-23" y="-15" width="46" height="30"/>
@@ -580,6 +586,9 @@
                                                 <include reference="044-hq-FWe"/>
                                             </mask>
                                         </variation>
+                                        <connections>
+                                            <action selector="btnModeMorningTouched:" destination="y8X-SP-N9c" eventType="touchUpInside" id="2Ao-XZ-gA6"/>
+                                        </connections>
                                     </button>
                                     <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JAU-za-I2Q" customClass="CustomButton">
                                         <rect key="frame" x="-23" y="-15" width="46" height="30"/>
@@ -601,6 +610,9 @@
                                                 <include reference="cVM-hb-LBe"/>
                                             </mask>
                                         </variation>
+                                        <connections>
+                                            <action selector="btnModeNightTouched:" destination="y8X-SP-N9c" eventType="touchUpInside" id="rwn-Wh-eMP"/>
+                                        </connections>
                                     </button>
                                     <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="120" placeholderIntrinsicHeight="35" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cja-ty-PC5" customClass="CustomButton">
                                         <rect key="frame" x="-23" y="-15" width="46" height="30"/>
@@ -924,7 +936,12 @@
                     </view>
                     <simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
                     <connections>
+                        <outlet property="btnHomeHub" destination="yWp-oq-Nog" id="OPd-mQ-v7m"/>
                         <outlet property="btnHomegrpImage" destination="aml-ht-jPD" id="I1S-45-Pu0"/>
+                        <outlet property="btnModeAway" destination="FsK-Hc-2nk" id="LBI-1z-fT9"/>
+                        <outlet property="btnModeHome" destination="wMl-Kh-gr1" id="hzt-NK-x7e"/>
+                        <outlet property="btnModeMorning" destination="0qf-Nc-v3C" id="1tl-jz-JNM"/>
+                        <outlet property="btnModeNight" destination="JAU-za-I2Q" id="nJA-IY-lHm"/>
                         <outlet property="constraintExpandViewTop" destination="BNy-Md-iRV" id="z7v-B3-RLi"/>
                         <outlet property="scrollView" destination="Ewm-zz-hf9" id="mGL-QO-9kk"/>
                         <outlet property="tabBar" destination="IEy-w3-JG7" id="ytg-8v-AxW"/>
@@ -1651,10 +1668,10 @@
                                         <color key="backgroundColor" red="0.90196079019999997" green="0.90196079019999997" blue="0.90196079019999997" alpha="1" colorSpace="calibratedRGB"/>
                                         <prototypes>
                                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="NoticeCellIdentifier" rowHeight="120" id="T3G-5j-2mg" customClass="NoticeTableViewCell">
-                                                <rect key="frame" x="0.0" y="22" width="320" height="100"/>
+                                                <rect key="frame" x="0.0" y="22" width="320" height="120"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="T3G-5j-2mg" id="jBD-gu-tIo">
-                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="99"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="119"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ao4-Ln-DUx" userLabel="View - Cell">
@@ -3366,6 +3383,274 @@
             </objects>
             <point key="canvasLocation" x="702" y="871.5"/>
         </scene>
+        <!--Home Mode Update View Controller-->
+        <scene sceneID="VMB-2A-V5n">
+            <objects>
+                <viewController storyboardIdentifier="HomeModeUpdateViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="F7m-Eg-1WY" customClass="HomeModeUpdateViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="xr8-J1-1mW"/>
+                        <viewControllerLayoutGuide type="bottom" id="UdN-Ge-x8c"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="7hx-Q3-gXO" userLabel="View - ViewController">
+                        <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Izn-Dc-zAA" userLabel="View - Main">
+                                <rect key="frame" x="0.0" y="80" width="320" height="488"/>
+                                <subviews>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KbK-eA-Ahh" userLabel="View - container">
+                                        <rect key="frame" x="0.0" y="182" width="320" height="60"/>
+                                        <subviews>
+                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6wF-tc-wmk" customClass="CustomLabel">
+                                                <rect key="frame" x="20" y="20" width="280" height="20"/>
+                                                <animations/>
+                                                <constraints>
+                                                    <constraint firstAttribute="height" constant="87" id="Bbw-C6-oRY">
+                                                        <variation key="heightClass=regular-widthClass=compact" constant="141"/>
+                                                    </constraint>
+                                                    <constraint firstAttribute="width" constant="56" id="kLG-b3-lsr">
+                                                        <variation key="heightClass=regular-widthClass=compact" constant="240"/>
+                                                    </constraint>
+                                                </constraints>
+                                                <string key="text">잘 돌아왔어요!

쾌적한 귀가모드를 
실행할까요?</string>
+                                                <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
+                                                <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                <nil key="highlightedColor"/>
+                                                <variation key="default">
+                                                    <mask key="constraints">
+                                                        <exclude reference="Bbw-C6-oRY"/>
+                                                        <exclude reference="kLG-b3-lsr"/>
+                                                    </mask>
+                                                </variation>
+                                                <variation key="heightClass=regular-widthClass=compact">
+                                                    <mask key="constraints">
+                                                        <include reference="Bbw-C6-oRY"/>
+                                                        <include reference="kLG-b3-lsr"/>
+                                                    </mask>
+                                                </variation>
+                                            </label>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Haw-bH-C8O" customClass="CustomButton">
+                                                <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                <animations/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" constant="170" id="VVs-n1-QQi"/>
+                                                    <constraint firstAttribute="height" constant="170" id="hKY-Rt-LZJ"/>
+                                                </constraints>
+                                                <state key="normal" title="귀가"/>
+                                                <variation key="default">
+                                                    <mask key="constraints">
+                                                        <exclude reference="VVs-n1-QQi"/>
+                                                        <exclude reference="hKY-Rt-LZJ"/>
+                                                    </mask>
+                                                </variation>
+                                                <variation key="heightClass=regular-widthClass=compact">
+                                                    <mask key="constraints">
+                                                        <include reference="VVs-n1-QQi"/>
+                                                        <include reference="hKY-Rt-LZJ"/>
+                                                    </mask>
+                                                </variation>
+                                                <connections>
+                                                    <action selector="btnExecuteTouched:" destination="F7m-Eg-1WY" eventType="touchUpInside" id="Gqf-R1-xhr"/>
+                                                </connections>
+                                            </button>
+                                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="RbW-H3-pSU" customClass="CustomImageView">
+                                                <rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
+                                                <animations/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" constant="50" id="Rys-6r-69T"/>
+                                                    <constraint firstAttribute="height" constant="50" id="vEC-EC-50H"/>
+                                                </constraints>
+                                                <variation key="default">
+                                                    <mask key="constraints">
+                                                        <exclude reference="Rys-6r-69T"/>
+                                                        <exclude reference="vEC-EC-50H"/>
+                                                    </mask>
+                                                </variation>
+                                                <variation key="heightClass=regular-widthClass=compact">
+                                                    <mask key="constraints">
+                                                        <include reference="Rys-6r-69T"/>
+                                                        <include reference="vEC-EC-50H"/>
+                                                    </mask>
+                                                </variation>
+                                            </imageView>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="N6e-EH-VFp" customClass="CustomButton">
+                                                <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                <animations/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" constant="32" id="7Fp-OB-Prf"/>
+                                                    <constraint firstAttribute="height" constant="35" id="9Ku-Dg-Kot"/>
+                                                </constraints>
+                                                <state key="normal" title="설정">
+                                                    <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                </state>
+                                                <variation key="default">
+                                                    <mask key="constraints">
+                                                        <exclude reference="7Fp-OB-Prf"/>
+                                                        <exclude reference="9Ku-Dg-Kot"/>
+                                                    </mask>
+                                                </variation>
+                                                <variation key="heightClass=regular-widthClass=compact">
+                                                    <mask key="constraints">
+                                                        <include reference="7Fp-OB-Prf"/>
+                                                        <include reference="9Ku-Dg-Kot"/>
+                                                    </mask>
+                                                </variation>
+                                                <connections>
+                                                    <action selector="btnSettingTouched:" destination="F7m-Eg-1WY" eventType="touchUpInside" id="pk9-jN-cgd"/>
+                                                </connections>
+                                            </button>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DUt-WV-M2I" customClass="CustomButton">
+                                                <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                <animations/>
+                                                <constraints>
+                                                    <constraint firstAttribute="height" constant="35" id="MAh-Xq-DSE"/>
+                                                    <constraint firstAttribute="width" constant="32" id="XD1-cp-AxZ"/>
+                                                </constraints>
+                                                <state key="normal" title="닫기">
+                                                    <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                </state>
+                                                <variation key="default">
+                                                    <mask key="constraints">
+                                                        <exclude reference="MAh-Xq-DSE"/>
+                                                        <exclude reference="XD1-cp-AxZ"/>
+                                                    </mask>
+                                                </variation>
+                                                <variation key="heightClass=regular-widthClass=compact">
+                                                    <mask key="constraints">
+                                                        <include reference="MAh-Xq-DSE"/>
+                                                        <include reference="XD1-cp-AxZ"/>
+                                                    </mask>
+                                                </variation>
+                                                <connections>
+                                                    <action selector="btnCloseTouched:" destination="F7m-Eg-1WY" eventType="touchUpInside" id="Tgg-OQ-fcn"/>
+                                                </connections>
+                                            </button>
+                                        </subviews>
+                                        <animations/>
+                                        <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
+                                        <constraints>
+                                            <constraint firstItem="Haw-bH-C8O" firstAttribute="centerY" secondItem="KbK-eA-Ahh" secondAttribute="centerY" id="8HI-e0-Z1S"/>
+                                            <constraint firstItem="RbW-H3-pSU" firstAttribute="centerX" secondItem="Haw-bH-C8O" secondAttribute="centerX" id="JgO-Q0-vBT"/>
+                                            <constraint firstItem="Haw-bH-C8O" firstAttribute="centerX" secondItem="KbK-eA-Ahh" secondAttribute="centerX" id="Ln4-gb-8aW"/>
+                                            <constraint firstItem="RbW-H3-pSU" firstAttribute="top" secondItem="Haw-bH-C8O" secondAttribute="bottom" constant="11" id="WZd-K2-Fnv"/>
+                                            <constraint firstItem="6wF-tc-wmk" firstAttribute="centerX" secondItem="KbK-eA-Ahh" secondAttribute="centerX" id="cb9-9U-ahx"/>
+                                            <constraint firstItem="6wF-tc-wmk" firstAttribute="top" secondItem="KbK-eA-Ahh" secondAttribute="top" constant="50" id="eHI-wB-0C9"/>
+                                            <constraint firstAttribute="bottom" secondItem="N6e-EH-VFp" secondAttribute="bottom" constant="20" id="eTd-QV-oW4"/>
+                                            <constraint firstAttribute="bottom" secondItem="DUt-WV-M2I" secondAttribute="bottom" constant="20" id="fN2-mP-jvm"/>
+                                            <constraint firstItem="N6e-EH-VFp" firstAttribute="leading" secondItem="KbK-eA-Ahh" secondAttribute="leading" constant="20" id="twp-79-gru"/>
+                                            <constraint firstAttribute="trailing" secondItem="DUt-WV-M2I" secondAttribute="trailing" constant="20" id="yIp-W0-aOH"/>
+                                        </constraints>
+                                        <variation key="default">
+                                            <mask key="subviews">
+                                                <exclude reference="Haw-bH-C8O"/>
+                                                <exclude reference="RbW-H3-pSU"/>
+                                                <exclude reference="N6e-EH-VFp"/>
+                                                <exclude reference="DUt-WV-M2I"/>
+                                            </mask>
+                                            <mask key="constraints">
+                                                <exclude reference="cb9-9U-ahx"/>
+                                                <exclude reference="eHI-wB-0C9"/>
+                                                <exclude reference="8HI-e0-Z1S"/>
+                                                <exclude reference="Ln4-gb-8aW"/>
+                                                <exclude reference="JgO-Q0-vBT"/>
+                                                <exclude reference="WZd-K2-Fnv"/>
+                                                <exclude reference="eTd-QV-oW4"/>
+                                                <exclude reference="twp-79-gru"/>
+                                                <exclude reference="fN2-mP-jvm"/>
+                                                <exclude reference="yIp-W0-aOH"/>
+                                            </mask>
+                                        </variation>
+                                        <variation key="heightClass=regular-widthClass=compact">
+                                            <mask key="subviews">
+                                                <include reference="Haw-bH-C8O"/>
+                                                <include reference="RbW-H3-pSU"/>
+                                                <include reference="N6e-EH-VFp"/>
+                                                <include reference="DUt-WV-M2I"/>
+                                            </mask>
+                                            <mask key="constraints">
+                                                <include reference="cb9-9U-ahx"/>
+                                                <include reference="eHI-wB-0C9"/>
+                                                <include reference="8HI-e0-Z1S"/>
+                                                <include reference="Ln4-gb-8aW"/>
+                                                <include reference="JgO-Q0-vBT"/>
+                                                <include reference="WZd-K2-Fnv"/>
+                                                <include reference="eTd-QV-oW4"/>
+                                                <include reference="twp-79-gru"/>
+                                                <include reference="fN2-mP-jvm"/>
+                                                <include reference="yIp-W0-aOH"/>
+                                            </mask>
+                                        </variation>
+                                    </view>
+                                </subviews>
+                                <animations/>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                                <constraints>
+                                    <constraint firstItem="KbK-eA-Ahh" firstAttribute="top" secondItem="Izn-Dc-zAA" secondAttribute="top" id="8ZA-bJ-NKh"/>
+                                    <constraint firstAttribute="bottom" secondItem="KbK-eA-Ahh" secondAttribute="bottom" id="GCD-dA-uiV"/>
+                                    <constraint firstAttribute="trailing" secondItem="KbK-eA-Ahh" secondAttribute="trailing" id="GuQ-z7-spY"/>
+                                    <constraint firstItem="KbK-eA-Ahh" firstAttribute="leading" secondItem="Izn-Dc-zAA" secondAttribute="leading" id="HWa-JE-aAD"/>
+                                </constraints>
+                                <variation key="default">
+                                    <mask key="constraints">
+                                        <exclude reference="8ZA-bJ-NKh"/>
+                                        <exclude reference="GCD-dA-uiV"/>
+                                        <exclude reference="GuQ-z7-spY"/>
+                                        <exclude reference="HWa-JE-aAD"/>
+                                    </mask>
+                                </variation>
+                                <variation key="heightClass=regular-widthClass=compact">
+                                    <mask key="constraints">
+                                        <include reference="8ZA-bJ-NKh"/>
+                                        <include reference="GCD-dA-uiV"/>
+                                        <include reference="GuQ-z7-spY"/>
+                                        <include reference="HWa-JE-aAD"/>
+                                    </mask>
+                                </variation>
+                            </view>
+                        </subviews>
+                        <animations/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                        <constraints>
+                            <constraint firstItem="UdN-Ge-x8c" firstAttribute="top" secondItem="Izn-Dc-zAA" secondAttribute="bottom" id="Ept-qc-yxz"/>
+                            <constraint firstAttribute="trailing" secondItem="Izn-Dc-zAA" secondAttribute="trailing" id="Fwm-ta-siT"/>
+                            <constraint firstItem="Izn-Dc-zAA" firstAttribute="leading" secondItem="7hx-Q3-gXO" secondAttribute="leading" id="Odl-ZN-Sns"/>
+                            <constraint firstItem="Izn-Dc-zAA" firstAttribute="top" secondItem="7hx-Q3-gXO" secondAttribute="top" id="eYT-DM-raD"/>
+                        </constraints>
+                        <variation key="default">
+                            <mask key="subviews">
+                                <exclude reference="Izn-Dc-zAA"/>
+                            </mask>
+                            <mask key="constraints">
+                                <exclude reference="Ept-qc-yxz"/>
+                                <exclude reference="Odl-ZN-Sns"/>
+                                <exclude reference="Fwm-ta-siT"/>
+                                <exclude reference="eYT-DM-raD"/>
+                            </mask>
+                        </variation>
+                        <variation key="heightClass=regular-widthClass=compact">
+                            <mask key="subviews">
+                                <include reference="Izn-Dc-zAA"/>
+                            </mask>
+                            <mask key="constraints">
+                                <include reference="Ept-qc-yxz"/>
+                                <include reference="Odl-ZN-Sns"/>
+                                <include reference="Fwm-ta-siT"/>
+                                <include reference="eYT-DM-raD"/>
+                            </mask>
+                        </variation>
+                    </view>
+                    <simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
+                    <connections>
+                        <outlet property="btnExecute" destination="Haw-bH-C8O" id="Tei-sm-aLC"/>
+                        <outlet property="btnSetting" destination="N6e-EH-VFp" id="N9s-TQ-2Cn"/>
+                        <outlet property="imgvMode" destination="RbW-H3-pSU" id="R6G-dA-o2w"/>
+                        <outlet property="lblMessage" destination="6wF-tc-wmk" id="uu6-Wg-SqY"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="4Z9-d9-vgz" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="2485.5" y="871.5"/>
+        </scene>
     </scenes>
     <resources>
         <image name="common_checkbox_checked" width="25" height="25"/>

+ 5 - 0
kneet2/Classes/Definitions.h

@@ -196,6 +196,11 @@ typedef NS_ENUM(NSInteger, KNMenuId) {
     KNMenuIdTutorial
 };
 
+#define HOME_MODE_HOME      @"HOME"
+#define HOME_MODE_AWAY      @"AWAY"
+#define HOME_MODE_MORNING   @"MORNING"
+#define HOME_MODE_NIGHT     @"NIGHT"
+
 #define MOBILE_SERVICE_ID       @"20001"     //for kneet
 #define MOBILE_DEVICE_TYPE      @"MI"        //디바이스 타입
 

+ 33 - 0
kneet2/Classes/ViewControllers/MainScreens/HomeModeUpdateViewController.h

@@ -0,0 +1,33 @@
+//
+//  HomeModeUpdateViewController.h
+//  
+//
+//  Created by Jason Lee on 10/30/15.
+//
+//
+
+#import "JDViewController.h"
+
+
+@class ModeModel;
+@class CustomLabel;
+@class CustomButton;
+@class CustomImageView;
+
+@interface HomeModeUpdateViewController : JDViewController
+
+
+#pragma mark - Properties
+@property (weak, nonatomic) ModeModel *mode;
+
+@property (weak, nonatomic) IBOutlet CustomLabel *lblMessage;
+@property (weak, nonatomic) IBOutlet CustomButton *btnExecute;
+@property (weak, nonatomic) IBOutlet CustomImageView *imgvMode;
+@property (weak, nonatomic) IBOutlet CustomButton *btnSetting;
+
+#pragma mark - Instance Methods
+- (IBAction)btnExecuteTouched:(id)sender;
+- (IBAction)btnSettingTouched:(id)sender;
+- (IBAction)btnCloseTouched:(id)sender;
+
+@end

+ 137 - 0
kneet2/Classes/ViewControllers/MainScreens/HomeModeUpdateViewController.m

@@ -0,0 +1,137 @@
+//
+//  HomeModeUpdateViewController.m
+//  
+//
+//  Created by Jason Lee on 10/30/15.
+//
+//
+#import "JDObject.h"
+
+#import "CustomButton.h"
+#import "CustomLabel.h"
+#import "CustomImageView.h"
+
+#import "RequestHandler.h"
+#import "JDJSONModel.h"
+
+#import "HomeModeUpdateViewController.h"
+#import "ModeModel.h"
+
+
+@interface HomeModeUpdateViewController () {
+
+}
+@end
+
+
+#pragma mark - Class Definition
+
+@implementation HomeModeUpdateViewController
+
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    
+    [self initUI];
+    [self prepareViewDidLoad];
+}
+
+
+- (void)initUI {
+    
+    NSString *message = nil, *highlightMessage = nil;
+    NSString *btnTitle = nil;
+    if ([_mode.modeId isEqualToString:HOME_MODE_HOME]) {
+        btnTitle = @"귀가";
+        highlightMessage = @"잘 돌아왔어요!";
+        message = @"쾌적한 귀가모드를 \r실행할까요?";
+        
+    } else if ([_mode.modeId isEqualToString:HOME_MODE_AWAY]) {
+        btnTitle = @"외출";
+        highlightMessage = @"안녕히 다녀오세요!";
+        message = @"안전한 외출모드를 \r실행할까요?";
+        
+    } else if ([_mode.modeId isEqualToString:HOME_MODE_MORNING]) {
+        btnTitle = @"기상";
+        highlightMessage = @"좋은 아침!";
+        message = @"상쾌한 기상모드를\r실행할까요?";
+        
+    } else if ([_mode.modeId isEqualToString:HOME_MODE_NIGHT]) {
+        btnTitle = @"취침";
+        highlightMessage = @"잘 자요!";
+        message = @"편안한 취침모드를 \r실행할까요?";
+        
+    }
+    
+    [_btnExecute setTitle:btnTitle forState:UIControlStateNormal];
+    _lblMessage.text = [NSString stringWithFormat:@"%@/r/r%@", highlightMessage, message];
+    [_lblMessage setColor:kUITextColor02 text:highlightMessage];
+    
+    _btnSetting.hidden = [JDFacade facade].loginUser.level < 90;
+    
+    //TODO : set icon;
+}
+
+- (void)prepareViewDidLoad {
+    
+}
+
+#pragma mark - Main Logic
+
+- (void)requestChangeHomeMode {
+
+    NSString *modeTitle = [NSString stringWithFormat:@"%@ 모드", _mode.modeName];
+    _lblMessage.text = [NSString stringWithFormat:@"%@\r\r실행 중입니다.", modeTitle];
+    [_lblMessage setColor:kUITextColor02 text:modeTitle];
+    
+    NSString *path = [NSString stringWithFormat:API_POST_DASHBOARD_MODE_CHANGE, _mode.modeId];
+    
+    [[RequestHandler handler] sendAsyncPostRequestAPIPath:path parameters:nil modelClass:[JDJSONModel class] completion:^(id responseObject) {
+        
+        if ([[JDFacade facade].currentViewController isEqual:self]) {
+            [self setContentsForComplete];
+        }
+        
+        [[JDFacade facade] toast:[NSString stringWithFormat:@"%@ 상태가 되었습니다", _mode.modeName]];
+        
+    } failure:^(id errorObject) {
+        JDErrorModel *error = (JDErrorModel *)errorObject;
+        [[JDFacade facade] alert:error.errorMessage];
+    }];
+}
+
+- (void)setContentsForComplete {
+    
+    NSString *highlightMessage = nil;
+
+    highlightMessage = [NSString stringWithFormat:@"%@ 상태가 되었습니다.", _mode.modeName];
+    //TODO : chagne button image
+}
+
+
+#pragma mark - UI Events
+
+- (IBAction)btnExecuteTouched:(id)sender {
+    [self requestChangeHomeMode];
+}
+
+- (IBAction)btnSettingTouched:(id)sender {
+    
+}
+
+- (IBAction)btnCloseTouched:(id)sender {
+    [self dismissViewControllerAnimated:YES completion:nil];
+}
+
+
+#pragma mark - MemoryWarning
+- (void)didReceiveMemoryWarning
+{
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+
+
+@end

+ 18 - 0
kneet2/Classes/ViewControllers/MainScreens/MainViewController.h

@@ -19,6 +19,16 @@
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *constraintExpandViewTop;
 @property (weak, nonatomic) IBOutlet CustomButton *btnHomegrpImage;
 
+//extend view
+@property (weak, nonatomic) IBOutlet CustomButton *btnHomeHub;
+
+@property (weak, nonatomic) IBOutlet CustomButton *btnModeHome;
+@property (weak, nonatomic) IBOutlet CustomButton *btnModeAway;
+@property (weak, nonatomic) IBOutlet CustomButton *btnModeMorning;
+@property (weak, nonatomic) IBOutlet CustomButton *btnModeNight;
+
+
+
 #pragma mark - Instance Methods
 
 - (void)loadThingsViewController;
@@ -39,4 +49,12 @@
 - (IBAction)btnHomeHubTouched:(id)sender;
 - (IBAction)btnSettingsTouched:(id)sender;
 
+//mode
+- (IBAction)btnModeHomeTouched:(id)sender;
+- (IBAction)btnModeAwayTouched:(id)sender;
+- (IBAction)btnModeMorningTouched:(id)sender;
+- (IBAction)btnModeNightTouched:(id)sender;
+
+
+
 @end

+ 64 - 3
kneet2/Classes/ViewControllers/MainScreens/MainViewController.m

@@ -21,6 +21,7 @@
 #import "HomeMemberViewController.h"
 
 #import "MainViewController.h"
+#import "HomeModeUpdateViewController.h"
 
 @interface MainViewController () <ImageUtilDelegate> {
     ThingsViewController *_tvc;
@@ -83,6 +84,8 @@
     
     //when first loading this view.
     [self initThingsViewController];
+    
+    _btnHomeHub.enabled = (![JDFacade facade].loginUser.homehubDeviceId || [[JDFacade facade].loginUser.homehubDeviceId isEmptyString]);
 }
 
 - (void)initThingsViewController {
@@ -134,7 +137,7 @@
 }
 
 - (void)prepareViewDidLoad {
-    
+    [self requestDashboard];
 }
 
 #pragma mark - Main Logic
@@ -145,7 +148,7 @@
     
     NSString *path = [NSString stringWithFormat:API_GET_DASHBOARD];
     
-    [[RequestHandler handler] sendAsyncPostRequestAPIPath:path parameters:parameter modelClass:[DashboardModel class] completion:^(id responseObject) {
+    [[RequestHandler handler] sendAsyncGetRequestAPIPath:path parameters:parameter modelClass:[DashboardModel class] completion:^(id responseObject) {
         if (!responseObject) {//응답결과가 잘못되었거나 없을 경우,
             return;
         }
@@ -192,7 +195,6 @@
 - (void)setContents {
     
     [_btnHomegrpImage sd_setImageWithURL:[NSURL URLWithString:_dashboard.imageFileName] forState:UIControlStateNormal placeholderImage:nil options:SDWebImageRefreshCached];
-    
 }
 
 #pragma mark - ImageUtil delegate
@@ -294,6 +296,7 @@
 }
 
 - (void)btnHomeHubTouched:(id)sender {
+    
     UIViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"HomeHubViewController" storyboardName:@"Main"];
     [self presentViewController:vc animated:YES completion:nil];
 }
@@ -304,6 +307,63 @@
     [self presentViewController:vc animated:YES completion:nil];
 }
 
+- (IBAction)btnModeHomeTouched:(id)sender {
+    [self doChangeHomeMode:HOME_MODE_HOME];
+}
+
+- (IBAction)btnModeAwayTouched:(id)sender {
+    [self doChangeHomeMode:HOME_MODE_AWAY];
+}
+
+- (IBAction)btnModeMorningTouched:(id)sender {
+    [self doChangeHomeMode:HOME_MODE_MORNING];
+}
+
+- (IBAction)btnModeNightTouched:(id)sender {
+    [self doChangeHomeMode:HOME_MODE_NIGHT];
+}
+
+- (void)doChangeHomeMode:(NSString *)modeCode {
+    
+    if (![JDFacade facade].loginUser.homehubDeviceId || [[JDFacade facade].loginUser.homehubDeviceId isEmptyString]) {
+        [[JDFacade facade] toast:@"홈허브가 온라인 상태로\n연결되어 있을 때 시도해주세요"];
+        return;
+    }
+    
+    NSUInteger index = [_dashboard.modeList indexOfObjectPassingTest:^BOOL(ModeModel *pmode, NSUInteger idx, BOOL * _Nonnull stop) {
+        NSUInteger findex = NSNotFound;
+        if ([pmode.basicModeCode isEqualToString:modeCode]) {
+            findex = index;
+        }
+        return findex;
+    }];
+    ModeModel *mode = [_dashboard.modeList objectAtIndex:index];
+    
+    HomeModeUpdateViewController *vc = (HomeModeUpdateViewController *)[CommonUtil instantiateViewControllerWithIdentifier:@"HomeModeUpdateViewController"
+                                                                                                            storyboardName:@"Main"];
+    vc.mode = mode;
+    [self presentViewController:vc animated:YES completion:nil];
+    
+//
+//    if (!_dashboard.modeList || !_dashboard.modeList.count) {
+//        return;
+//    }
+//
+//
+//    //parameters
+//    NSDictionary *parameter = @{@"mode_id": mode.modeId};
+//
+//    NSString *path = [NSString stringWithFormat:API_POST_DASHBOARD_MODE_CHANGE];
+//
+//    [[RequestHandler handler] sendAsyncPostRequestAPIPath:path parameters:parameter modelClass:[JDJSONModel class] completion:^(id responseObject) {
+//        [JDFacade facade]
+//    } failure:^(id errorObject) {
+//        JDErrorModel *error = (JDErrorModel *)errorObject;
+//        [[JDFacade facade] alert:error.errorMessage];
+//    }];
+}
+
+
 
 #pragma mark - MemoryWarning
 - (void)didReceiveMemoryWarning
@@ -312,4 +372,5 @@
     // Dispose of any resources that can be recreated.
 }
 
+
 @end

+ 3 - 2
kneet2/Classes/ViewControllers/MainScreens/NoticeViewController.m

@@ -109,10 +109,11 @@
             _lblTitle.text = [NSString stringWithFormat:@"공지사항 %@", fetchedNoticeList.noticeCount];
             [_lblTitle setColor:kUITextColor02 text:fetchedNoticeList.noticeCount];
             
-        } else {//실패 시
-            
+        } else {
         }
         
+        [self.refreshController stopRefreshWithAnimated:YES completion:nil];
+        [self.loadMoreController stopLoadMoreCompletion:nil];
         self.loadMoreController.enable = _noticeList.count % 20 == 0;
         
         [_tableView reloadData];