Conversation
퀘스트 질문, 마감 기한, 답변 개수, 답변 작성하기 버튼
juri123123
left a comment
There was a problem hiding this comment.
복잡한 뷰였을텐데 고생하셨습니다!
전체적으로 font를 FontManager 통해서 설정해주고 있는데 applyByeBooFont 이용해주면 좋을 것 같아요~
테이블뷰를 야무지게 활용한게 인상적입니다!
ByeBoo-iOS/ByeBoo-iOS/Presentation/Extension/UITableView+.swift
Outdated
Show resolved
Hide resolved
| struct CommonQuestAnswersEntity { | ||
| let question: String | ||
| let answerCount: Int | ||
| let isAnswered: Bool | ||
| let answers: [CommonQuestAnswerEntity] | ||
| } | ||
|
|
||
| struct CommonQuestAnswerEntity { | ||
| let answerID: Int | ||
| let writer: String | ||
| let profileIcon: String | ||
| let writtenAt: Date | ||
| let content: String | ||
| } |
...OS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/Cells/CommonQuestAnswersCell.swift
Outdated
Show resolved
Hide resolved
| private let yesterday: Int = -1 | ||
| private let tommorw: Int = 1 |
There was a problem hiding this comment.
오호 그냥 +1 -1이 아니라 상수로 선언해준거 좋네용 !
| private var isToday: Bool { | ||
| calendar.isDateInToday(currentDate) | ||
| } |
There was a problem hiding this comment.
extension에서 구현해준 moveYesterday/moveTommorw에서 updateNextButton 메서드를 사용하고, updateNextButton 메서드에서 isToday 계산속성을 사용해서 같은 extension에 위치시켰어요!
y-eonee
left a comment
There was a problem hiding this comment.
복잡한 뷰인데 정말 고생 많으셨습니다 !!!
| writer: "장원영", | ||
| profileIcon: "SO_SO", | ||
| writtenAt: Date.now, | ||
| content: "헤어진 지 벌써 일주일이 지났습니다. 처음에는 실감이 안 나서 눈물조차 나오지 않았어요. 그저 멍하니 천장만 바라보며 시간을 보냈습니다. 그런데 오늘 아침, 습관적으로 휴대폰을 확인하다가 더 이상 '굿모닝' 인사를 보낼 사람이 없다는 사실을 깨닫고 그제야 무너져 내렸습니다. 밥알이 모래알 같아서 잘 넘어가지도 않네요. 친구들은 시간이 약이라고, 더 좋은 사람 만날 거라고 위로하지만 지금 당장은 그 어떤 말도 귀에 들어오지 않습니다." |
...OS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/Cells/CommonQuestAnswersCell.swift
Outdated
Show resolved
Hide resolved
| if let profileIcon { | ||
| userIconView.image = profileIcon | ||
| } else { | ||
| userIconView.do { | ||
| $0.backgroundColor = .grayscale600 | ||
| $0.layer.cornerRadius = 10 | ||
| } | ||
| } |
There was a problem hiding this comment.
근데 프로필아이콘은 모든 사람들이 다 가지고 있지 않나여? 기본 배경값 설정을 해주신 이유가 궁금합니다!!
There was a problem hiding this comment.
호옥시나 서버에서 프로필 이미지 타이틀을 잘못 넘겨줬을 때를 디버깅하기 위한 코드입니당
| $0.textColor = .grayscale50 | ||
| $0.font = FontManager.sub3M18.font | ||
| $0.numberOfLines = 0 | ||
| $0.lineBreakStrategy = [] |
There was a problem hiding this comment.
우와 linebrakemode랑은 또 다른 친구군요
차이점 찾아봤는데 lineBreakStrategy가 한글 지원하는 거 빼고 조금 헷갈리네요
| } | ||
|
|
||
| override func setDelegate() { | ||
| rootView.commonQuestTableView.do { |
| private enum ProfileIcon: String, CaseIterable { | ||
| case sad = "SAD" | ||
| case selfUnderstanding = "SELF_UNDERSTANDING" | ||
| case soso = "SO_SO" | ||
| case relieved = "RELIEVED" | ||
|
|
||
| var image: UIImage { | ||
| switch self { | ||
| case .sad: | ||
| return .sadnessBadge | ||
| case .selfUnderstanding: | ||
| return .selfUnderstandingBadge | ||
| case .soso: | ||
| return .sosoBadge | ||
| case .relieved: | ||
| return .relievedBadge | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
ByeBooEmotion enum 만들어둔게 있는데 그 이넘에 image를 추가하는 방식은 어떨까요?? jw
There was a problem hiding this comment.
적용해보려고 했는데 enum 안에 케이스가 하나 달라서 어려울 것 같아요 ㅠㅠ
| historyButton.do { | ||
| $0.setTitle("나의 답변 모아보기", for: .normal) | ||
| $0.setTitleColor(.primary200, for: .normal) | ||
| $0.titleLabel?.font = FontManager.cap1M12.font | ||
| $0.layer.cornerRadius = 12 | ||
| $0.layer.borderColor = UIColor.grayscale800.cgColor | ||
| $0.backgroundColor = UIColor.white.withAlphaComponent(0.05) | ||
| } |
There was a problem hiding this comment.
이거 컴포넌트가 있어요! !!!! .. TipTag 라는 이름으로 써있어가지고 ㅠㅠ 컴포넌트로 바꿀 수 있다면 교체하면 좋을 것 같습니당
🔗 연결된 이슈
📄 작업 내용