-
Notifications
You must be signed in to change notification settings - Fork 0
[루시] 4주차 미션 #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[루시] 4주차 미션 #19
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다~!!😊 코드리뷰 확인해주세용
@objc func registerButtonTapped(){ | ||
// let nextViewController = SecondViewController() | ||
// navigationController?.pushViewController(nextViewController, animated: true) | ||
if let idValue = idTextField.text, let passwordValue = passwordTextField.text{ | ||
UserDefaults.standard.set(idValue, forKey: "id") | ||
UserDefaults.standard.set(passwordValue, forKey: "password") | ||
footerLabel.text = "회원가입 완료!" | ||
// print(UserDefaults.standard.string(forKey: "id")) | ||
} else { | ||
footerLabel.text = "값을 입력해주세요." | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
값이 없어도 회원가입이 되는 이슈가 있습니다!
let footerLabel: UILabel = { | ||
let label = UILabel() | ||
label.text = "이것은 푸터입니다." | ||
return label | ||
}() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로그인, 회원가입 성공 여부를 alert로 알려주는 방법도 좋을 것 같아요!
|
||
import UIKit | ||
|
||
class SecondViewController: UIViewController { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 뷰컨에서는 backButton 막아주세요!
@objc func logOutTapped(){ | ||
UserDefaults.standard.removeObject(forKey: "isAutoLogin") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로그아웃 로직도 구현되어 있나요?
있다면 버튼을 SecondView에 넣어야 할 것 같아요!
📌 관련 이슈
#18
✨ 이슈 내용
UserDefaults 를 사용해서 자동로그인 활성화를 해보았습니다.
📸 스크린샷(선택)
📚 레퍼런스 (또는 새로 알게 된 내용) 혹은 궁금한 사항들