Преглед на файлове

- 회원가입 메뉴 주석 추

TaeHyun преди 8 години
родител
ревизия
9b044973f5
променени са 17 файла, в които са добавени 176 реда и са изтрити 93 реда
  1. 11 1
      OneCable/Classes/Model/LoginModel.h
  2. 16 11
      OneCable/Classes/ViewControllers/SignUpScreens/AgreementViewController.h
  3. 17 12
      OneCable/Classes/ViewControllers/SignUpScreens/AgreementViewController.m
  4. 9 11
      OneCable/Classes/ViewControllers/SignUpScreens/CertificationViewController.h
  5. 26 11
      OneCable/Classes/ViewControllers/SignUpScreens/CertificationViewController.m
  6. 8 8
      OneCable/Classes/ViewControllers/SignUpScreens/IDSetViewController.h
  7. 11 2
      OneCable/Classes/ViewControllers/SignUpScreens/IDSetViewController.m
  8. 2 2
      OneCable/Classes/ViewControllers/SignUpScreens/JoinFinishViewController.h
  9. 2 1
      OneCable/Classes/ViewControllers/SignUpScreens/JoinFinishViewController.m
  10. 9 9
      OneCable/Classes/ViewControllers/SignUpScreens/QuizViewController.h
  11. 18 4
      OneCable/Classes/ViewControllers/SignUpScreens/QuizViewController.m
  12. 8 9
      OneCable/Classes/ViewControllers/SignUpScreens/SignUpQuizSetViewController.h
  13. 22 4
      OneCable/Classes/ViewControllers/SignUpScreens/SignUpQuizSetViewController.m
  14. 2 2
      OneCable/Classes/ViewControllers/SignUpScreens/SignUpTypeSelectViewController.h
  15. 5 2
      OneCable/Classes/ViewControllers/SignUpScreens/SignUpTypeSelectViewController.m
  16. 4 4
      OneCable/Classes/ViewControllers/SignUpScreens/UserNameSetViewController.h
  17. 6 0
      OneCable/Classes/ViewControllers/SignUpScreens/UserNameSetViewController.m

+ 11 - 1
OneCable/Classes/Model/LoginModel.h

@@ -104,7 +104,17 @@
 
 
 @end
-
+// 회원가입
+
+// 퀴즈 명
+// 퀴즈 ID
+// 퀴즈 선택입력, 사용자 입력 여부
+// 퀴즈 정답
+// 휴대폰 번호
+// 사용자 ID
+// 사용자 PW
+// cust_id
+// ctrt_grp_id
 @protocol signUpModel;
 @interface SignUpModel : JDJSONModel
 

+ 16 - 11
OneCable/Classes/ViewControllers/SignUpScreens/AgreementViewController.h

@@ -15,35 +15,38 @@
 @interface AgreementViewController : JDViewController
 
 #pragma mark - Properties
-@property (weak, nonatomic) IBOutlet CustomTableView *tableView;
-@property (weak, nonatomic) IBOutlet CustomLabel *lblStep;
+@property (weak, nonatomic) IBOutlet CustomTableView *tableView; // 테이블 뷰
+@property (weak, nonatomic) IBOutlet CustomLabel *lblStep;       // Header 스텝 번호
 
 
 #pragma mark - Instance Methods
-@property (weak, nonatomic) IBOutlet CustomButton *btnCancle;
-@property (weak, nonatomic) IBOutlet CustomButton *btnNext;
+@property (weak, nonatomic) IBOutlet CustomButton *btnCancle;    // 취소 버튼
+@property (weak, nonatomic) IBOutlet CustomButton *btnNext;      // 다음 버튼
 
 - (IBAction)btnNextTouched:(id)sender;
 - (IBAction)btnCancelTouched:(id)sender;
 
 @end
 
+// 서비스 이용약관 Cell
 @interface AgreementTermTableViewCell : KNTableViewCell2
 
-@property (weak, nonatomic) IBOutlet CustomLabel *lblTitle;
-@property (weak, nonatomic) IBOutlet CustomCheckBox *chkAgree;
-@property (weak, nonatomic) IBOutlet CustomButton *btnDescLook;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblTitle;       // 서비스 이용 약관 텍스트
+@property (weak, nonatomic) IBOutlet CustomCheckBox *chkAgree;    // 동의 체크박스
+@property (weak, nonatomic) IBOutlet CustomButton *btnDescLook;   // 약관 보기 버튼
 
 @end
 
+// 개인정보 취급방침 Cell
 @interface AgreementServiceTableViewCell : KNTableViewCell2
 
-@property (weak, nonatomic) IBOutlet CustomLabel *lblTitle;
-@property (weak, nonatomic) IBOutlet CustomCheckBox *chkAgree;
-@property (weak, nonatomic) IBOutlet CustomButton *btnDescLook;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblTitle;       // 개인정보 취급방침 텍스트
+@property (weak, nonatomic) IBOutlet CustomCheckBox *chkAgree;    // 동의 체크박스
+@property (weak, nonatomic) IBOutlet CustomButton *btnDescLook;   // 약관 보기 버튼
 
 @end
 
+// 위치기반 서비스 이용안내 Cell ( 사용안함 )
 @interface AgreementLocationTableViewCell : KNTableViewCell2
 @property (weak, nonatomic) IBOutlet CustomLabel *lblTitle;
 @property (weak, nonatomic) IBOutlet CustomCheckBox *chkAgree;
