瀏覽代碼

회원가입
텍스트필드 키보드 next버튼 & 툴바 이전, 다음 버튼 통일

ncomz 8 年之前
父節點
當前提交
306a2cda82

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

@@ -4402,7 +4402,7 @@
                                                 <rect key="frame" x="0.0" y="207" width="320" height="182"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="xsB-wP-ggW" id="qqk-dn-Ftx">
-                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="182"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="181.5"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="i69-BM-Qfs" userLabel="View - Cell" customClass="KNView">
@@ -4758,7 +4758,7 @@
                                                 <rect key="frame" x="0.0" y="389" width="320" height="164"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="bHe-zk-XaM" id="rhd-Oi-wkg">
-                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="164"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="163.5"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9vO-bf-gRH" userLabel="View - Cell">
@@ -7561,7 +7561,7 @@
         <image name="img_btn_bg_red_disable" width="37" height="32"/>
         <image name="img_btn_bg_red_press" width="37" height="32"/>
         <image name="img_btn_common_active" width="100" height="50"/>
-        <image name="img_btn_common_disable" width="100" height="50"/>
+        <image name="img_btn_common_disable" width="10" height="10"/>
         <image name="img_btn_common_press" width="100" height="50"/>
         <image name="img_btn_round_bg" width="50" height="35"/>
         <image name="img_homehub_list_connect" width="55" height="45"/>

+ 36 - 12
OneCable/Base.lproj/SignUp.storyboard

@@ -3101,6 +3101,9 @@
                                         <textInputTraits key="textInputTraits" keyboardType="numberPad" returnKeyType="done"/>
                                         <userDefinedRuntimeAttributes>
                                             <userDefinedRuntimeAttribute type="boolean" keyPath="autoScrollUp" value="YES"/>
+                                            <userDefinedRuntimeAttribute type="boolean" keyPath="hasMoveButton" value="YES"/>
+                                            <userDefinedRuntimeAttribute type="boolean" keyPath="disablePrevButton" value="YES"/>
+                                            <userDefinedRuntimeAttribute type="boolean" keyPath="disableNextButton" value="NO"/>
                                         </userDefinedRuntimeAttributes>
                                     </textField>
                                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="V8z-7d-NKC">
@@ -3177,6 +3180,9 @@
                                         <textInputTraits key="textInputTraits" returnKeyType="done"/>
                                         <userDefinedRuntimeAttributes>
                                             <userDefinedRuntimeAttribute type="boolean" keyPath="autoScrollUp" value="YES"/>
+                                            <userDefinedRuntimeAttribute type="boolean" keyPath="hasMoveButton" value="YES"/>
+                                            <userDefinedRuntimeAttribute type="boolean" keyPath="disablePrevButton" value="NO"/>
+                                            <userDefinedRuntimeAttribute type="boolean" keyPath="disableNextButton" value="YES"/>
                                         </userDefinedRuntimeAttributes>
                                     </textField>
                                 </subviews>
@@ -3832,17 +3838,20 @@
                                                             <constraint firstAttribute="height" constant="14" id="6xp-r2-3dw"/>
                                                         </constraints>
                                                     </view>
-                                                    <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="SXL-7h-ejC" customClass="CustomTextField">
+                                                    <textField opaque="NO" clipsSubviews="YES" tag="4441" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="SXL-7h-ejC" customClass="CustomTextField">
                                                         <rect key="frame" x="15" y="61" width="290" height="48"/>
                                                         <constraints>
                                                             <constraint firstAttribute="height" constant="48" id="fzw-1n-gMd"/>
                                                         </constraints>
                                                         <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                         <fontDescription key="fontDescription" type="system" pointSize="16"/>
-                                                        <textInputTraits key="textInputTraits" enablesReturnKeyAutomatically="YES"/>
+                                                        <textInputTraits key="textInputTraits" returnKeyType="go" enablesReturnKeyAutomatically="YES"/>
                                                         <userDefinedRuntimeAttributes>
                                                             <userDefinedRuntimeAttribute type="boolean" keyPath="autoScrollUp" value="YES"/>
                                                         </userDefinedRuntimeAttributes>
+                                                        <connections>
+                                                            <outlet property="delegate" destination="wte-1s-Zh3" id="HVp-dD-6cr"/>
+                                                        </connections>
                                                     </textField>
                                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="비밀번호 설정" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4zr-Ol-9P9">
                                                         <rect key="frame" x="15" y="305" width="290" height="22"/>
@@ -3898,29 +3907,35 @@
                                                             <constraint firstAttribute="bottom" secondItem="5Ae-dt-gyh" secondAttribute="bottom" id="eqn-9N-gyK"/>
                                                         </constraints>
                                                     </view>
