浏览代码

- 설정 페이지 디자인 가이드 적용
- 홈허브 정보 페이지 디자인 가이드 적용
- 공지사항 , 메시지 디자인 가이드 적용

TaeHyun 8 年之前
父节点
当前提交
611dc96e64
共有 21 个文件被更改,包括 2964 次插入2441 次删除
  1. 6 0
      OneCable.xcodeproj/project.pbxproj
  2. 二进制
      OneCable/Assets.xcassets/images/common_photo_btn_setting.imageset/common_photo_btn_setting@2x.png
  3. 二进制
      OneCable/Assets.xcassets/images/common_photo_btn_setting.imageset/common_photo_btn_setting@3x.png
  4. 二进制
      OneCable/Assets.xcassets/images/common_photo_btn_setting_press.imageset/common_photo_btn_setting_press@2x.png
  5. 二进制
      OneCable/Assets.xcassets/images/common_photo_btn_setting_press.imageset/common_photo_btn_setting_press@3x.png
  6. 87 57
      OneCable/Base.lproj/HomeMember.storyboard
  7. 1574 868
      OneCable/Base.lproj/Main.storyboard
  8. 1019 1350
      OneCable/Base.lproj/Settings.storyboard
  9. 19 3
      OneCable/Classes/ViewControllers/HomeHubScreens/HomeHubViewController.h
  10. 39 9
      OneCable/Classes/ViewControllers/HomeHubScreens/HomeHubViewController.m
  11. 3 3
      OneCable/Classes/ViewControllers/HomeMemberScreens/HomeMemberAddViewController.m
  12. 33 0
      OneCable/Classes/ViewControllers/MainScreens/FaqViewController.h
  13. 65 0
      OneCable/Classes/ViewControllers/MainScreens/FaqViewController.m
  14. 5 4
      OneCable/Classes/ViewControllers/MainScreens/MessageBoxViewController.m
  15. 2 1
      OneCable/Classes/ViewControllers/MainScreens/NoticeViewController.h
  16. 2 2
      OneCable/Classes/ViewControllers/MainScreens/NoticeViewController.m
  17. 0 2
      OneCable/Classes/ViewControllers/SettingsScreens/DeleteAccountPopupView.h
  18. 3 8
      OneCable/Classes/ViewControllers/SettingsScreens/DeleteAccountPopupView.m
  19. 33 95
      OneCable/Classes/ViewControllers/SettingsScreens/DeleteAccountPopupView.xib
  20. 13 3
      OneCable/Classes/ViewControllers/SettingsScreens/SettingsViewController.h
  21. 61 36
      OneCable/Classes/ViewControllers/SettingsScreens/SettingsViewController.m

+ 6 - 0
OneCable.xcodeproj/project.pbxproj

@@ -178,6 +178,7 @@
 		A53C0DAF1E56E2F000E5D9F4 /* SocketServiceHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = A53C0DAE1E56E2F000E5D9F4 /* SocketServiceHandler.m */; };
 		A5F267DA1E544A530096276E /* NSNetService+Util.m in Sources */ = {isa = PBXBuildFile; fileRef = A5F267D91E544A530096276E /* NSNetService+Util.m */; };
 		E2295F0B1E83857A008C5915 /* ThingsDelValveStartViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2295F0A1E83857A008C5915 /* ThingsDelValveStartViewController.m */; };
+		E251A87B1E933966004A70CF /* FaqViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E251A87A1E933966004A70CF /* FaqViewController.m */; };
 		E2A252121E7F540700B3D007 /* CertificationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2A252091E7F540700B3D007 /* CertificationViewController.m */; };
 		E2A252131E7F540700B3D007 /* IDSetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2A2520B1E7F540700B3D007 /* IDSetViewController.m */; };
 		E2A252141E7F540700B3D007 /* JoinFinishViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2A2520D1E7F540700B3D007 /* JoinFinishViewController.m */; };