@@ -51,12 +54,14 @@
 
 @end
 
+// 전체 동의 Cell
 @interface AgreementAllTableViewCell : KNTableViewCell2
 
-@property (weak, nonatomic) IBOutlet CustomCheckBox *chkAgree;
+@property (weak, nonatomic) IBOutlet CustomCheckBox *chkAgree;    // 전체 동의 체크박스
 
 @end
 
+// Guide 텍스트 Cell ( 사용안함 )
 @interface AgreementGuideTableViewCell : KNTableViewCell2
 
 @property (weak, nonatomic) IBOutlet CustomLabel *lblGuide;

+ 17 - 12
OneCable/Classes/ViewControllers/SignUpScreens/AgreementViewController.m

@@ -14,17 +14,9 @@
 #import "SignUpTypeSelectViewController.h"
 
 /**
- 
- Step Page Text Color
-    - 현재        : kUITextColor01
-    - 전체        : kUITextColor03
- 서비스 이용약관 , 개인정보 취급방침 Text Color : kUITextColor01
- 내용 보기 Text Color                     : kUITextColor03
- 동의 Text Color     : kUITextColor01
- 안내 문구 Text Color : kUITextColor01
+ 현재 Term,Service,All,Guide Cell을 사용 중이나 Guide Cell 에서 lblGuide는 Hidden 처리 중
  **/
 
-
 @implementation AgreementTermTableViewCell
 
 - (void)didMoveToSuperview {
@@ -85,7 +77,7 @@
     [self prepareViewDidLoad];
 }
 
-
+// UI 설정
 - (void)initUI {
     [self.navigationController.navigationBar setHidden:YES];
 
@@ -142,9 +134,11 @@
 
     NSString *tzombie = _tableZombieValues[indexPath.row];
     
+    // 서비스 이용약관 Cell
     if (indexPath.row == 0) {
         AgreementTermTableViewCell *tcell = (AgreementTermTableViewCell * )[tableView dequeueReusableCellWithIdentifier:@"TermCellIdentifier"];
         
+        // CheckBox Check여부 확인
         if (!_chkTerm) {
             _chkTerm = tcell.chkAgree;
         }
@@ -154,6 +148,8 @@
         tcell.chkAgree.checked = [tcell.chkAgree getCheckStatusFromValue];
         
         cell = tcell;
+        
+    // 개인정보 취급방침 Cell
     } else if (indexPath.row == 1) {
         AgreementServiceTableViewCell *tcell = (AgreementServiceTableViewCell * )[tableView dequeueReusableCellWithIdentifier:@"ServiceCellIdentifier"];
         
@@ -168,6 +164,8 @@
         cell = tcell;
         
     }
+    
+    // 위치기반 서비스 이용안내 Cell
 //    else if (indexPath.row == 2) {
 //        AgreementLocationTableViewCell *tcell = (AgreementLocationTableViewCell * )[tableView dequeueReusableCellWithIdentifier:@"locationCellIdentifier"];
 //        
@@ -181,6 +179,7 @@
 //
 //        cell = tcell;
 //    }
+    // 전체 동의 Cell
     else if (indexPath.row == 2){
         AgreementAllTableViewCell *tcell = (AgreementAllTableViewCell * )[tableView dequeueReusableCellWithIdentifier:@"AllCellIdentifier"];
         
@@ -193,8 +192,9 @@
         tcell.chkAgree.checked = [tcell.chkAgree getCheckStatusFromValue];
         
         cell = tcell;
-        
-    }else if (indexPath.row == 3) {//Guide
+    
+    // Guide Cell
+    }else if (indexPath.row == 3) {
         AgreementGuideTableViewCell *tcell = (AgreementGuideTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"GuideCellIdentifier"];
         cell = tcell;
     }
@@ -209,10 +209,12 @@
         return;
     }
     
+    // 서비스 이용약관 내용보기
     NSString *URLString = nil;
     if (indexPath.row == 0) {
         URLString = [NSString stringWithFormat:@"%@%@", kWebLinkServer, URL_PATH_TERMS];
         
+    // 개인정보 취급방침 내용보기
     } else if (indexPath.row == 1) {
         URLString = [NSString stringWithFormat:@"%@%@", kWebLinkServer, URL_PATH_POLICY];
     }
@@ -220,6 +222,7 @@
     [[JDFacade facade] loadURLExternalBrowser:URLString];
 }
 
+// CheckBox Check여부에 따라 다음버튼 Enable여부 설정
 #pragma mark - CustomCheckBox Delegate {
 - (void)didCheckBoxClicked:(id)sender {
     
@@ -242,6 +245,7 @@
     }
 }
 
+// 휴대폰 번호 인증 메뉴로 이동
 #pragma mark - UI Events
 - (IBAction)btnNextTouched:(id)sender {
     
@@ -255,6 +259,7 @@
     [self.navigationController pushViewController:vc animated:YES];
 }
 
+// 메뉴 닫기
 - (IBAction)btnCancelTouched:(id)sender {
     [self dismissViewControllerAnimated:YES completion:nil];
 }

+ 9 - 11
OneCable/Classes/ViewControllers/SignUpScreens/CertificationViewController.h