-                                                    <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="UYX-tX-uMd" customClass="CustomTextField">
+                                                    <textField opaque="NO" clipsSubviews="YES" tag="4442" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="UYX-tX-uMd" customClass="CustomTextField">
                                                         <rect key="frame" x="15" y="346" width="290" height="48"/>
                                                         <constraints>
                                                             <constraint firstAttribute="height" constant="48" id="zSS-QX-eYD"/>
                                                         </constraints>
                                                         <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                         <fontDescription key="fontDescription" type="system" pointSize="16"/>
-                                                        <textInputTraits key="textInputTraits" enablesReturnKeyAutomatically="YES"/>
+                                                        <textInputTraits key="textInputTraits" returnKeyType="next" enablesReturnKeyAutomatically="YES"/>
                                                         <userDefinedRuntimeAttributes>
                                                             <userDefinedRuntimeAttribute type="boolean" keyPath="autoScrollUp" value="YES"/>
                                                         </userDefinedRuntimeAttributes>
+                                                        <connections>
+                                                            <outlet property="delegate" destination="wte-1s-Zh3" id="bLa-iS-lpx"/>
+                                                        </connections>
                                                     </textField>
-                                                    <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="1La-RL-DBt" customClass="CustomTextField">
+                                                    <textField opaque="NO" clipsSubviews="YES" tag="4443" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="1La-RL-DBt" customClass="CustomTextField">
                                                         <rect key="frame" x="15" y="472" width="290" height="48"/>
                                                         <constraints>
                                                             <constraint firstAttribute="height" constant="48" id="5ZW-8U-Brf"/>
                                                         </constraints>
                                                         <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                         <fontDescription key="fontDescription" type="system" pointSize="16"/>
-                                                        <textInputTraits key="textInputTraits" enablesReturnKeyAutomatically="YES"/>
+                                                        <textInputTraits key="textInputTraits" returnKeyType="done" enablesReturnKeyAutomatically="YES"/>
                                                         <userDefinedRuntimeAttributes>
                                                             <userDefinedRuntimeAttribute type="boolean" keyPath="autoScrollUp" value="YES"/>
                                                         </userDefinedRuntimeAttributes>
+                                                        <connections>
+                                                            <outlet property="delegate" destination="wte-1s-Zh3" id="fcr-9S-RbT"/>
+                                                        </connections>
                                                     </textField>
                                                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vAF-4V-Ar8">
                                                         <rect key="frame" x="15" y="327" width="290" height="19"/>
@@ -5242,7 +5257,7 @@
                                         </constraints>
                                         <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                         <fontDescription key="fontDescription" type="system" pointSize="16"/>
-                                        <textInputTraits key="textInputTraits" returnKeyType="done"/>
+                                        <textInputTraits key="textInputTraits" returnKeyType="next"/>
                                         <userDefinedRuntimeAttributes>
                                             <userDefinedRuntimeAttribute type="boolean" keyPath="autoScrollUp" value="YES"/>
                                         </userDefinedRuntimeAttributes>
@@ -5920,7 +5935,7 @@
                                         </constraints>
                                         <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                         <fontDescription key="fontDescription" type="system" pointSize="16"/>
-                                        <textInputTraits key="textInputTraits" returnKeyType="done"/>
+                                        <textInputTraits key="textInputTraits" returnKeyType="next"/>
                                         <userDefinedRuntimeAttributes>
                                             <userDefinedRuntimeAttribute type="boolean" keyPath="autoScrollUp" value="YES"/>
                                         </userDefinedRuntimeAttributes>
@@ -6361,18 +6376,21 @@
                                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="a3f-CE-zD1">
                                         <rect key="frame" x="15" y="303" width="290" height="48"/>
                                         <subviews>
-                                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="4dD-6F-7cJ" customClass="CustomTextField">
+                                            <textField opaque="NO" clipsSubviews="YES" tag="4441" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="4dD-6F-7cJ" customClass="CustomTextField">
                                                 <rect key="frame" x="0.0" y="0.0" width="82" height="48"/>
                                                 <fontDescription key="fontDescription" type="system" pointSize="16"/>
                                                 <textInputTraits key="textInputTraits" keyboardType="numberPad" enablesReturnKeyAutomatically="YES"/>
                                                 <userDefinedRuntimeAttributes>
                                                     <userDefinedRuntimeAttribute type="boolean" keyPath="autoScrollUp" value="YES"/>
