-
Notifications
You must be signed in to change notification settings - Fork 5
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
[Feat] #14 - 소셜로그인 구현 #14
Conversation
titleImageView와 subtitleImageView의 이미지 설정
1. 애플로그인을 위한 함수 작성 2. setAddTarget함수를 통해 버튼 이벤트 적용 3. SwiftLint에 맞는 코드 수정
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.
고생하셨습니다 ^__^
static let kakaoLoginError = "카카오 로그인에 실패하였습니다." | ||
static let appleLoginError = "애플 로그인에 실패하였습니다." | ||
} | ||
|
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.
p5;
구조체 간에 한 줄 간격으로만 작성해주면 좋을것 같아요 ~!
lazy var titleImageView = UIImageView() | ||
lazy var subtitleImageView = UIImageView() | ||
lazy var kakaoLoginButton = UIButton() | ||
lazy var appleLoginButton = UIButton() |
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.
p3;
Social LoginVC에서만 사용하는 UI요소이기 때문에 - private 형태로 선언해주세요!
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.
네~~!
func showKakaoLoginFailMessage() { | ||
self.makeAlert(title: I18N.Alert.error, message: I18N.Auth.kakaoLoginError, okAction: nil, completion: nil) | ||
} | ||
|
||
func postSocialLoginData(socialToken: String, socialType: String) { | ||
|
||
} | ||
|
||
func appleLogin() { |
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.
p3;
여기서도 private
으로 접근제한자 처리하면 좋을것 같아요!
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.
private을 기억하자. 확인❗️
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.
캬아아 소셜로그인 구현한다고 고생많으셨어~~! 최고의 와비선배... 샌드위치 맛있어?
코베 도약도 좋았다!!
@@ -6,31 +6,39 @@ | |||
// | |||
|
|||
import UIKit | |||
import KakaoSDKAuth |
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.
p5;
한 칸 띄우기티비 ㅋㅋ
struct Auth { | ||
static let kakaoLoginError = "카카오 로그인에 실패하였습니다." | ||
static let appleLoginError = "애플 로그인에 실패하였습니다." | ||
} |
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.
p5;
저도 안쓰고 있었는데 반성하겠습니다..
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.
나 잘했어?
import UIKit | ||
|
||
import SnapKit | ||
import AuthenticationServices |
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.
p5;
처음이니까 초큼 깐깐하게 할게여... 알파벳 순서대로! ㅎㅎ
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.
오케이!!
private func setUI() { | ||
titleImageView.image = UIImage(named: "authTitle") | ||
subtitleImageView.image = UIImage(named: "authSubtitle") | ||
|
||
kakaoLoginButton.setTitle("카카오톡 아이디로 로그인", for: .normal) | ||
kakaoLoginButton.setTitleColor(.black, for: .normal) | ||
|
||
appleLoginButton.setTitle("애플 아이디로 로그인", for: .normal) | ||
appleLoginButton.backgroundColor = UIColor.carrotBlack | ||
} | ||
|
||
private func setLayout() { | ||
view.addSubviews(titleImageView, subtitleImageView, kakaoLoginButton, appleLoginButton) | ||
titleImageView.snp.makeConstraints { make in | ||
make.top.equalToSuperview().inset(270) | ||
make.centerX.equalToSuperview() | ||
} | ||
|
||
subtitleImageView.snp.makeConstraints { make in | ||
make.top.equalTo(titleImageView.snp.bottom).offset(15) | ||
make.centerX.equalToSuperview() | ||
} | ||
|
||
kakaoLoginButton.snp.makeConstraints { make in | ||
make.top.equalTo(subtitleImageView.snp.bottom).offset(100) | ||
make.leading.trailing.equalToSuperview().inset(50) | ||
make.centerX.equalToSuperview() | ||
} | ||
|
||
appleLoginButton.snp.makeConstraints {make in | ||
make.top.equalTo(kakaoLoginButton.snp.bottom).offset(9) | ||
make.leading.trailing.equalToSuperview().inset(50) | ||
make.centerX.equalToSuperview() | ||
} | ||
} | ||
|
||
func setAddTarget() { | ||
kakaoLoginButton.addTarget(self, action: #selector(doKakaoLogin), for: .touchUpInside) | ||
appleLoginButton.addTarget(self, action: #selector(doAppleLogin), for: .touchUpInside) | ||
} |
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.
p4;
요 친구들 extension 해서 바깥으로 빼주세요~~!
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.
네~~!
private func setLayout() { | ||
view.addSubviews(titleImageView, subtitleImageView, kakaoLoginButton, appleLoginButton) | ||
titleImageView.snp.makeConstraints { make in | ||
make.top.equalToSuperview().inset(270) | ||
make.centerX.equalToSuperview() | ||
} | ||
|
||
subtitleImageView.snp.makeConstraints { make in | ||
make.top.equalTo(titleImageView.snp.bottom).offset(15) | ||
make.centerX.equalToSuperview() | ||
} | ||
|
||
kakaoLoginButton.snp.makeConstraints { make in | ||
make.top.equalTo(subtitleImageView.snp.bottom).offset(100) | ||
make.leading.trailing.equalToSuperview().inset(50) | ||
make.centerX.equalToSuperview() | ||
} | ||
|
||
appleLoginButton.snp.makeConstraints {make in | ||
make.top.equalTo(kakaoLoginButton.snp.bottom).offset(9) | ||
make.leading.trailing.equalToSuperview().inset(50) | ||
make.centerX.equalToSuperview() | ||
} | ||
} |
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.
p5;
코베 고생하셨어라~~
너무잘했고
appleLogin() | ||
} | ||
} | ||
|
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.
p5;
이쯤에서 마크구문도 넣어주셔라!!!!!!
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.
넵!!
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.
반영 잘해주셨네요!! 고생하셨구 hamburger bar도 가보자~~
🔥 Pull requests
⛳️ 작업한 브랜치
👷 작업한 내용
🚨 참고 사항
📸 스크린샷
📟 관련 이슈