@@ -13,16 +13,14 @@
 
 @interface CertificationViewController : JDViewController
 
-@property (weak, nonatomic) IBOutlet CustomLabel *lblStep;
-@property (weak, nonatomic) IBOutlet CustomTextField *txtPhoneNum;
-@property (weak, nonatomic) IBOutlet CustomTextField *txtCertifyInput;
-@property (weak, nonatomic) IBOutlet CustomButton *btnSend;
-@property (weak, nonatomic) IBOutlet NSLayoutConstraint *btnSendHeight;
-@property (weak, nonatomic) IBOutlet NSLayoutConstraint *viewHeight;
-@property (weak, nonatomic) IBOutlet CustomLabel *lblMessage;
-
-
-@property (weak, nonatomic) IBOutlet CustomButton *btnCancel;
-@property (weak, nonatomic) IBOutlet CustomButton *btnNext;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblStep;              // 스텝번호
+@property (weak, nonatomic) IBOutlet CustomTextField *txtPhoneNum;      // 휴대폰 번호 입력 박스
+@property (weak, nonatomic) IBOutlet CustomTextField *txtCertifyInput;  // 인증 번호 입력 박스
+@property (weak, nonatomic) IBOutlet CustomButton *btnSend;             // 전송 버튼
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *btnSendHeight; // 전송 버튼 높이
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *viewHeight;    // 전송버튼 상단에 위치한 여백 View 높이
+@property (weak, nonatomic) IBOutlet CustomLabel *lblMessage;           // 안내 메세지
+@property (weak, nonatomic) IBOutlet CustomButton *btnCancel;           // 취소 버튼
+@property (weak, nonatomic) IBOutlet CustomButton *btnNext;             // 다음 버튼
 
 @end

+ 26 - 11
OneCable/Classes/ViewControllers/SignUpScreens/CertificationViewController.m

@@ -14,8 +14,8 @@
 #import "QuizViewController.h"
 
 #define kiZeroHeight           0;
-#define kiViewHeight          14;
-#define kiBtnSendHeight       50;
+#define kiViewHeight          14; // 전송 버튼 위 여백뷰 높이 값
+#define kiBtnSendHeight       50; // 전송 버튼 높이 값
 #define ksSimpleSignUp      @"2"; // 일반 회원가입
 #define ksMasterSignUP      @"3"; // 마스터 회원가입
 
@@ -34,6 +34,7 @@
     [self initUI];
 }
 