+                                                    <userDefinedRuntimeAttribute type="boolean" keyPath="hasMoveButton" value="YES"/>
+                                                    <userDefinedRuntimeAttribute type="boolean" keyPath="disablePrevButton" value="YES"/>
+                                                    <userDefinedRuntimeAttribute type="boolean" keyPath="disableNextButton" value="NO"/>
                                                 </userDefinedRuntimeAttributes>
                                                 <connections>
                                                     <outlet property="delegate" destination="rSA-Vu-lLD" id="YeW-OC-Jmt"/>
                                                 </connections>
                                             </textField>
-                                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="d4x-7i-7ad" customClass="CustomTextField">
+                                            <textField opaque="NO" clipsSubviews="YES" tag="4442" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="d4x-7i-7ad" customClass="CustomTextField">
                                                 <rect key="frame" x="122" y="0.0" width="64" height="48"/>
                                                 <constraints>
                                                     <constraint firstAttribute="width" constant="64" id="iha-vU-EHz"/>
@@ -6381,6 +6399,9 @@
                                                 <textInputTraits key="textInputTraits" keyboardType="numberPad" enablesReturnKeyAutomatically="YES"/>
                                                 <userDefinedRuntimeAttributes>
                                                     <userDefinedRuntimeAttribute type="boolean" keyPath="autoScrollUp" value="YES"/>
+                                                    <userDefinedRuntimeAttribute type="boolean" keyPath="hasMoveButton" value="YES"/>
+                                                    <userDefinedRuntimeAttribute type="boolean" keyPath="disablePrevButton" value="NO"/>
+                                                    <userDefinedRuntimeAttribute type="boolean" keyPath="disableNextButton" value="NO"/>
                                                 </userDefinedRuntimeAttributes>
                                                 <connections>
                                                     <outlet property="delegate" destination="rSA-Vu-lLD" id="bNv-tX-sHU"/>
@@ -6432,12 +6453,15 @@
                                                     <constraint firstAttribute="width" constant="15" id="gaO-aJ-5Ia"/>
                                                 </constraints>
                                             </view>
-                                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="eGA-pO-PI0" customClass="CustomTextField">
+                                            <textField opaque="NO" clipsSubviews="YES" tag="4443" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="eGA-pO-PI0" customClass="CustomTextField">
                                                 <rect key="frame" x="226" y="0.0" width="64" height="48"/>
                                                 <fontDescription key="fontDescription" type="system" pointSize="16"/>
                                                 <textInputTraits key="textInputTraits" keyboardType="numberPad" enablesReturnKeyAutomatically="YES"/>
                                                 <userDefinedRuntimeAttributes>
                                                     <userDefinedRuntimeAttribute type="boolean" keyPath="autoScrollUp" value="YES"/>
+                                                    <userDefinedRuntimeAttribute type="boolean" keyPath="hasMoveButton" value="YES"/>
+                                                    <userDefinedRuntimeAttribute type="boolean" keyPath="disablePrevButton" value="NO"/>
+                                                    <userDefinedRuntimeAttribute type="boolean" keyPath="disableNextButton" value="YES"/>
                                                 </userDefinedRuntimeAttributes>
                                                 <connections>
                                                     <outlet property="delegate" destination="rSA-Vu-lLD" id="0C1-jW-lUc"/>
@@ -6691,7 +6715,7 @@
                                                 <rect key="frame" x="0.0" y="28" width="320" height="51"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="yBg-aF-cDf" id="zkH-fl-c1I">
-                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="51"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="50"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dW5-0K-VLG">

+ 1 - 1
OneCable/Classes/CommonUI/CommandClassControlDetailView.m

@@ -180,7 +180,7 @@ typedef void(^NodeCommandFailureBlock)(id error);
         [[JDFacade facade] toast:@"이미 잠긴 상태입니다"];
         return;
     }
-    NSLog(@"Parameter : %@", self.parameterForNodeCommand);
+    //NSLog(@"Parameter : %@", self.parameterForNodeCommand);
 //    [self requestNodeCommand:self.parameterForNodeCommand requestValue:_requestValueForClose completionHandler:nil failureHandler:nil];
 //    [self requestNodeCommand:_requestValueForClose];
     [self requestNodeCommand:self.parameterForNodeCommand requestValue:[self requestValueForNodeCommand:_requestValueForClose]];

+ 1 - 0
OneCable/Classes/CustomUI/CustomTextField.h

@@ -58,6 +58,7 @@ extern CGRect gKeyboardRect;
 
 - (id)initWithFrame:(CGRect)frame bgImageName:(NSString *)btnImageName bgPressImageName:(NSString *)bgPressImageName;
 - (id)initWithFrame:(CGRect)frame hasMoveButton:(BOOL)hasMooveButton disablePrev:(BOOL)disablePrev disableNext:(BOOL)disableNext;
