✨[feat]: Feature/more info 팀약속 뷰 구현 #10
Conversation
| role: String, | ||
| imageName: String, | ||
| mbti: MBTI?, | ||
| introduction: String? = nil, |
Peter1119
left a comment
There was a problem hiding this comment.
뭔가 중복된 작업이 있는 것 같은데 머시 후에 정리할 필요가 있겠네요 🤔
|
|
||
| @Model | ||
| final class IntroductionRowModels: Identifiable, Hashable { | ||
| var id = UUID() | ||
| var name: String | ||
| var role: String | ||
| var imageName: String | ||
| var mbti: MBTI? | ||
| var introduction: String? | ||
| var isLeader: Bool | ||
|
|
There was a problem hiding this comment.
row model을 내부데이터로 저장가능하게 구현하신걸까요??
There was a problem hiding this comment.
@Peter1119 이건 아마 삭제 할꺼여서 develop 에서 합치고 하는게 좋을거 같네여
| func body(content: Content) -> some View { | ||
| content | ||
| .padding(15) | ||
| .frame(maxWidth: .infinity, alignment: .leading) | ||
| .background( | ||
| RoundedRectangle(cornerRadius: 16) | ||
| .fill(.staticWhite) | ||
| ) | ||
| .overlay( | ||
| RoundedRectangle(cornerRadius: 16) | ||
| .stroke(.borderInactive, lineWidth: 0.5) | ||
| ) | ||
| .shadow(color: .shadowDefault, radius: 3, x: 0, y: 1) | ||
| } | ||
| func body(content: Content) -> some View { | ||
| content | ||
| .padding(15) | ||
| .frame(maxWidth: .infinity, alignment: .leading) | ||
| .background( | ||
| RoundedRectangle(cornerRadius: 16) | ||
| .fill(.staticWhite) | ||
| ) | ||
| .overlay( | ||
| RoundedRectangle(cornerRadius: 16) | ||
| .stroke(.borderInactive, lineWidth: 0.5) | ||
| ) | ||
| .shadow(color: .shadowDefault, radius: 3, x: 0, y: 1) | ||
| } |
There was a problem hiding this comment.
이거 줄 간격 컨벤션을 맞추면 좋을 것 같은데
동일하게 가지 않으면 코드리뷰에서 이전에 했던 것들이 올라오네요 ~!
| // 화면에 쓸 리스트 (DB가 비어 있으면 mock 사용) | ||
| private var displayItems: [IntroductionRowModels] { | ||
| items.isEmpty ? IntroductionRowModels.mockData : items | ||
| } |
There was a problem hiding this comment.
우선 db 비어있으면 mock 사용은 오류가 많을 것 같습니다
id를 넘기면서 뷰 전환 및 데이터를 불러오는데
이렇게 되면 id가 불일치하게 되어서 에러가 떨어질 것 같네요
| ZStack { | ||
| Color.white | ||
| .edgesIgnoringSafeArea(.all) | ||
|
|
||
| VStack { | ||
| Spacer() | ||
| .frame(height: 14) | ||
|
|
||
| CustomNavigationBackBar(text: "팀 약속") { | ||
| coordinator.goBack() | ||
| } | ||
|
|
||
|
|
||
| teamAgreeMentHeader() | ||
|
|
||
| agreeMentCard() | ||
|
|
||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
그 .. 이건 그대로 가실건가요 ?
Color.white 때문에 ZStack으로 하는게 이유를 잘 모르겠습니다
There was a problem hiding this comment.
@Peter1119 이건 뒤에 배경을 흰색으로 고정 할려고 해서 하는겁니다 !
There was a problem hiding this comment.
.background(.white)로 가도 되지 않나요 ???
| VStack { | ||
| Image(asset: .teamiIntroduce) | ||
| .resizable() | ||
| .scaledToFit() | ||
| .frame(width: 56, height: 56) | ||
|
|
||
| Spacer().frame(height: 10) | ||
|
|
||
| HStack { | ||
| Spacer() | ||
|
|
||
| Text("우리의 약속") | ||
| .pretendardFont(family: .medium, size: 16) | ||
| .foregroundStyle(.textPrimary) | ||
|
|
||
| Spacer() | ||
| } | ||
|
|
||
| Spacer().frame(height: 10) | ||
|
|
||
| HStack { | ||
| Spacer() | ||
| TypingText( | ||
| text: "더 나은 팀이 되기 위해 함께 지켜나갈 소중한 약속들입니다.", | ||
| font: .pretendardFontFamily(family: .bold, size: 16), | ||
| perChar: 0.06, | ||
| startDelay: 0.15, | ||
| showsCursor: false | ||
| ) | ||
| Spacer() | ||
| } | ||
| } |
There was a problem hiding this comment.
VStack(spacing: 10, aligment: .top)으로 하면 되지 않을까요 ?
| private func agreeMentCard() -> some View { | ||
| let indices = Array(agreeMentItem.indices) | ||
| ScrollView(.vertical) { | ||
| ForEach(indices, id: \.self) { index in | ||
| let item = agreeMentItem[index] | ||
| agreeMenListitem( | ||
| number: item.number, | ||
| agreeMentTitle: item.agreeMentTitle, | ||
| agreeMentSubTitle: item.agreeMentSubTitle, | ||
| circleColor: item.color, | ||
| fontColor: item.color | ||
| ) | ||
| .staggeredAppear(index: index, currentMaxIndex: $currentMaxIndex) | ||
| } | ||
| } | ||
| .scrollIndicators(.hidden) | ||
| } | ||
|
|
There was a problem hiding this comment.
원지님 Xcode 설정에서 오타 감지할 수 있는 모드가 있어서 그거 활용하시면 좋을 것 같아요 ~!
…duction into Feature/moreInfo_teanAgreement # Conflicts: # TeamIntroduce/TeamIntroduce/Sources/Core/Data/Item.swift # TeamIntroduce/TeamIntroduce/Sources/Presnetaion/IntroduceMain/Coordinator/View/IntorduceCoordinatorView.swift
🔗 관련 이슈
✨ 작업 내용
Close Issues 🔒 (닫을 Issue)
Close #2