+// UI 설정
 - (void)initUI {
     [self.navigationController.navigationBar setHidden:YES];
     self.navigationController.interactivePopGestureRecognizer.enabled = NO;
@@ -57,6 +58,7 @@
     
     [self.btnSend setBackgroundImage:[UIImage imageNamed:@"img_btn_common_disable"] forState:UIControlStateDisabled capInsets:UIEdgeInsetsMake(kfTopInset,kfRightInset,kfBottomInset,kfLeftInset)];
     
+    // 마스터,멤버 여부에 따라 전송 버튼 Hidden 여부설정
     if ([[JDFacade facade].signType isEqualToString:KNEET_MEMBER_MASTER]) {
         [self hiddenSendButton:YES];
     } else {
@@ -65,6 +67,7 @@
 
 }
 
+// 휴대폰 번호 인증 확인 요청
 - (void)requestValidNum {
 
     NSDictionary *parameter = @{@"phone":  _txtPhoneNum.text,
@@ -79,7 +82,8 @@
         SignUpModel *signUpModel = (SignUpModel *)responseObject;
         
         NSLog(@"Response : %@",signUpModel);
-
+        
+        // 마스터 회원가입일 경우 퀴즈 선택 메뉴로 이동
             if ([[JDFacade facade].signType isEqualToString:KNEET_MEMBER_MASTER]) {
                 SignUpQuizSetViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"SignUpQuizSetViewController" storyboardName:@"SignUp"];
                 
@@ -88,6 +92,7 @@
                 [JDFacade facade].signUpUser = signUpModel;
                 
                 [self.navigationController pushViewController:vc animated:YES];
+        // 멤버 회원가입일 경우 퀴즈 정답 입력 메뉴로 이동
             } else {
                 QuizViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"QuizViewController" storyboardName:@"SignUp"];
                 
@@ -105,11 +110,12 @@
 
 }
 
+// 인증번호 전송 ( 멤버 회원가입만 해당 )
 - (void)requestAuthSendNum {
     //parameters
     NSDictionary *parameter = @{@"phone": _txtPhoneNum.text,
                                 @"auth_type": signType};
-    
+
     NSString *path = API_POST_REQUEST_AUTH_NUM;
 
     [[RequestHandler handler] sendAsyncPostRequestAPIPath:path parameters:parameter modelClass:[JDJSONModel class] completion:^(id responseObject) {
@@ -125,36 +131,41 @@
     
 }
 
+// 인증번호 전송 여부 설정
 - (void)hiddenSendButton:(BOOL)isHidden{
     if (isHidden) {
         _btnSend.hidden = YES;
-        _btnSendHeight.constant = kiZeroHeight;
-        _viewHeight.constant = kiZeroHeight;
+        _btnSendHeight.constant = kiZeroHeight; // 버튼 높이 값 0 설정
+        _viewHeight.constant = kiZeroHeight;    // 뷰 높이 값 0 설정
         _lblMessage.text = @"설치기사님에게 인증번호 SMS를 받은 번호만\n인증이 가능합니다.";
-        signType = ksMasterSignUP;
+        signType = ksMasterSignUP;              // 인증 타입 마스터로 설정
     } else {
         _btnSend.hidden = NO;
-        _btnSendHeight.constant = kiBtnSendHeight;
-        _viewHeight.constant = kiViewHeight;
+        _btnSendHeight.constant = kiBtnSendHeight; // 버튼 높이 값 50 설정
+        _viewHeight.constant = kiViewHeight;       // 뷰 높이 값 14 설정
         _lblMessage.text = @"마스터 사용자에게 초대 SMS를 받은 번호만\n인증이 가능합니다.";
-        signType = ksSimpleSignUp;
+        signType = ksSimpleSignUp;                // 인증 타입 멤버로 설정
     }
 }
 
+// 다음 버튼 터치시 인증번호 유효성 체크
 - (IBAction)btnNextTouched:(id)sender {
     [self requestValidNum];
 }
 
+// 메뉴 닫기
 - (IBAction)btnCancelTouched:(id)sender {
 
     [self dismissViewControllerAnimated:YES completion:nil];
 }
-
+// 인증 번호 전송 버튼 터치시 입력 된 휴대폰 번호로 인증번호 전송
 - (IBAction)btnSendTouched:(id)sender {
     [self requestAuthSendNum];
 }
 
+// 휴대폰 번호 및 인증번호에 입력 된 글자 수에따라 다음 버튼 Enable여부 설정
 - (void)textFieldDidEndEditing:(UITextField *)textField{
+    // 휴대폰 번호가 10자리 이상 입력 된 경우 다음 버튼 활성화
     if (_txtPhoneNum.text.length >= 10) {
         _btnSend.enabled = YES;
         _btnNext.enabled = YES;
@@ -163,6 +174,7 @@
         _btnNext.enabled = NO;
     }
     
+    // 인증번호가 4자리가 입력 된 경우 다음 버튼 활성화
     if (_txtCertifyInput.text.length >= 4){
         _btnNext.enabled = YES;
     } else {
@@ -170,12 +182,15 @@
     }
 }
 
+// 휴대폰 번호 및 인증번호 최대 입력가능한 텍스트 설정
 - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
     
+    // 휴대폰 번호입력 최대 11글자
     if ([textField isEqual:_txtPhoneNum]) {
         if (textField.text.length >= 11 && range.length == 0) {
             return NO;
         }
+    // 인증번호 최대 4글자
     } else if([textField isEqual:_txtCertifyInput]){
             if (textField.text.length >= 4 && range.length == 0) {
                 return NO;

+ 8 - 8
OneCable/Classes/ViewControllers/SignUpScreens/IDSetViewController.h

@@ -14,16 +14,16 @@
 @interface IDSetViewController : JDViewController
 
 @property (strong, nonatomic) SignUpModel *signUpModel;
-@property (weak, nonatomic) IBOutlet CustomLabel *lblStep;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblStep;          // 스텝 번호 텍스트
 
-@property (weak, nonatomic) IBOutlet CustomTextField *txtIdInput;
-@property (weak, nonatomic) IBOutlet CustomButton *btnOverlap;
-@property (weak, nonatomic) IBOutlet CustomLabel *lblMessageId;
+@property (weak, nonatomic) IBOutlet CustomTextField *txtIdInput;   // 아이디 입력 박스
+@property (weak, nonatomic) IBOutlet CustomButton *btnOverlap;      // 중복 확인 버튼
+@property (weak, nonatomic) IBOutlet CustomLabel *lblMessageId;     // 아이디 사용 가능 텍스트
 
-@property (weak, nonatomic) IBOutlet CustomTextField *txtPwInput;
-@property (weak, nonatomic) IBOutlet CustomTextField *txtPwReInput;
+@property (weak, nonatomic) IBOutlet CustomTextField *txtPwInput;   // 비밀번호 입력 박스
+@property (weak, nonatomic) IBOutlet CustomTextField *txtPwReInput; // 비밀번호 재 입력 박스
 
-@property (weak, nonatomic) IBOutlet CustomButton *btnCancel;
-@property (weak, nonatomic) IBOutlet CustomButton *btnNext;
+@property (weak, nonatomic) IBOutlet CustomButton *btnCancel;       // 취소 버튼
+@property (weak, nonatomic) IBOutlet CustomButton *btnNext;         // 다음 버튼
 
 @end

+ 11 - 2
OneCable/Classes/ViewControllers/SignUpScreens/IDSetViewController.m

@@ -32,7 +32,7 @@
     [super didReceiveMemoryWarning];
     
 }
-
+// UI 설정
 - (void)initUI {
     [self.navigationController.navigationBar setHidden:YES];
     self.navigationController.interactivePopGestureRecognizer.enabled = NO;
@@ -63,6 +63,7 @@
     _txtPwReInput.keyboardType = UIKeyboardTypeDefault;
 }
 
+// 아이디 중복 여부 확인
 - (void)requestIdDuplicateCheck {
 
     NSString *path = [[JDFacade facade]getUrlWithCustAndGroupIDAndInputMemId:API_GET_ID_CHK inputId:_txtIdInput.text];
@@ -78,6 +79,7 @@
     }];
 }
 
+// 마스터 회원가입 요청
 - (void)requestMasterSignUp {
     //parameters
     NSDictionary *parameter = @{@"member_id" : _txtIdInput.text,
@@ -106,6 +108,7 @@
     }];
 }
 
+// 멤버 회원가입 요청
 - (void)requestMemberSignUp {
     //parameters
     NSDictionary *parameter = @{@"member_id": _txtIdInput.text,
@@ -131,6 +134,7 @@
     }];
 }
 