@@ -521,6 +522,8 @@
 		E21000791E91C98A00D5C4AE /* IdFindViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IdFindViewController.h; sourceTree = "<group>"; };
 		E2295F091E83857A008C5915 /* ThingsDelValveStartViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThingsDelValveStartViewController.h; sourceTree = "<group>"; };
 		E2295F0A1E83857A008C5915 /* ThingsDelValveStartViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ThingsDelValveStartViewController.m; sourceTree = "<group>"; };
+		E251A8791E933966004A70CF /* FaqViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FaqViewController.h; sourceTree = "<group>"; };
+		E251A87A1E933966004A70CF /* FaqViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FaqViewController.m; sourceTree = "<group>"; };
 		E2A252081E7F540700B3D007 /* CertificationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CertificationViewController.h; sourceTree = "<group>"; };
 		E2A252091E7F540700B3D007 /* CertificationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CertificationViewController.m; sourceTree = "<group>"; };
 		E2A2520A1E7F540700B3D007 /* IDSetViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDSetViewController.h; sourceTree = "<group>"; };
@@ -941,6 +944,8 @@
 				A13BCF631C3B491400C76527 /* HomeModeSettingsViewController.m */,
 				A13BCF771C3B491400C76527 /* ResetPwdViewController.h */,
 				A13BCF781C3B491400C76527 /* ResetPwdViewController.m */,
+				E251A8791E933966004A70CF /* FaqViewController.h */,
+				E251A87A1E933966004A70CF /* FaqViewController.m */,
 			);
 			path = MainScreens;
 			sourceTree = "<group>";
@@ -1486,6 +1491,7 @@
 				A13BD0291C3B491400C76527 /* HomeHubInitViewController.m in Sources */,
 				E2E34E1D1E827B4D00BB8C96 /* ThingsDelValveViewController.m in Sources */,
 				A13BCFE41C3B491400C76527 /* UITableView+EnumarateCells.m in Sources */,
+				E251A87B1E933966004A70CF /* FaqViewController.m in Sources */,
 				A13BD03E1C3B491400C76527 /* MessageBoxViewController.m in Sources */,
 				A13BD0DC1C3B563D00C76527 /* TriggerSelectPopupView.m in Sources */,
 				A13BD0141C3B491400C76527 /* TimePickerButton.m in Sources */,

二进制
OneCable/Assets.xcassets/images/common_photo_btn_setting.imageset/common_photo_btn_setting@2x.png


二进制
OneCable/Assets.xcassets/images/common_photo_btn_setting.imageset/common_photo_btn_setting@3x.png


二进制
OneCable/Assets.xcassets/images/common_photo_btn_setting_press.imageset/common_photo_btn_setting_press@2x.png


二进制
OneCable/Assets.xcassets/images/common_photo_btn_setting_press.imageset/common_photo_btn_setting_press@3x.png


文件差异内容过多而无法显示
+ 87 - 57
OneCable/Base.lproj/HomeMember.storyboard


文件差异内容过多而无法显示
+ 1574 - 868
OneCable/Base.lproj/Main.storyboard


文件差异内容过多而无法显示
+ 1019 - 1350
OneCable/Base.lproj/Settings.storyboard


+ 19 - 3
OneCable/Classes/ViewControllers/HomeHubScreens/HomeHubViewController.h

@@ -10,12 +10,15 @@
 
 @class CustomLabel;
 @class CustomImageView;
+@class CustomButton;
 
 @interface HomeHubViewController : JDViewController
 
-
 #pragma mark - Properties
 @property (weak, nonatomic) IBOutlet CustomTableView *tableView;
+@property (weak, nonatomic) IBOutlet CustomButton *btnEditName; // Head Title 명 수정 버튼
+@property (weak, nonatomic) IBOutlet CustomLabel *lblTitle; // Head Title 명
+@property (weak, nonatomic) IBOutlet CustomButton *btnClose;
 
 
 #pragma mark - Instance Methods
@@ -29,13 +32,26 @@
 
 @interface HomeHubTableViewCell : KNTableViewCell
 
