-
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] #88 - 명함생성뷰에서 피커뷰로 생년월일, mbti 설정 #102
Conversation
### Descriptions - 주석삭제 - FrontCardCreationViewCell 에 estimatedItemSize 를 zero 으로 설정(스보 설정 대신)
### Descriptions - Notification Center 을 활용해서 바텀시트에서 데이터 전달 - SelectBirthBottomViewController: 생년월일 커스텀 바텀시트 뷰 - SelectMBTIBottomViewController: MBTI 커스텀 바텀시트 뷰
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.
교수님 수고하셨습니당! 저는 개인적으로 뭔가 0,1,2 요렇게 비교하는거는 switch 문 쓰는게 조금 더 깔끔한 것 같아서 어떻게 생각하시는지 궁금합니당!!
if textField == birthTextField { | ||
textField.endEditing(true) | ||
presentingBirthBottomVCClosure?() | ||
} else if textField == mbtiTextField { | ||
textField.endEditing(true) | ||
presentingMBTIBottomVCClosure?() | ||
} else { | ||
textField.borderWidth = 1 | ||
textField.borderColor = .tertiary | ||
} |
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.
요거 switch 문으로 빼도 깔끔할 것 같아요!!
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.
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.
아아아 그럴수도 있겠군요... 그러면 교수님 서타일대로 써주세용!!
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 component == 0 { | ||
if pickerView.selectedRow(inComponent: component) == row { | ||
label.attributedText = NSAttributedString(string: yearList[row], attributes: [NSAttributedString.Key.font: UIFont.textBold01, NSAttributedString.Key.foregroundColor: UIColor.mainColorNadaMain]) | ||
|
||
} else { | ||
label.attributedText = NSAttributedString(string: yearList[row], attributes: [NSAttributedString.Key.font: UIFont.textRegular03, NSAttributedString.Key.foregroundColor: UIColor.quaternary]) | ||
} | ||
} else if component == 1 { | ||
if pickerView.selectedRow(inComponent: component) == row { | ||
label.attributedText = NSAttributedString(string: monthList[row], attributes: [NSAttributedString.Key.font: UIFont.textBold01, NSAttributedString.Key.foregroundColor: UIColor.mainColorNadaMain]) | ||
|
||
} else { | ||
label.attributedText = NSAttributedString(string: monthList[row], attributes: [NSAttributedString.Key.font: UIFont.textRegular03, NSAttributedString.Key.foregroundColor: UIColor.quaternary]) | ||
} | ||
} else if component == 2 { | ||
if pickerView.selectedRow(inComponent: component) == row { | ||
label.attributedText = NSAttributedString(string: dayList[row], attributes: [NSAttributedString.Key.font: UIFont.textBold01, NSAttributedString.Key.foregroundColor: UIColor.mainColorNadaMain]) | ||
|
||
} else { | ||
label.attributedText = NSAttributedString(string: dayList[row], attributes: [NSAttributedString.Key.font: UIFont.textRegular03, NSAttributedString.Key.foregroundColor: UIColor.quaternary]) | ||
} | ||
} |
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.
요기도 switch 써도 좋을 것 같습니다!
🌴 PR 요약
🌱 작업한 브랜치
🌱 작업한 내용
📸 스크린샷
📮 관련 이슈