+// 다음버튼 터치시 비밀번호 유효성 체크 및 회원가입 유형에 따른 회원가입 요청 설정
 - (IBAction)btnNextTouched:(id)sender {
     if (![ValidateUtil validateTextfiled:_txtPwInput type:ValidateTypePassword title:NSLocalizedString(@"비밀번호", @"비밀번호")]) {
         return;
@@ -141,14 +145,16 @@
         return;
     }
 
+    // 마스터 회원가입
     if ([[JDFacade facade].signType isEqualToString:KNEET_MEMBER_MASTER]) {
         [self requestMasterSignUp];
+    // 멤버 회원가입
     } else {
         [self requestMemberSignUp];
     }
     
 }
-
+// 아이디,비밀번호 입력시 다음버튼 활성화
 - (void)textFieldDidEndEditing:(UITextField *)textField{
     if (_txtIdInput.text.length >= 6) {
         _btnOverlap.enabled = YES;
@@ -164,15 +170,18 @@
     }
 }
 
+// TextField Done 버튼 설정
 - (BOOL)textFieldShouldReturn:(UITextField *)textField {
     [textField resignFirstResponder];
     return YES;
 }
 
+// 메뉴 닫기
 - (IBAction)btnCancelTouched:(id)sender {
        [self dismissViewControllerAnimated:YES completion:nil];
 }
 
+// 중복 확인 버튼 터치시
 - (IBAction)btnOverlapTouched:(id)sender {
     [self requestIdDuplicateCheck];
 }

+ 2 - 2
OneCable/Classes/ViewControllers/SignUpScreens/JoinFinishViewController.h

@@ -14,7 +14,7 @@
 @interface JoinFinishViewController : JDViewController
 
 @property (strong, nonatomic) SignUpModel *signUpModel;
-@property (weak, nonatomic) IBOutlet CustomLabel *lblId;
-@property (weak, nonatomic) IBOutlet CustomButton *btnConfirm;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblId;        // 사용자 ID
+@property (weak, nonatomic) IBOutlet CustomButton *btnConfirm;  // 확인 버튼
 
 @end

+ 2 - 1
OneCable/Classes/ViewControllers/SignUpScreens/JoinFinishViewController.m

@@ -23,6 +23,7 @@
     [self initUI];
 }
 
+// 사용자가 입력한 ID 출력
 - (void)initUI {
     [self.navigationController.navigationBar setHidden:YES];
     self.navigationController.interactivePopGestureRecognizer.enabled = NO;
@@ -30,7 +31,7 @@
     _lblId.text = signUpModel.memberId;
 }
 
-
+// 확인 버튼 터치시 메뉴 닫기
 - (IBAction)btnConfirmTouched:(id)sender {
        [self dismissViewControllerAnimated:YES completion:nil];
 }

+ 9 - 9
OneCable/Classes/ViewControllers/SignUpScreens/QuizViewController.h

@@ -13,17 +13,17 @@
 
 @interface QuizViewController : JDViewController
 
-@property (copy, nonatomic) NSString *phoneNum;
+@property (copy, nonatomic) NSString *phoneNum;                 // 휴대폰 번호
 @property (strong, nonatomic) SignUpModel *signUpModel;
-@property (weak, nonatomic) IBOutlet CustomLabel *lblStep;
-@property (weak, nonatomic) IBOutlet CustomTextField *txtYear;
-@property (weak, nonatomic) IBOutlet CustomTextField *txtMonth;
-@property (weak, nonatomic) IBOutlet CustomTextField *txtDay;
-@property (weak, nonatomic) IBOutlet CustomLabel *lblQuiz;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblStep;      // 스텝 번호 텍스트
+@property (weak, nonatomic) IBOutlet CustomTextField *txtYear;  // 연 입력 박스
+@property (weak, nonatomic) IBOutlet CustomTextField *txtMonth; // 월 입력 박스
+@property (weak, nonatomic) IBOutlet CustomTextField *txtDay;   // 일 입력 박스
+@property (weak, nonatomic) IBOutlet CustomLabel *lblQuiz;      // 마스터가 설정한 퀴즈
 
-@property (weak, nonatomic) IBOutlet CustomButton *btnCancel;
-@property (weak, nonatomic) IBOutlet CustomButton *btnNext;
+@property (weak, nonatomic) IBOutlet CustomButton *btnCancel;   // 취소 버튼
+@property (weak, nonatomic) IBOutlet CustomButton *btnNext;     // 다음 버튼
 
-@property(nonatomic,readonly,getter=isEditing) BOOL editing;
+@property(nonatomic,readonly,getter=isEditing) BOOL editing;    // TextField 수정중 여부
 
 @end

+ 18 - 4
OneCable/Classes/ViewControllers/SignUpScreens/QuizViewController.m