+- (void)refreshAccessoryView;
 
 @end
 

+ 30 - 2
OneCable/Classes/CustomUI/CustomTextField.m

@@ -119,6 +119,9 @@ CGRect gKeyboardRect;
 }
 
 - (void)awakeFromNib {
+    
+    [super awakeFromNib];
+    
     _customTextFieldSuperview = _customTextFieldSuperview == CustomTextFieldSuperviewIsNone ? CustomTextFieldSuperviewIsViewController : _customTextFieldSuperview;
     self.inputAccessoryView = [self generateAccessoryView];
 //    self.borderStyle = UITextBorderStyleNone;
@@ -163,6 +166,12 @@ CGRect gKeyboardRect;
 
 }
 
+- (void)refreshAccessoryView {
+    
+    self.inputAccessoryView = [self generateAccessoryView];
+    
+}
+
 
 - (UIView *)generateAccessoryView {
     self.keyboardAppearance = UIKeyboardAppearanceDark;
@@ -196,14 +205,17 @@ CGRect gKeyboardRect;
         _btnPrev.tintColor = kUIBtnTintColor;
         _btnNext.tintColor = kUIBtnTintColor;
     }
+    
 
     if (_hasMoveButton) {
+        
         [_barItems addObject:_btnPrev];
         [_barItems addObject:_btnNext];
 
         _btnPrev.enabled = !_disablePrevButton;
         _btnNext.enabled = !_disableNextButton;
     }
+    
 
     [_barItems addObject:_btnFlexibleSpace];
     [_barItems addObject:_btnClose];
@@ -261,16 +273,19 @@ CGRect gKeyboardRect;
 //            _adjustY = 0.0f; //?
 //        }
     }
