-
Notifications
You must be signed in to change notification settings - Fork 1
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] 프로필 수정 뷰 수정사항 반영 #532
Conversation
@jane1choi "프로필 수정 요청 기능" 이라는 게 요청 request 말하는 건가? 이거랑 아마 저장버튼 활성화/비활성화 기능, 진입시기 안 될 것 같은데 언니 이거 이어서 하는 거 혹시 부담됑 ?? |
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.
확인이여 ~
/// 제1, 제2전공 중복 선택 검사, 중복되지 않으면 true | ||
private func checkMajorDuplicate(firstTextField: UITextField, secondTextField: UITextField) -> Bool { | ||
return !(firstTextField.text == secondTextField.text) | ||
} | ||
} | ||
|
||
// MARK: - UI | ||
extension EditProfileVC { | ||
private func configureUI() { | ||
profileImgView.image = UIImage(named: "profileImage\(userInfo.profileImageID)") | ||
nickNameTextField.placeholder = userInfo.nickname | ||
isOnQuestionToggleBtn.isSelected = userInfo.isOnQuestion | ||
firstMajorTextField.text = userInfo.firstMajorName | ||
firstMajorStartTextField.text = userInfo.firstMajorStart | ||
secondMajorTextField.text = userInfo.secondMajorName | ||
secondMajorStartTextField.text = userInfo.secondMajorStart | ||
checkSecondMajorStatus() | ||
|
||
// 프로필 사진 변경 바텀시트를 present하는 메서드 | ||
private func presentChangeProfileImgVC() { | ||
let slideVC = EditProfileImgModalVC() | ||
slideVC.modalPresentationStyle = .custom | ||
slideVC.transitioningDelegate = self | ||
self.isPresentingHalfModal = false | ||
self.present(slideVC, animated: true) | ||
} | ||
|
||
private func changeLabelColor(isOK: Bool, label: UILabel) { | ||
label.textColor = isOK ? .gray3 : .red | ||
// HalfModalView를 present하는 메서드 |
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.
여기 주석 /// 세 개로 통일해야 할 것 같아여 ~
secondMajorStartTextField.text = userInfo.secondMajorStart | ||
checkSecondMajorStatus() | ||
|
||
introTextView.rx.text.orEmpty |
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.
감사용 ~
ㅎㅎ 작업한거 이 브랜치에 커밋 잘못 해서..,, 모두 revert 해주었습니당 |
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.
고생했어요~
…' into chore/#509-UI-Mypage-EditProfile
@hwangJi-dev @dev-madilyn |
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.
리뷰 한번만 확인해주세요~
case 1: | ||
defaultSelectedBtn = profileImgBtn3 | ||
case 2: | ||
defaultSelectedBtn = profileImgBtn5 | ||
case 3: | ||
defaultSelectedBtn = profileImgBtn2 | ||
case 4: | ||
defaultSelectedBtn = profileImgBtn4 | ||
case 5: | ||
defaultSelectedBtn = profileImgBtn5 | ||
default: |
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.
요기 originalProfileImgID case number랑 profileImgBtn number랑 달라지는 이유가 무엇인가요?
switch selectedImg { | ||
case UIImage(named: "profileImage1"): | ||
selectedProfileImgID = 1 | ||
case UIImage(named: "profileImage2"): | ||
selectedProfileImgID = 2 | ||
case UIImage(named: "profileImage3"): | ||
selectedProfileImgID = 3 | ||
case UIImage(named: "profileImage4"): | ||
selectedProfileImgID = 4 | ||
case UIImage(named: "profileImage5"): | ||
selectedProfileImgID = 5 |
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.
ID 숫자값이랑 UIImage name 숫자값이랑 같으니까 delegate 전달할 때 UIImage의 에셋이름중 숫자값을 넘기는건 어떨까요?
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.
확인!
if sender != defaultSelectedBtn { | ||
completeBtn.isActivated = true | ||
} else { | ||
completeBtn.isActivated = false | ||
} |
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.
이부분 completeBtn.isActivated = sender != defaultSelectedBtn
로 수정할 수 있을 것 같아여~!~
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.
확인했어요~ 고생했어!!
🍎 관련 이슈
closed #509
🍎 변경 사항 및 이유
프로필 수정 뷰의 UI 수정 사항을 반영했습니다.
🍎 PR Point
textView
추가 및 글자수 제한 기능을 구현했습니다.univID
가 다를 경우 해당옵션의majorID
또한 다르기 때문에EditProfileVC
에서 학과리스트 요청 통신을 secondMajor filter를 걸어 통신을 한 번 더 해주었습니다.univID
가 다를 경우majorID
또한 다르다는 걸 확인해서 싱글톤에 담아둔 id로 학교마다 다르게 구분되어 요청이 갈 수 있도록 코드를 수정했습니다.EditProfileVC.swift
파일 extension 순서 배치도 컨벤션에 맞게 바꿔놓아서 바뀐게 많아서 미리보기가 안뜰텐데 load diff눌러서 코드 확인해주세여...+ 프로필 수정 뷰 UI는 거의 완료했는데 (에셋 나오지 않은거 + 진입시기의 경우 정빈이가 어떻게 리스트에 넣었는지 확인을 못해서 요부분빼고), 프로필 수정 요청 기능 구현의 경우 담당자가 원래 정빈이었어서 요거 이어서 맡을지 아니면 제가 계속할지? 논의가 필요할 것 같습니당! @dev-madilyn 확인 한번 해주세여~!
📸 ScreenShot
Simulator.Screen.Recording.-.iPhone.11.-.2022-10-11.at.16.24.54.mp4
Simulator.Screen.Recording.-.iPhone.11.-.2022-10-11.at.16.25.14.mp4
Simulator.Screen.Recording.-.iPhone.11.-.2022-10-15.at.16.08.44.mp4