@@ -17,10 +17,10 @@
  해당 메뉴는 멤버만 출력
  **/
 @interface QuizViewController () <CustomTextFieldDelegate>{
-    UIBarButtonItem *_btnKeyboardNext, *_btnKeyboardClose;
-    UIToolbar *_toolBar;
-    NSMutableArray *_barItems;
-    UIBarButtonItem *_btnFlexibleSpace;
+    UIBarButtonItem *_btnKeyboardNext, *_btnKeyboardClose;  // 키보드 출력시 다음,닫기 버튼추가
+    UIToolbar *_toolBar;                                    // 툴바 설정
+    NSMutableArray *_barItems;                              // 툴바에 추가할 아이템
+    UIBarButtonItem *_btnFlexibleSpace;                     // 여백 설정
 }
 
 @end
@@ -28,6 +28,7 @@
 @implementation QuizViewController
 @synthesize signUpModel;
 
+// 마스터가 멤버초대시 설정한 퀴즈 가져옴
 - (void)viewDidLoad {
     [super viewDidLoad];
     
@@ -35,6 +36,7 @@
     [self requsetMasterQuiz];
 }
 
+// UI 설정
 - (void)initUI {
     [self.navigationController.navigationBar setHidden:YES];
     self.navigationController.interactivePopGestureRecognizer.enabled = NO;
@@ -62,6 +64,7 @@
 
 }
 
+// 마스터가 설정한 퀴즈의 정답 체크 후 아이디/비밀번호 설정 메뉴로 이동
 - (void)requestAnswerQuiz{
     NSString *answer = [NSString stringWithFormat:@"%@%@%@",_txtYear.text,_txtMonth.text,_txtDay.text];
     //parameters
@@ -84,6 +87,7 @@
     }];
 }
 
+// 마스터가 멤버초대시 설정한 퀴즈 가져오기
 - (void)requsetMasterQuiz {
     //parameters
     NSDictionary *parameter = @{@"phone": signUpModel.phone};
@@ -102,23 +106,29 @@
     }];
 }
 
+// 다음 버튼 터치시 퀴즈정답 체크
 - (IBAction)btnNextTouched:(id)sender {
         [self requestAnswerQuiz];
 }
 
+// 메뉴 닫기
 - (IBAction)btnCancelTouched:(id)sender {
     [self dismissViewControllerAnimated:YES completion:nil];
 }
 
+// 년,월,일 입력 될 시 다음버튼 활성화
 - (void)textFieldDidEndEditing:(UITextField *)textField{
+    // 월 입력시 1자리만 입력 된 경우 앞자리에 0추가
     if (_txtMonth.text.length == 1) {
         _txtMonth.text = [NSString stringWithFormat:@"0%@",_txtMonth.text];
     }
     
+    // 일 입력시 1자리만 입력 된 경우 앞자리에 0추가
     if (_txtDay.text.length == 1) {
         _txtDay.text = [NSString stringWithFormat:@"0%@",_txtDay.text];
     }
     
+    //년 4글자, 월 2글자, 일 2글자 입력시 다음 버튼 활성화
     if (_txtYear.text.length >= 4 && _txtMonth.text.length >= 2 && _txtDay.text.length >=2){
         
         _btnNext.enabled = YES;
@@ -127,6 +137,7 @@
     }
 }
 
+// 년,월,일 최대 입력 글자 설정
 - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
     
     if ([textField isEqual:_txtYear]) {
@@ -145,6 +156,7 @@
     return YES;
 }
 
+// 키보드 출력 시 다음,닫기 버튼 추가
 - (UIView *)generateAccessoryView {
     
     CGFloat width = [UIScreen mainScreen].bounds.size.width;
@@ -178,6 +190,7 @@
     return _toolBar;
 }
 
+// 키보드에서 다음버튼 터치시 이동 설정
 - (void)goNextField {
 
     if ([_txtYear isEditing]) {
@@ -191,6 +204,7 @@
     }
 }
 