+    
 }
 
 
 - (void)scrollUp {
 
 	if (_autoScrollUp) {
+        
         if (CGRectEqualToRect(CGRectZero, gKeyboardRect)) {
             [self performSelector:@selector(scrollUp) withObject:nil afterDelay:0.1f];
             return;
         }
+        
         if (!_targetSuperView) {
             [self setCustomTextFieldSuperview:_customTextFieldSuperview];
         }
@@ -290,7 +305,7 @@ CGRect gKeyboardRect;
         CGFloat ay = gKeyboardRect.size.height + 60;//(gKeyboardRect.size.height + KEYBOARD_ACCESSORY_HEIGHT + KEYBOARD_PREDICTS_HEIGHT);
         CGFloat ky = ([UIScreen mainScreen].bounds.size.height - _naviMargin) - ay; // 260
 
-        NSLog(@"_superRect1 %@, cy=%f", NSStringFromCGRect(_superRect), cy);
+        NSLog(@"_superRect1 %@, cy=%f, ky:%f", NSStringFromCGRect(_superRect), cy, ky);
 		if (cy >= ky) {
 
             __block CGRect scrollRect = _targetSuperView.frame;
@@ -310,6 +325,7 @@ CGRect gKeyboardRect;
             }];
 
 		} else {
+            
             if (!CGRectEqualToRect(_superRect, CGRectZero)) {
                 [UIView animateWithDuration:kfAnimationDur animations:^{
                     _targetSuperView.frame = _superRect;
@@ -335,14 +351,21 @@ CGRect gKeyboardRect;
         return [super becomeFirstResponder];
     }
     
+    
+    
     //텍스트필드가 여러개일 경우, 다른 텍스트필드에서 resign을 처리하기 전에 호출되는 문제를 해결함.
     for (id textField in _targetSuperView.subviews) {
+
         if ([textField isKindOfClass:[UITextField class]] && [textField isFirstResponder]) {
-            [textField resignFirstResponder];
+            
             NSLog(@"regisgn t=%@, s=%@", textField, self);
+
+            [textField resignFirstResponder];
         }
+  
     }
     
+    
     _isScrollUp = NO;
     
     [self scrollUp];
@@ -350,6 +373,7 @@ CGRect gKeyboardRect;
 }
 
 
+
 - (BOOL)resignFirstResponder {
     
     UIImage *bgImage = [UIImage imageNamed:_bgImageName];
@@ -384,6 +408,7 @@ CGRect gKeyboardRect;
 
 
 - (void)goPrevField:(id)sender {
+   
     [self resignFirstResponder];
 
     if ([self.delegate respondsToSelector:@selector(moveToPrevField:)]) {
@@ -392,6 +417,7 @@ CGRect gKeyboardRect;
 }
 
 - (void)goNextField:(id)sender {
+   
     [self resignFirstResponder];
 
     if ([self.delegate respondsToSelector:@selector(moveToNextField:)]) {
@@ -400,6 +426,7 @@ CGRect gKeyboardRect;
 }
 
 - (void)hideKeyboard:(id)sender {
+  
     [self resignFirstResponder];
 
     if ([self.delegate respondsToSelector:@selector(willHideKeyboard:)]) {
@@ -499,6 +526,7 @@ CGRect gKeyboardRect;
     //텍스트필드가 여러개일 경우, 다른 텍스트필드에서 resign을 처리하기 전에 호출되는 문제를 해결함.
     for (id textField in _targetSuperView.subviews) {
         if ([textField isKindOfClass:[UITextField class]] && [textField isFirstResponder]) {
+            
             [textField resignFirstResponder];
             NSLog(@"regisgn t=%@, s=%@", textField, self);
         }

+ 29 - 4
OneCable/Classes/ViewControllers/HomeMemberScreens/CustomDatePopupView.m

@@ -93,10 +93,7 @@
     [self.delegate dismissPopupView];
 }
 
-#pragma mark - CustomTextField
-
-
-
+#pragma mark - textfield delegate
 - (BOOL)textFieldShouldReturn:(UITextField *)textField {
     if ([textField isEqual:_txtDay]) {
         [self btnConfirmTouched:nil];
@@ -124,4 +121,32 @@
     return YES;
 }
 
+- (void)moveToPrevField:(id)sender {
+    
+    UITextField *tf = sender;
+    NSInteger tag = tf.tag;
+    
+    if ( ![tf isEqual:_txtYear] ) {
+        
+        UITextField *prevTf = [self viewWithTag:tag - 1] ;
+        [prevTf becomeFirstResponder] ;
+        
+    }
+    
+}
+
+- (void)moveToNextField:(id)sender {
+    
+    UITextField *tf = sender;
+    NSInteger tag = tf.tag;
+    
+    if ( ![tf isEqual:_txtDay] ) {
+        
+        UITextField *prevTf = [self viewWithTag:tag + 1] ;
+        [prevTf becomeFirstResponder] ;
+        
+    }
+    
+}
+
 @end

+ 14 - 5
OneCable/Classes/ViewControllers/HomeMemberScreens/CustomDatePopupView.xib

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina4_0" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -111,15 +111,18 @@
                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uAo-R6-aVH" userLabel="View - Date">
                                             <rect key="frame" x="25" y="45" width="220" height="48"/>
                                             <subviews>
-                                                <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="nh7-z0-RJp" customClass="CustomTextField">
+                                                <textField opaque="NO" clipsSubviews="YES" tag="4441" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="nh7-z0-RJp" customClass="CustomTextField">
                                                     <rect key="frame" x="0.0" y="0.0" width="70" height="48"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="22"/>
                                                     <textInputTraits key="textInputTraits" enablesReturnKeyAutomatically="YES"/>
                                                     <userDefinedRuntimeAttributes>
                                                         <userDefinedRuntimeAttribute type="boolean" keyPath="autoScrollUp" value="YES"/>
+                                                        <userDefinedRuntimeAttribute type="boolean" keyPath="hasMoveButton" value="YES"/>
+                                                        <userDefinedRuntimeAttribute type="boolean" keyPath="disablePrevButton" value="YES"/>
+                                                        <userDefinedRuntimeAttribute type="boolean" keyPath="disableNextButton" value="NO"/>
                                                     </userDefinedRuntimeAttributes>
                                                 </textField>
-                                                <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="fT8-Aa-NRs" customClass="CustomTextField">
+                                                <textField opaque="NO" clipsSubviews="YES" tag="4442" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="fT8-Aa-NRs" customClass="CustomTextField">
                                                     <rect key="frame" x="91" y="0.0" width="54" height="48"/>
                                                     <constraints>
                                                         <constraint firstAttribute="width" constant="54" id="rLQ-8Y-WG6"/>
@@ -128,6 +131,9 @@
                                                     <textInputTraits key="textInputTraits" enablesReturnKeyAutomatically="YES"/>
                                                     <userDefinedRuntimeAttributes>
                                                         <userDefinedRuntimeAttribute type="boolean" keyPath="autoScrollUp" value="YES"/>
+                                                        <userDefinedRuntimeAttribute type="boolean" keyPath="hasMoveButton" value="YES"/>
+                                                        <userDefinedRuntimeAttribute type="boolean" keyPath="disablePrevButton" value="NO"/>
+                                                        <userDefinedRuntimeAttribute type="boolean" keyPath="disableNextButton" value="NO"/>
                                                     </userDefinedRuntimeAttributes>
                                                 </textField>
                                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="h6U-sX-VaY">
@@ -164,12 +170,15 @@
                                                         <constraint firstAttribute="width" constant="7" id="liA-1W-reB"/>
                                                     </constraints>
                                                 </view>
-                                                <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="Hso-In-Ios" customClass="CustomTextField">
+                                                <textField opaque="NO" clipsSubviews="YES" tag="4443" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" background="img_input_round_bg_default" translatesAutoresizingMaskIntoConstraints="NO" id="Hso-In-Ios" customClass="CustomTextField">
                                                     <rect key="frame" x="166" y="0.0" width="54" height="48"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="22"/>
                                                     <textInputTraits key="textInputTraits" enablesReturnKeyAutomatically="YES"/>
                                                     <userDefinedRuntimeAttributes>
                                                         <userDefinedRuntimeAttribute type="boolean" keyPath="autoScrollUp" value="YES"/>
+                                                        <userDefinedRuntimeAttribute type="boolean" keyPath="hasMoveButton" value="YES"/>
+                                                        <userDefinedRuntimeAttribute type="boolean" keyPath="disablePrevButton" value="NO"/>
+                                                        <userDefinedRuntimeAttribute type="boolean" keyPath="disableNextButton" value="YES"/>
                                                     </userDefinedRuntimeAttributes>
                                                 </textField>
                                             </subviews>

+ 1 - 1
OneCable/Classes/ViewControllers/HomeMemberScreens/HomeMemberViewController.m

@@ -619,7 +619,7 @@
         
         rcell = cell;
     } else {
-        NSLog(@"이쪽으로 들어올텐데?");
+      
         HomeMemberAddCollectionCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"AddCollectionCellIdentifier" forIndexPath:indexPath];
         
         if (![cell.btnAdd actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {

+ 10 - 1
OneCable/Classes/ViewControllers/MainScreens/LoginViewController.m

@@ -96,9 +96,10 @@ ID / PW Input Box Text Color
     _txtEmail.returnKeyType = UIReturnKeyNext;
     _txtPasswd.returnKeyType = UIReturnKeyDone;
 
+    
     _txtPasswd.delegate = self;
     _txtEmail.delegate = self;
-    
+
     //Localization
     [_chkAutoLogin setTitle:NSLocalizedString(@"로그인 유지", @"로그인 유지") forState:UIControlStateNormal];
     [_chkIdSave setTitle:NSLocalizedString(@"아이디 저장", @"아이디 저장") forState:UIControlStateNormal];
@@ -467,6 +468,14 @@ ID / PW Input Box Text Color
     return YES;
 }
 
+//다음
+- (void)moveToNextField:(id)sender {
+
+    [_txtPasswd becomeFirstResponder] ;
+    
+}
+
+
 #pragma mark - SocketService
 - (void) socketDidReceiveMessage:(id)message result:(SocketModel *)result
 {

+ 2 - 2
OneCable/Classes/ViewControllers/SettingsScreens/ChangeNamePopupView.m

@@ -74,13 +74,13 @@
     
     NSString *path = [[JDFacade facade] getUrlWithCustGroupIDAndMemberID:API_PUT_MEMBER_UPDATE];
     
-    NSLog(@"path : %@ ", path);
+    //NSLog(@"path : %@ ", path);
     [[RequestHandler handler] sendAsyncPutRequestAPIPath:path parameters:parameter modelClass:[JDJSONModel class] completion:^(id responseObject) {
         if (!responseObject) {//응답결과가 잘못되었거나 없을 경우,
             return;
         }
         
-        NSLog(@"requestChangeNickname : %@", responseObject);
+        //NSLog(@"requestChangeNickname : %@", responseObject);
         JDJSONModel *result = (JDJSONModel *) responseObject;
         
         if (result) {//API 성공 ,

+ 38 - 3
OneCable/Classes/ViewControllers/SignUpScreens/CertificationViewController.m

@@ -46,8 +46,8 @@
     
     [self initTextField:_txtPhoneNum];
     [self initTextField:_txtCertifyInput];
-
     
+  
     [self.btnSend setBackgroundImage:[UIImage imageNamed:@"img_btn_common_active"] forState:UIControlStateNormal capInsets:UIEdgeInsetsMake(kfTopInset,kfRightInset,kfBottomInset,kfLeftInset)];
     
     [self.btnSend setBackgroundImage:[UIImage imageNamed:@"img_btn_common_press"] forState:UIControlStateHighlighted capInsets:UIEdgeInsetsMake(kfTopInset,kfRightInset,kfBottomInset,kfLeftInset)];
@@ -58,7 +58,7 @@
     // 마스터,멤버 여부에 따라 전송 버튼 Hidden 여부설정
     BOOL isMember = [[JDFacade facade].signType isEqualToString:KNEET_MEMBER_MASTER] ;
     [self hiddenSendButton:isMember];
-
+    
 
 }
 
@@ -84,7 +84,7 @@
         
         SignUpModel *signUpModel = (SignUpModel *)responseObject;
         
-        NSLog(@"Response : %@",signUpModel);
+        //NSLog(@"Response : %@",signUpModel);
         
         // 마스터 회원가입일 경우 퀴즈 선택 메뉴로 이동
         if ([[JDFacade facade].signType isEqualToString:KNEET_MEMBER_MASTER]) {
@@ -149,6 +149,12 @@
         _viewHeight.constant = kiViewHeight;       // 뷰 높이 값 14 설정
         _lblMessage.text = @"마스터 사용자에게 초대 SMS를 받은 번호만\n인증이 가능합니다.";
         signType = ksSimpleSignUp;                // 인증 타입 멤버로 설정
+        
+        _txtPhoneNum.hasMoveButton = _txtCertifyInput.hasMoveButton = NO;
+        
+        [_txtPhoneNum refreshAccessoryView];
+        [_txtCertifyInput refreshAccessoryView];
+        
     }
 }
 
@@ -162,11 +168,14 @@
 
     [self dismissViewControllerAnimated:YES completion:nil];
 }
+
 // 인증 번호 전송 버튼 터치시 입력 된 휴대폰 번호로 인증번호 전송
 - (IBAction)btnSendTouched:(id)sender {
     [self requestAuthSendNum];
 }
 
+
+#pragma mark - textfield delegate
 // 휴대폰 번호 및 인증번호에 입력 된 글자 수에따라 다음 버튼 Enable여부 설정
 - (void)textFieldDidEndEditing:(UITextField *)textField{
     
@@ -198,6 +207,32 @@
     return YES;
 }
 
+//일반 회원일때
+- (BOOL)textFieldShouldReturn:(UITextField *)textField {
+    
+    if ([textField isEqual:_txtPhoneNum]) {
+        
+        [_txtCertifyInput becomeFirstResponder];
+    }
+    else {
+        [_txtPhoneNum becomeFirstResponder];
+    }
+    
+    return YES ;
+}
+
+//마스터 회원일때
+- (void)moveToNextField:(id)sender {
+    
+    [_txtCertifyInput becomeFirstResponder];
+
+}
+
+- (void)moveToPrevField:(id)sender {
+    
+    [_txtPhoneNum becomeFirstResponder];
+}
+
 - (void)didReceiveMemoryWarning {
     [super didReceiveMemoryWarning];
     

+ 42 - 14
OneCable/Classes/ViewControllers/SignUpScreens/IDSetViewController.m

@@ -41,6 +41,8 @@
     _lblMessageId.hidden = YES;
     _btnOverlap.enabled = NO;
     _btnNext.enabled = NO;
+    _txtPwInput.enabled = NO ;
+    _txtPwReInput.enabled = NO ;
     
     NSLog(@"signUpModel : %@",signUpModel);
     
@@ -52,23 +54,19 @@
     
     [self.btnOverlap setBackgroundImage:[UIImage imageNamed:@"img_btn_common_disable"] forState:UIControlStateDisabled capInsets:UIEdgeInsetsMake(kfTopInset,kfRightInset,kfBottomInset,kfLeftInset)];
     
-    [self initTextField:_txtIdInput];
-    [self initTextField:_txtPwInput];
-    [self initTextField:_txtPwReInput];
+//    [self initTextField:_txtIdInput];
+//    [self initTextField:_txtPwInput];
+//    [self initTextField:_txtPwReInput];
     
 }
 
-- (void)initTextField:(UITextField*)textFiled {
-    
-    textFiled.returnKeyType = UIReturnKeyDone;
-    textFiled.keyboardType = UIKeyboardTypeDefault;
-    textFiled.delegate = self;
-}
+//- (void)initTextField:(UITextField*)textFiled {
+//    
+//    
+//    textFiled.keyboardType = UIKeyboardTypeDefault;
+//    textFiled.delegate = self;
+//}
 
-- (void)initButton:(UIButton*)button backgroundImageStateNormal:(NSString*)backgroundImageStateNormal backgroundImageStateHighlighted:(NSString*)backgroundImageStateHighlighted backgroundImageStateDisabled:(NSString*)backgroundImageStateDisabled capInsets:(UIEdgeInsets*)capInsets {
-    
-    
-}
 
 
 // 아이디 중복 여부 확인
@@ -79,6 +77,7 @@
     [[RequestHandler handler] sendAsyncGetRequestAPIPath:path parameters:nil modelClass:[JDJSONModel class] completion:^(id responseObject) {
         
         _lblMessageId.hidden = NO;
+        _txtPwInput.enabled = _txtPwReInput.enabled = YES ;
         
     } failure:^(id errorObject) {
         JDErrorModel *error = (JDErrorModel *)errorObject;
@@ -162,6 +161,23 @@
     }
     
 }
+
+
+#pragma mark - textfield delegate
+- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
+    
+    
+    if ([textField isEqual:_txtIdInput]) {
+        
+        _btnOverlap.enabled = _txtPwReInput.enabled = _txtPwInput.enabled = NO ;
+        _lblMessageId.hidden = YES ;
+    }
+    
+    return YES;
+}
+
+
+
 // 아이디,비밀번호 입력시 다음버튼 활성화
 - (void)textFieldDidEndEditing:(UITextField *)textField{
     
@@ -178,7 +194,19 @@
 
 // TextField Done 버튼 설정
 - (BOOL)textFieldShouldReturn:(UITextField *)textField {
-    [textField resignFirstResponder];
+    
+    if ([textField isEqual:_txtIdInput] || [textField isEqual:_txtPwReInput]) {
+        
+        [textField resignFirstResponder];
+    }
+    else {
+        
+        UITextField *nextTf = [self.view viewWithTag:textField.tag + 1];
+        
+        [textField resignFirstResponder];
+        [nextTf becomeFirstResponder];
+    }
+    
     return YES;
 }
 

+ 9 - 1
OneCable/Classes/ViewControllers/SignUpScreens/IdFindViewController.m

@@ -55,7 +55,15 @@
 #pragma mark - textfield delegate
 - (BOOL)textFieldShouldReturn:(UITextField *)textField {
     
-    [textField resignFirstResponder] ;
+    if ([textField isEqual:_txtIdInput]) {
+        
+        [_txtNumInput becomeFirstResponder] ;
+    }
+    else {
+    
+        [textField resignFirstResponder] ;
+    }
+    
     return YES ;
 }
 

+ 31 - 3
OneCable/Classes/ViewControllers/SignUpScreens/PwAnswerViewController.m

@@ -60,9 +60,9 @@
     _txtDay.customTextFieldSuperview = CustomTextFieldSuperviewIsScrollView;
     
     [_lblStep setColor:kUITextColor03 text:[NSString stringWithFormat:@"%@", @"/ 3"]];
-    
-    _txtYear.inputAccessoryView = [self generateAccessoryView];
-    _txtMonth.inputAccessoryView = [self generateAccessoryView];
+//    
+//    _txtYear.inputAccessoryView = [self generateAccessoryView];
+//    _txtMonth.inputAccessoryView = [self generateAccessoryView];
     
     _btnConfirm.enabled = NO;
 
@@ -205,6 +205,34 @@
 
 
 #pragma mark - textfield delegate
+- (void)moveToPrevField:(id)sender {
+    
+    UITextField *tf = sender;
+    NSInteger tag = tf.tag;
+    
+    if ( ![tf isEqual:_txtYear] ) {
+        
+        UITextField *prevTf = [self.view viewWithTag:tag - 1] ;
+        [prevTf becomeFirstResponder] ;
+        
+    }
+    
+}
+
+- (void)moveToNextField:(id)sender {
+    
+    UITextField *tf = sender;
+    NSInteger tag = tf.tag;
+    
+    if ( ![tf isEqual:_txtDay] ) {
+        
+        UITextField *prevTf = [self.view viewWithTag:tag + 1] ;
+        [prevTf becomeFirstResponder] ;
+        
+    }
+    
+}
+
 // 퀴즈선택 TextField 터치시 퀴즈 목록 출력
 -(BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
     

+ 7 - 1
OneCable/Classes/ViewControllers/SignUpScreens/PwFindViewController.m

@@ -58,7 +58,13 @@
 #pragma mark - textfield delegate
 - (BOOL)textFieldShouldReturn:(UITextField *)textField {
     
-    [textField resignFirstResponder] ;
+    if ([textField isEqual:_txtFindIdInput]) {
+        
+        [_txtNumInput becomeFirstResponder] ;
+    }
+    else {
+        [textField resignFirstResponder] ;
+    }
     return YES ;
 }