Conversation
hwangJi-dev
left a comment
There was a problem hiding this comment.
수빈님 코드 정말 깔끔하고 보기 좋네요!! 수고하셨습니다🤗🤗🤗
| // 초기 다음버튼 비활성화 | ||
| nextButton.isEnabled = false | ||
|
|
||
| // 요소에 따라 정의해둔 함수를 실행 |
There was a problem hiding this comment.
target처럼 동작에 대한 통일성이 있는 메소드들을 모아서 함수로 뺀 다음 viewDidLoad에서 호출해줘도 좋을 것 같아요!! 👍🏻👍🏻
There was a problem hiding this comment.
와아 좋아여! 다음부터는 그런식으로 해야겠네여👍
| // 받아온 이름 넣는 함수 | ||
| func setNameLabel() { | ||
| if let name = message { | ||
| nameLabel.text = "\(name)님" |
There was a problem hiding this comment.
text의 값을 nameLabel.text = "\(name)님 \n환영합니다!" 와 같이 넣어준다면 Label을 2개 만들 필요 없이 하나로 처리가 가능합니다! Storyboard에서 레이아웃을 한번만 잡아도 되고, 라벨을 하나만 사용할 수 있어서 편리해요 ~!
There was a problem hiding this comment.
아 와 그게 더 편하겠네여.. 나중에 같이 수정해서 올려야겠어여🍎
| nameTextField.addTarget(self, action: #selector(textFieldDidChange(textField:)), for: UIControl.Event.editingChanged) | ||
| emailTextField.addTarget(self, action: #selector(textFieldDidChange(textField:)), for: UIControl.Event.editingChanged) | ||
| pwTextField.addTarget(self, action: #selector(textFieldDidChange(textField:)), for: UIControl.Event.editingChanged) | ||
| showPwButton.addTarget(self, action: #selector(showPwButtonClicked(button:)), for: .touchUpInside) |
There was a problem hiding this comment.
오 이친구도 addTarget으로 연결해주셨군요!! 이 생각은 못해봤네요👍
|
|
||
| @IBAction func touchUpToSuccess(_ sender: Any) { | ||
| guard let nextVC = self.storyboard?.instantiateViewController(withIdentifier: "SuccessViewController") as? SuccessViewController else {return} | ||
|
|
There was a problem hiding this comment.
손배야 나 빈칸잽이로서 아까부터 요빈캔손배 좀 보이시네..큼..👻👻
| if pwTextField.isSecureTextEntry == true { | ||
| pwTextField.isSecureTextEntry = false | ||
| showPwButton.tintColor = .systemBlue | ||
| } else { | ||
| pwTextField.isSecureTextEntry = true | ||
| showPwButton.tintColor = .lightGray |
There was a problem hiding this comment.
pwTextField.isSecureTextEntry = pwTextField.isSecureTextEntry == true ? false : true
showPwButton.tintColor = pwTextField.isSecureTextEntry == true ? .systemBlue : .lightGray
듀나걸 따라서 삼항연산자 손배를 우리 같이 써보쟈.. 수빈손배 사랑해❤️
| if self.nameTextField.hasText && self.emailTextField.hasText && self.pwTextField.hasText { | ||
| nextButton.isEnabled = true | ||
| } else { | ||
| nextButton.isEnabled = false | ||
| } |
There was a problem hiding this comment.
요 손배야도 삼항연산자로 쇽샥 해주면 우리는 바오밥오나무 탈출이야 수빈손배 우리 탈출해보자 🤟
| func setNameLabel() { | ||
| if let name = message { | ||
| nameLabel.text = "\(name)님" | ||
| nameLabel.sizeToFit() |
There was a problem hiding this comment.
손배 왜 나는 sizeToFit()을 몰랐지? 왜 나는 모르고 있었찌?
손배 제법 멋지다.. 🤟👻
| @IBAction func touchUpToGoBack(_ sender: Any) { | ||
| self.dismiss(animated: true, completion: nil) | ||
| } |
There was a problem hiding this comment.
손배 나는 이거 안해서 매번 빌드했는데 큼.. 손배 제법 콩(콩이 엄마,,❓)순.. 말고 똑순girl이네..😊
캐치미 때와 다르게 좀 얌전하게 코드리뷰 하고 간다릥..🐛🐛
There was a problem hiding this comment.
진짜 꽤나 굉장히 얌전하네 손배야... 코리 땡큐쏘마취😗
📌 관련 이슈
closed #1
📌 변경 사항 및 이유
1차 과제🍎
UI, 화면 전환, 데이터 전달 구현했습니다
📌 PR Point
📌 참고 사항