+// 키보드에서 닫기버튼 터치시 키보드 내려감
 - (void)hideKeyboard {
 
     [_txtYear resignFirstResponder];

+ 8 - 9
OneCable/Classes/ViewControllers/SignUpScreens/SignUpQuizSetViewController.h

@@ -13,18 +13,17 @@
 
 @interface SignUpQuizSetViewController : JDViewController
 
-@property (copy, nonatomic) NSString *phoneNum;
+@property (copy, nonatomic) NSString *phoneNum;                         // 휴대폰 번호
 @property (strong, nonatomic) SignUpModel *signUpModel;
 
-@property (weak, nonatomic) IBOutlet CustomTextField *txtQuizSelect; // 퀴즈 선택
-@property (weak, nonatomic) IBOutlet CustomTextField *txtSelfQuiz;  // 퀴즈 질문 작성
+@property (weak, nonatomic) IBOutlet CustomTextField *txtQuizSelect;    // 퀴즈 선택
+@property (weak, nonatomic) IBOutlet CustomTextField *txtSelfQuiz;      // 퀴즈 질문 작성
 @property (weak, nonatomic) IBOutlet CustomButton *btnInputQuizAnswer;  // 퀴즈 정답 버튼
-@property (weak, nonatomic) IBOutlet CustomLabel *lblStep;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblStep;              // 스텝 번호
 
-@property (weak, nonatomic) IBOutlet UIView *viewSelfQuiz;
-@property (weak, nonatomic) IBOutlet NSLayoutConstraint *viewHeight;
-
-@property (weak, nonatomic) IBOutlet CustomButton *btnCancel;
-@property (weak, nonatomic) IBOutlet CustomButton *btnNext;
+@property (weak, nonatomic) IBOutlet UIView *viewSelfQuiz;              // 퀴즈 직접 선택 시 뷰
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *viewHeight;    // 퀴즈 직접 선택 뷰 높이
+@property (weak, nonatomic) IBOutlet CustomButton *btnCancel;           // 취소 버튼
+@property (weak, nonatomic) IBOutlet CustomButton *btnNext;             // 다음 버튼
 
 @end

+ 22 - 4
OneCable/Classes/ViewControllers/SignUpScreens/SignUpQuizSetViewController.m

@@ -13,12 +13,15 @@
 #import "ImageUtil.h"
 #import "IDSetViewController.h"
 
+/**
+ 해당 메뉴는 마스터만 출력
+ **/
 @interface SignUpQuizSetViewController () <CustomTextFieldDelegate,dismissPopupViewDelegate> {
     
-    DataSelectListModel *_quizList;
-    DataSelectModel *_selectedQuiz;
-    CustomDatePopupView *_popDate;
-    NSString *answer;
+    DataSelectListModel *_quizList; // 퀴즈 목록 모델
+    DataSelectModel *_selectedQuiz; // 선택 한 퀴즈
+    CustomDatePopupView *_popDate;  // 정답 입력 팝업
+    NSString *answer;               // 입력한 정답
 }
 
 @end
@@ -32,12 +35,14 @@
     [self initUI];
 }
 
+// 퀴즈 목록을 가져옴
 - (void)viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
     [self requestQuizList];
     
 }
 
+// UI 설정
 - (void)initUI {
     [self.navigationController.navigationBar setHidden:YES];
     self.navigationController.interactivePopGestureRecognizer.enabled = NO;
@@ -63,6 +68,7 @@
 
 }
 
+// 선택입력,사용자 입력 여부에 따라 뷰 높이 값 설정
 -(void)showDirectInputArea:(BOOL)isShow
 {
     _viewSelfQuiz.hidden = !isShow;
@@ -74,6 +80,7 @@
     }
 }
 
+// 다음 버튼 활성화 여부 및 선택한 퀴즈 입력 설정
 - (void)updateUI {
     _btnNext.enabled = [self isValidRequestInfo];
     
@@ -86,6 +93,7 @@
     }
 }
 
+// 퀴즈 목록 요청
 - (void)requestQuizList {
     
     NSString *path = [NSString stringWithFormat:API_POST_HOMEGROUP_INVITE_QUIZ];
@@ -112,6 +120,7 @@
     
 }
 
+// 사용자가 입력한 퀴즈 저장 후 아이디,비밀번호 설정 메뉴로 이동
 - (void)masterQuizSet{
     QuizModel *quizInfo = (QuizModel *)_selectedQuiz.value;
     NSLog(@"Quiz Info : %@", quizInfo);
@@ -136,6 +145,7 @@
     [self.navigationController pushViewController:vc animated:YES];
 }
 
+// 퀴즈 목록가져온 후 선택한 퀴즈 입력 설정
 -(void)showQuizList{
     [[JDFacade facade] selectDatas:self listInfo:_quizList completion:^(DataSelectModel *seleced) {
         _selectedQuiz = seleced;
@@ -145,14 +155,17 @@
     }];
 }
 
+// 메뉴 닫기
 - (IBAction)btnCancelTouched:(id)sender {
     [self dismissViewControllerAnimated:YES completion:nil];
 }
 
+// 다음 버튼 터치시 사용자가 입력한 퀴즈 저장 후 메뉴이동
 - (IBAction)btnNextTouched:(id)sender {
     [self masterQuizSet];
 }
 
+// 정답 날짜 입력 팝업 출력 및 입력한 날짜 가져옴
 - (IBAction)btnInputQuizTouched:(id)sender {
     if (_popDate == nil) {
         _popDate = [[CustomDatePopupView alloc] initWithTitle:@"정답 날짜 입력"];
@@ -180,6 +193,7 @@
     }];
 }
 
+// (delegate) 팝업이 꺼졌을 경우 호출
 - (void)dismissPopupView{
     _btnNext.enabled = [self isValidRequestInfo];
     if ([[_btnInputQuizAnswer titleForState:UIControlStateNormal] isEqualToString:_btnInputQuizAnswer.placeHolder])
@@ -188,6 +202,7 @@
     }
 }
 
+// 다음버튼 활성화 여부 체크
 - (BOOL)isValidRequestInfo {
     BOOL result = YES;
     
@@ -213,6 +228,7 @@
     return result;
 }
 