-@property (weak, nonatomic) IBOutlet CustomLabel *lblStatus;
-@property (weak, nonatomic) IBOutlet UIImageView *imgvStatus;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblNetworkStatus;  // 네트워크 상태
+@property (weak, nonatomic) IBOutlet UIImageView *imgvStatus; // 네트워크 단절 이미지
+@property (weak, nonatomic) IBOutlet CustomButton *btnSet; // 설정 버튼
+@property (weak, nonatomic) IBOutlet CustomLabel *lblDeviceStatus; // 장치 연결 상태
 
 @end
 
 @interface HomeHubRegistTableViewCell : KNTableViewCell
 
 @property (weak, nonatomic) IBOutlet CustomLabel *lblDate;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblFirmCurrentVer;  // 펌웨어 현재 버전
+@property (weak, nonatomic) IBOutlet CustomLabel *lblFirmNewestVer;  // 펌웨어 최신 버전
+@property (weak, nonatomic) IBOutlet CustomLabel *lblSoftCurrentVer; // 소프트웨어 현재 버전
+@property (weak, nonatomic) IBOutlet CustomLabel *lblSoftNewestVer; // 소프트웨어 최신 버전
+
+@end
+
+@interface HomeHubInfoTableViewCell : KNTableViewCell
+@property (weak, nonatomic) IBOutlet CustomLabel *lblModelName; // 모델명
+@property (weak, nonatomic) IBOutlet CustomLabel *lblSerialNum; // 시리얼 번호
+
 
 @end

+ 39 - 9
OneCable/Classes/ViewControllers/HomeHubScreens/HomeHubViewController.m

@@ -10,6 +10,8 @@
 #import "RequestHandler.h"
 #import "DeviceModel.h"
 #import "CustomTableView.h"
+#import "CustomButton.h"
+#import "Reachability.h"
 
 @implementation HomeHubTableViewCell
 
@@ -19,13 +21,15 @@
 
 @end
 
+@implementation HomeHubInfoTableViewCell
+
+@end
 
 @interface HomeHubViewController () {
 
 }
 @end
 
-
 #pragma mark - Class Definition
 
 @implementation HomeHubViewController
@@ -41,6 +45,7 @@
 
 
 - (void)initUI {
+
     [self initTableViewAsDefaultStyle:_tableView];
 }
 
@@ -59,7 +64,7 @@
 }
 
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    return 2;
+    return 3;
 }
 
 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -67,7 +72,11 @@
     CGFloat height = 86.0f;
     
     if (indexPath.row == 0) {
-        height = 101.0f;
+        height = 164.0f;
+    } else if (indexPath.row == 1){
+        height = 181.0f;
+    } else if (indexPath.row == 2){
+        height = 164.0f;
     }
     
     return height;
