Skip to content

Commit

Permalink
[FIX] userIdTextField -> idTextField로 변수명 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
wngus4296 committed Apr 10, 2022
1 parent dd54532 commit 73994e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Instagram/Instagram/AddNameToSignupViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import UIKit

class AddNameToSignupViewController: UIViewController {

@IBOutlet weak var userIdTextField: UITextField!
@IBOutlet weak var idTextField: UITextField!
@IBOutlet weak var nextButton: UIButton!
var userName: String?

Expand All @@ -28,12 +28,12 @@ class AddNameToSignupViewController: UIViewController {

private func setTextFieldOption() {
// TextField에 입력하면 Clear 버튼이 나오도록 표시
userIdTextField.clearButtonMode = .whileEditing
idTextField.clearButtonMode = .whileEditing
}

private func addActionToTextField() {
// TextField에 이벤트 감지 시 함수 실행을 위한 addTarget() 설정
self.userIdTextField.addTarget(self, action: #selector(textFieldDidChange), for: .editingChanged)
self.idTextField.addTarget(self, action: #selector(textFieldDidChange), for: .editingChanged)
}

@objc func textFieldDidChange(sender: UITextField) {
Expand All @@ -48,7 +48,7 @@ class AddNameToSignupViewController: UIViewController {
guard let nextVC = self.storyboard?.instantiateViewController(withIdentifier: "AddPasswordToSignupViewController") as? AddPasswordToSignupViewController else { return }

// 회원가입(2) VC로 사용자 이름 전달
nextVC.userId = userIdTextField.text
nextVC.userId = idTextField.text

self.navigationController?.pushViewController(nextVC, animated: true)
}
Expand Down
7 changes: 5 additions & 2 deletions Instagram/Instagram/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<constraints>
<constraint firstAttribute="height" constant="38" id="0RN-kj-Ol2"/>
</constraints>
<color key="tintColor" name="systemBlueColor" catalog="System" colorSpace="catalog"/>
<color key="tintColor" systemColor="systemBlueColor"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="filled" title="로그인"/>
<connections>
Expand Down Expand Up @@ -189,8 +189,8 @@
</constraints>
</view>
<connections>
<outlet property="idTextField" destination="FH7-RM-GnW" id="PoD-GN-Sg8"/>
<outlet property="nextButton" destination="if2-2G-YHG" id="2aU-5y-cbZ"/>
<outlet property="userIdTextField" destination="FH7-RM-GnW" id="PoD-GN-Sg8"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="qAg-rJ-KPN" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
Expand Down Expand Up @@ -354,6 +354,9 @@
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemBlueColor">
<color red="0.0" green="0.47843137254901963" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemGray6Color">
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
Expand Down

0 comments on commit 73994e0

Please sign in to comment.