+// 퀴즈선택 TextField 터치시 퀴즈 목록 출력
 -(BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
     if ([textField isEqual:_txtQuizSelect]) {
         [self showQuizList];
@@ -221,6 +237,7 @@
     return YES;
 }
 
+// 입력 된 퀴즈 여부에 따라 다음버튼 활성화 설정
 - (void)textFieldDidEndEditing:(UITextField *)textField{
     if (_txtSelfQuiz.text.length > 0) {
 //        UIImage *active = [ImageUtil stretchedImage:[UIImage imageNamed:@"img_input_round_bg_active"] expectSize:CGSizeMake(_txtSelfQuiz.frame.size.width, _txtSelfQuiz.frame.size.height)];
@@ -236,6 +253,7 @@
     }
 }
 
+// TextField Done 버튼 설정 
 - (BOOL)textFieldShouldReturn:(UITextField *)textField {
     [textField resignFirstResponder];
     return YES;

+ 2 - 2
OneCable/Classes/ViewControllers/SignUpScreens/SignUpTypeSelectViewController.h

@@ -13,7 +13,7 @@
 @interface SignUpTypeSelectViewController : JDViewController
 
 @property (weak, nonatomic) IBOutlet CustomButton *btnMasterSignUP;  // 마스터 회원가입 버튼
-@property (weak, nonatomic) IBOutlet CustomButton *btnMemSignUp;  // 멤버 회원가입 버튼
-@property (weak, nonatomic) IBOutlet CustomButton *btnCancel;  // 취소 버튼
+@property (weak, nonatomic) IBOutlet CustomButton *btnMemSignUp;     // 멤버 회원가입 버튼
+@property (weak, nonatomic) IBOutlet CustomButton *btnCancel;        // 닫기 버튼
 
 @end

+ 5 - 2
OneCable/Classes/ViewControllers/SignUpScreens/SignUpTypeSelectViewController.m

@@ -24,6 +24,7 @@
     [self initUI];
 }
 
+// UI 설정
 - (void)initUI {
     UIView *statusBar = [[[UIApplication sharedApplication] valueForKey:@"statusBarWindow"] valueForKey:@"statusBar"];
     statusBar.backgroundColor = [UIColor whiteColor];
@@ -36,22 +37,24 @@
 - (IBAction)btnMasterSignUpTouched:(id)sender {
     
     [self moveAgreementViewController];
-    [JDFacade facade].signType = KNEET_MEMBER_MASTER;
+    [JDFacade facade].signType = KNEET_MEMBER_MASTER; // 가입유형을 마스터로 설정
 }
 
 // 멤버 회원가입
 - (IBAction)btnMemSignUpTouched:(id)sender {
     
     [self moveAgreementViewController];
-    [JDFacade facade].signType = KNEET_MEMBER_SIMPLE;
+    [JDFacade facade].signType = KNEET_MEMBER_SIMPLE; // 가입유형을 멤버로 설정
 }
 
+// 약관 동의 메뉴로 이동
 - (void)moveAgreementViewController{
     AgreementViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"AgreementViewController" storyboardName:@"SignUp"];
 
     [self.navigationController pushViewController:vc animated:YES];
 }
 
+// 메뉴 닫기
 - (IBAction)btnCancelTouched:(id)sender {
     [self dismissViewControllerAnimated:YES completion:nil];
 }

+ 4 - 4
OneCable/Classes/ViewControllers/SignUpScreens/UserNameSetViewController.h

@@ -14,10 +14,10 @@
 @interface UserNameSetViewController : JDViewController
 
 @property (strong, nonatomic) SignUpModel *signUpModel;
-@property (weak, nonatomic) IBOutlet CustomLabel *lblStep;
-@property (weak, nonatomic) IBOutlet CustomTextField *txtNickInput;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblStep;          // 스텝 번호 텍스트
+@property (weak, nonatomic) IBOutlet CustomTextField *txtNickInput; // 닉네임 입력 박스
 
-@property (weak, nonatomic) IBOutlet CustomButton *btnAfter;
-@property (weak, nonatomic) IBOutlet CustomButton *btnNext;
+@property (weak, nonatomic) IBOutlet CustomButton *btnAfter;        // 나중에 버튼
+@property (weak, nonatomic) IBOutlet CustomButton *btnNext;         // 다음 버튼
 
 @end

+ 6 - 0
OneCable/Classes/ViewControllers/SignUpScreens/UserNameSetViewController.m

@@ -32,6 +32,7 @@
     
 }
 
+// UI 설정
 - (void)initUI {
     [self.navigationController.navigationBar setHidden:YES];
     self.navigationController.interactivePopGestureRecognizer.enabled = NO;
@@ -44,6 +45,8 @@
     
 }
 
+// 닉네임 변경 요청 및 회원가입 완료 메뉴로 이동
+// 닉네임이 공백일 경우 변경 없이 회원가입 완료 메뉴로 이동
 - (void)requestChangeNickname {
     //parameters
     NSDictionary *parameter = @{@"type": @"nickname" ,
@@ -65,10 +68,12 @@
     }];
 }
 
+// 다음 버튼 터치시 사용자가 입력한 닉네임 변경
 - (IBAction)btnNextTouched:(id)sender {
     [self requestChangeNickname];
 }
 
+// 나중에 버튼 터치시 닉네임 변경 없이 회원가입 완료 메뉴로 이동
 - (IBAction)btnAfterTouched:(id)sender {
     JoinFinishViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"JoinFinishViewController" storyboardName:@"SignUp"];
     
@@ -76,6 +81,7 @@
     [self.navigationController pushViewController:vc animated:YES];
 }
 
+// TextField Done 버튼 설정
 - (BOOL)textFieldShouldReturn:(UITextField *)textField {
     [textField resignFirstResponder];
     return YES;