@@ -80,14 +89,26 @@
     if (indexPath.row == 0) {
         HomeHubTableViewCell *tcell = (HomeHubTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"HubCellIdentifier"];
         
-        if ([JDFacade facade].loginUser.isHomehubOnline) {
-            tcell.lblStatus.text = @"온라인";
+        if (!([[Reachability reachabilityForInternetConnection]currentReachabilityStatus] == NotReachable)) {
+
+            tcell.lblNetworkStatus.text = @"정상";
+            tcell.lblNetworkStatus.textColor = kUITextColor04;
+            tcell.imgvStatus.image = nil;
             
-            tcell.imgvStatus.image = [UIImage imageNamed:@"img_homehub_icon_online"];
+        } else {
+            tcell.lblNetworkStatus.text = [NSString stringWithFormat:@"단절 %@", @"2017.04.04 15:33:30"];
+
+            tcell.lblNetworkStatus.textColor = kUITextColor07;
+            tcell.imgvStatus.image = [UIImage imageNamed:@"common_bullet_alert_on"];
+        }
+        
+        if([JDFacade facade].loginUser.homehubOnlineState){
             
+            tcell.lblDeviceStatus.text = @"정상";
+            tcell.lblDeviceStatus.textColor = kUITextColor04;
         } else {
-            tcell.lblStatus.text = @"오프라인";
-            tcell.imgvStatus.image = [UIImage imageNamed:@"img_homehub_icon_offline"];
+            tcell.lblDeviceStatus.text = @"단절";
+            tcell.lblDeviceStatus.textColor = kUITextColor07;
         }
         
         cell = tcell;
@@ -96,6 +117,12 @@
         
         tcell.lblDate.text = [CommonUtil formattedDate3:[JDFacade facade].loginUser.homehubCreateDatetime];
         
+        cell = tcell;
+        
+    } else if (indexPath.row == 2) {
+        HomeHubInfoTableViewCell *tcell = (HomeHubInfoTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"HubInfoCellIdentifier"];
+
+        
         cell = tcell;
     }
     
@@ -115,6 +142,9 @@
 - (void)btnCloseTouched:(id)sender {
     [self dismissViewControllerAnimated:YES completion:nil];
 }
+- (IBAction)btnSetTouched:(id)sender {
+    NSLog(@"설정");
+}
 
 
 #pragma mark - MemoryWarning
@@ -126,4 +156,4 @@
 
 
 
-@end
+@end

+ 3 - 3
OneCable/Classes/ViewControllers/HomeMemberScreens/HomeMemberAddViewController.m

@@ -20,9 +20,9 @@
 #import "CustomTableView.h"
 
 #define kiHeaderCellHeight 100
-#define kiAddCellHeight 61
-#define kiInputCellHeight 80
-#define kiQuizCellHeight 430
+#define kiAddCellHeight 65
+#define kiInputCellHeight 84
+#define kiQuizCellHeight 500
 
 /**
  

+ 33 - 0
OneCable/Classes/ViewControllers/MainScreens/FaqViewController.h

@@ -0,0 +1,33 @@
+//
+//  FaqViewController.h
+//  OneCable
+//
+//  Created by nComz on 2017. 4. 4..
+//  Copyright © 2017년 ntels. All rights reserved.
+//
+
+#import "JDViewController.h"
+#import "KNTableViewCell.h"
+
+@class CustomButton;
+@class CustomLabel;
+@class CustomTableViewCell;
+@class CustomImageView;
+
+@interface FaqViewController : JDViewController
+
+
+
+@property (weak, nonatomic) IBOutlet CustomLabel *lblTitle;
+@property (weak, nonatomic) IBOutlet CustomTableView *tableView;
+@property (weak, nonatomic) IBOutlet CustomButton *btnClose;
+
+@end
+
+@interface FaqTableViewCell : KNTableViewCell
+
+@property (weak, nonatomic) IBOutlet CustomLabel *lblContent;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblCreateDatetime;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblCount;
+
+@end

+ 65 - 0
OneCable/Classes/ViewControllers/MainScreens/FaqViewController.m

@@ -0,0 +1,65 @@
+//
+//  FaqViewController.m
+//  OneCable
+//
+//  Created by nComz on 2017. 4. 4..
+//  Copyright © 2017년 ntels. All rights reserved.
+//
+
+#import "FaqViewController.h"
+#import "CustomTableView.h"
+#import "CustomImageView.h"
+
+@implementation FaqTableViewCell
+
+@end
+
+@interface FaqViewController ()
+
+@end
+
+@implementation FaqViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+
+}
+
+- (void)initUI {
+    
+}
+
+
+#pragma mark - UITableView DataSource & Delegate
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    
+    return 1;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    FaqTableViewCell *cell = (FaqTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"FaqCellIdentifier"];
+    
+    return cell;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    [super tableView:tableView didSelectRowAtIndexPath:indexPath];
+}
+
+
+#pragma mark - UI Events
+- (IBAction)btnCloseTouched:(id)sender {
+    [self dismissViewControllerAnimated:YES completion:nil];
+}
+
+@end

+ 5 - 4
OneCable/Classes/ViewControllers/MainScreens/MessageBoxViewController.m

@@ -204,7 +204,8 @@
         MessageBoxTableViewCell *tcell = (MessageBoxTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"PersonalNoticeCellIdentifier"];
      
         BOOL isNew = [[CommonUtil dateFromDateString:notice.createDatetime] isLaterThanDate:_prevReadTime];
-        tcell.imgvStatus.image = isNew ? [UIImage imageNamed:@"common_bullet_circle_red"] : [UIImage imageNamed:@"common_bullet_circle_gray"];
+    
+      tcell.imgvStatus.image = isNew ? [UIImage imageNamed:@"common_bg_list_01"] : [UIImage imageNamed:@"color_bg_02"];
         
         NSArray *contents = [notice.content componentsSeparatedByString:@"\n"];
 //        NSLog(@"%s\n %@\n%@", __PRETTY_FUNCTION__, notice.content, contents);
@@ -214,7 +215,7 @@
     
         //초기화
         tcell.containerView.hidden = tcell.lblSubContent.hidden = tcell.btnSubContent.hidden = NO;
-        tcell.constraintImgvClockTop.constant = 72;
+//        tcell.constraintImgvClockTop.constant = 72;
     
         if ([notice.pushTypeCode isEqualToString:@"HOME_MEM_INV"]) {//초대 관련
             tcell.lblSubContent.hidden = YES;
@@ -230,7 +231,7 @@
                 tcell.lblSubContent.hidden = YES;
                 tcell.btnSubContent.hidden = YES;
                 
-                tcell.constraintImgvClockTop.constant = 20;
+//                tcell.constraintImgvClockTop.constant = 20;
             }
         }
         
@@ -269,4 +270,4 @@
 
 
 
-@end
+@end

+ 2 - 1
OneCable/Classes/ViewControllers/MainScreens/NoticeViewController.h

@@ -36,5 +36,6 @@
 @property (weak, nonatomic) IBOutlet CustomImageView *imgvStatus;
 @property (weak, nonatomic) IBOutlet CustomLabel *lblContent;
 @property (weak, nonatomic) IBOutlet CustomLabel *lblCreateDatetime;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblCount;
 
-@end
+@end

+ 2 - 2
OneCable/Classes/ViewControllers/MainScreens/NoticeViewController.m

@@ -182,7 +182,7 @@
     
     
     BOOL isNew = [[CommonUtil dateFromDateString:notice.createDatetime] isLaterThanDate:_prevReadTime];
-    cell.imgvStatus.image = isNew ? [UIImage imageNamed:@"common_bullet_circle_red"] : [UIImage imageNamed:@"common_bullet_circle_gray"];
+    cell.imgvStatus.image = isNew ? [UIImage imageNamed:@"common_bg_list_01"] : [UIImage imageNamed:@"color_bg_02"];
     
     cell.lblContent.text = notice.content;
     cell.lblCreateDatetime.text = [CommonUtil formattedDate3:notice.createDatetime];
@@ -209,4 +209,4 @@
 }
 
 
-@end
+@end

+ 0 - 2
OneCable/Classes/ViewControllers/SettingsScreens/DeleteAccountPopupView.h

@@ -13,11 +13,9 @@
 @interface DeleteAccountPopupView : CustomAlertView
 
 @property (strong, nonatomic) NSString *passwd;
-@property (weak, nonatomic) IBOutlet CustomLabel *lblWarning;
 
 @property (weak, nonatomic) IBOutlet CustomLabel *lblDesc1;
 @property (weak, nonatomic) IBOutlet CustomLabel *lblDesc2;
-@property (weak, nonatomic) IBOutlet CustomLabel *lblDesc3;
 
 - (id)initFromNib;
 

+ 3 - 8
OneCable/Classes/ViewControllers/SettingsScreens/DeleteAccountPopupView.m

@@ -31,14 +31,9 @@
             //XIB의 경우, 현재 화면 사이즈로 맞춰줘야 함.
             self.frame = [UIScreen mainScreen].bounds;
             self.lblTitle.text = NSLocalizedString(@"계정 삭제",nil);
-
-            [_lblWarning setUnderLine:_lblWarning.text];
             
             //Localization
-            _lblDesc1.text = NSLocalizedString(@"계정을 삭제한 즉시\n모든 장치와 규칙이 사라집니다", @"계정을 삭제한 즉시\n모든 장치와 규칙이 사라집니다");
-            _lblDesc2.text = NSLocalizedString(@"삭제 후에는 복구할 수 없으며\n새로운 계정을 만들고\n장치를 등록해야 합니다", @"삭제 후에는 복구할 수 없으며\n새로운 계정을 만들고\n장치를 등록해야 합니다");
-            _lblDesc3.text = NSLocalizedString(@"신중하게 결정해주세요", @"신중하게 결정해주세요");
-            
+
             [self.imgTitleBar setImage:[UIImage imageNamed:@"img_popup_bg_head"]inset:UIEdgeInsetsMake(kfTopInset,kfRightInset,kfBottomInset,kfLeftInset)];
             
             
@@ -50,8 +45,8 @@
             [self.btnCancel setBackgroundImage:[UIImage imageNamed:@"img_popup_btn_left_press"] forState:UIControlStateHighlighted capInsets:UIEdgeInsetsMake(kfTopInset,kfRightInset,kfBottomInset,kfLeftInset)];
             
             //Localization
-            [self.btnConfirm setTitle:NSLocalizedString(@"계정삭제", @"계정삭제") forState:UIControlStateNormal];
-            [self.btnCancel setTitle:NSLocalizedString(@"취소", @"취소") forState:UIControlStateNormal];
+            [self.btnConfirm setTitle:NSLocalizedString(@"예", @"예") forState:UIControlStateNormal];
+            [self.btnCancel setTitle:NSLocalizedString(@"아니오", @"아니오") forState:UIControlStateNormal];
         }
     }
 

文件差异内容过多而无法显示
+ 33 - 95
OneCable/Classes/ViewControllers/SettingsScreens/DeleteAccountPopupView.xib


+ 13 - 3
OneCable/Classes/ViewControllers/SettingsScreens/SettingsViewController.h

@@ -29,10 +29,16 @@
 @property (weak, nonatomic) IBOutlet CustomLabel *lblEmail;
 @property (weak, nonatomic) IBOutlet CustomLabel *lblNickname;
 
+@property (weak, nonatomic) IBOutlet CustomButton *btnChangeNickName;
 @property (weak, nonatomic) IBOutlet CustomLabel *lblChangeNickname;
 @property (weak, nonatomic) IBOutlet CustomLabel *lblChangePassword;
 @property (weak, nonatomic) IBOutlet CustomLabel *lblChangeEmail;
 @property (weak, nonatomic) IBOutlet CustomLabel *lblEmailWaiting;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblPhoneNum;
+@property (weak, nonatomic) IBOutlet CustomButton *btnChangeNum;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblQuiz;
+
+
 
 @property (weak, nonatomic) IBOutlet CustomCheckBox *chkAutoLogin;
 @property (weak, nonatomic) IBOutlet CustomButton *btnLogout;
@@ -45,9 +51,9 @@
 @interface SettingsNotificationTableViewCell : KNTableViewCell
 
 @property (weak, nonatomic) IBOutlet CustomCheckBox *chkHomeModeChange;
-@property (weak, nonatomic) IBOutlet CustomCheckBox *chkHomeEmptyChange;
-@property (weak, nonatomic) IBOutlet CustomLabel *lblHomehubWarn;
-@property (weak, nonatomic) IBOutlet KNView *homehubInfoView;
+//@property (weak, nonatomic) IBOutlet CustomCheckBox *chkHomeEmptyChange;
+//@property (weak, nonatomic) IBOutlet CustomLabel *lblHomehubWarn;
+//@property (weak, nonatomic) IBOutlet KNView *homehubInfoView;
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *constraintHomehubInfoViewHeight;
 
 @end
@@ -66,6 +72,10 @@
 
 @end
 
+@interface SettingsDeleteTableViewCell : KNTableViewCell
+@property (weak, nonatomic) IBOutlet CustomButton *btnDelete;
+
+@end
 
 @interface SettingsPasswdTableViewCell : KNTableViewCell
 

+ 61 - 36
OneCable/Classes/ViewControllers/SettingsScreens/SettingsViewController.m

@@ -21,10 +21,17 @@
 #import "ImageUtil.h"
 #import "SettingsViewController.h"
 #import "AdminAuthPopupView.h"
+#import "DeleteAccountPopupView.h"
 #import "ChangeNamePopupView.h"
 #import "ConfirmPasswdPopupView.h"
 #import "ChangeEmailPopupView.h"
 
+#define kiAccountCellHeight 434
+#define kiNotiCellHeight 103
+#define kiServiceCellHeight 143
+#define kiVersionCellHeight 103
+#define kiDeleteCellHeight 81
+#define kiPasswdCellHeight 135
 
 @implementation SettingsAccountTableViewCell
 
@@ -32,9 +39,9 @@
 }
 
 - (void)didMoveToSuperview {
-    [_lblChangeNickname setUnderLine:_lblChangeNickname.text];
-    [_lblChangePassword setUnderLine:_lblChangePassword.text];
-    [_lblChangeEmail setUnderLine:_lblChangeEmail.text];
+//    [_lblChangeNickname setUnderLine:_lblChangeNickname.text];
+//    [_lblChangePassword setUnderLine:_lblChangePassword.text];
+//    [_lblChangeEmail setUnderLine:_lblChangeEmail.text];
     
     _contraintEmailChangeBottom.constant = ![JDFacade facade].tmpEmailId || [[JDFacade facade].tmpEmailId isEmptyString] ? 18 : 45;
     _lblEmailWaiting.hidden = ![JDFacade facade].tmpEmailId || [[JDFacade facade].tmpEmailId isEmptyString];
@@ -60,6 +67,10 @@
 
 @end
 
+@implementation SettingsDeleteTableViewCell
+
+@end
+
 @implementation SettingsPasswdTableViewCell
 
 @end
@@ -165,7 +176,7 @@
 
 #pragma mark - UITableView DataSource & Delegate
 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
-    return 5;
+    return 6;
 }
 
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
@@ -176,18 +187,20 @@
     CGFloat height = 0.0f;
     
     if (indexPath.section == 0) {
-        height = ![JDFacade facade].tmpEmailId || [[JDFacade facade].tmpEmailId isEmptyString] ? 331-27 : 331;
-        
+//        height = ![JDFacade facade].tmpEmailId || [[JDFacade facade].tmpEmailId isEmptyString] ? 331-27 : 331;
+        height = kiAccountCellHeight;
     } else if (indexPath.section == 1) {//notification view
-        height = [JDFacade facade].loginUser.isHomehubOnline ? 317-56 : 317;
+//        height = [JDFacade facade].loginUser.isHomehubOnline ? 317-56 : 317;
+        height = kiNotiCellHeight;
     } else if (indexPath.section == 2) {
-        height = 181;
+        height = kiServiceCellHeight;
     } else if (indexPath.section == 3) {
-        height = 191;
+        height = kiVersionCellHeight;
     } else if (indexPath.section == 4) {
-        height = 135;
+        height = kiDeleteCellHeight;
+    } else if (indexPath.section == 5) {
+        height = kiPasswdCellHeight;
     }
-    
     return height;
 }
 
@@ -261,32 +274,32 @@
             _chkHomeModeChange = tcell.chkHomeModeChange;
         }
         
-        if (!_chkHomeEmptyChange) {
-            _chkHomeEmptyChange = tcell.chkHomeEmptyChange;
-        }
+//        if (!_chkHomeEmptyChange) {
+//            _chkHomeEmptyChange = tcell.chkHomeEmptyChange;
+//        }
         
         if (!_isNotFirstLoading) {
             _isNotFirstLoading = YES;
             
             _chkHomeModeChange.checked = [[JDFacade facade].loginUser.pushTypeModeChgYn boolValue];
-            _chkHomeEmptyChange.checked = [[JDFacade facade].loginUser.pushTypePrsncChgYn boolValue];
+//            _chkHomeEmptyChange.checked = [[JDFacade facade].loginUser.pushTypePrsncChgYn boolValue];
         }
         
         if (![tcell.chkHomeModeChange actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
             [tcell.chkHomeModeChange addTarget:self action:@selector(chkHomeModeChangeTouched:) forControlEvents:UIControlEventTouchUpInside];
         }
         
-        if (![tcell.chkHomeEmptyChange actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
-            [tcell.chkHomeEmptyChange addTarget:self action:@selector(chkHomeEmptyChangeTouched:) forControlEvents:UIControlEventTouchUpInside];
-        }
+//        if (![tcell.chkHomeEmptyChange actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
+//            [tcell.chkHomeEmptyChange addTarget:self action:@selector(chkHomeEmptyChangeTouched:) forControlEvents:UIControlEventTouchUpInside];
+//        }
         
-        tcell.homehubInfoView.hidden = [JDFacade facade].loginUser.isHomehubOnline;
-        if (tcell.homehubInfoView.hidden) {
-            tcell.constraintHomehubInfoViewHeight.constant = 0;
-        } else {
-            _chkHomeModeChange.enabled = NO;
-            _chkHomeEmptyChange.enabled = NO;
-        }
+//        tcell.homehubInfoView.hidden = [JDFacade facade].loginUser.isHomehubOnline;
+//        if (tcell.homehubInfoView.hidden) {
+//            tcell.constraintHomehubInfoViewHeight.constant = 0;
+//        } else {
+//            _chkHomeModeChange.enabled = NO;
+//            _chkHomeEmptyChange.enabled = NO;
+//        }
         
         cell = tcell;
     } else if (indexPath.section == 2) {//service info cell
@@ -303,19 +316,26 @@
         cell = tcell;
     } else if (indexPath.section == 3) {//version info cell
         SettingsVersionTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"VersionCellIdentifier"];
-        tcell.lblVersion.text = [NSString stringWithFormat:@"버전 : %@", [CommonUtil applicationVersion]];
+        tcell.lblVersion.text = [NSString stringWithFormat:@"현재 버전 : %@", [CommonUtil applicationVersion]];
         
         cell = tcell;
-    } else if (indexPath.section == 4) {//Passwd info cell
-        SettingsPasswdTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"PasswdCellIdentifier"];
+    } else if (indexPath.section == 4) {//Delete cell
+        SettingsDeleteTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"DeleteCellIdentifier"];
 
+        if (![tcell.btnDelete actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
+            [tcell.btnDelete addTarget:self action:@selector(btnDeleteTouched:) forControlEvents:UIControlEventTouchUpInside];
+        }
+        
+        cell = tcell;
+    }  else if (indexPath.section == 5) {//Passwd info cell
+        SettingsPasswdTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"PasswdCellIdentifier"];
+        
         if (![tcell.btnPassword actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
             [tcell.btnPassword addTarget:self action:@selector(btnPasswordTouched:) forControlEvents:UIControlEventTouchUpInside];
         }
-        
+    
         cell = tcell;
     }
-    
     cell.selectionStyle = UITableViewCellSelectionStyleNone;
 
     return cell;
@@ -386,11 +406,11 @@
     [self requestUpdatePushSetting:parameter];
 }
 
-- (void)chkHomeEmptyChangeTouched:(id)sender {
-
-    NSDictionary *parameter = @{@"push_type_prsnc_chg_yn" : _chkHomeEmptyChange.checked ? ksYES : ksNO};
-    [self requestUpdatePushSetting:parameter];
-}
+//- (void)chkHomeEmptyChangeTouched:(id)sender {
+//
+//    NSDictionary *parameter = @{@"push_type_prsnc_chg_yn" : _chkHomeEmptyChange.checked ? ksYES : ksNO};
+//    [self requestUpdatePushSetting:parameter];
+//}
 
 //service info cell's action
 
@@ -408,10 +428,15 @@
 }
 
 //service passwd cell's action
-- (void)btnPasswordTouched:(id)sender {//셋탑 설정
+- (void)btnPasswordTouched:(id)sender {// 셋탑 설정
     AdminAuthPopupView *popup = [[AdminAuthPopupView alloc] initFromNib];
     [popup show];
 }
+    
+- (void)btnDeleteTouched:(id)sender { // 계정 삭제
+    DeleteAccountPopupView *popup = [[DeleteAccountPopupView alloc]initFromNib];
+    [popup show];
+}
 
 - (IBAction)btnCloseTouched:(id)sender {
     [self dismissViewControllerAnimated:YES completion:nil];