Skip to content
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

Week/7 #13

Merged
merged 23 commits into from
Jan 6, 2025
Merged

Week/7 #13

merged 23 commits into from
Jan 6, 2025

Conversation

choiyoubin
Copy link
Collaborator

@choiyoubin choiyoubin commented Dec 9, 2024

✏️ 작업중인 브랜치

💡 작업동기

  • 지난 과제로 SwiftUI로 구현한 부분, 그리고 아직 SwiftUI로 구현하지 않은 부분 리펙토링
    • 2개 이상의 뷰모델을 구현해보아야 합니다.
    • Grid / List 등을 사용해보아야 합니다.
    • 최대한 컴포넌트를 분리하세요.

🔑 주요 변경사항

  • TossView 컴포넌트 분리
  • ScrollView와 LazyHGrid 이용하여 paging 구현
crollView(.horizontal, showsIndicators: false) {
            LazyHGrid(rows: [GridItem(.flexible())], spacing: 0) {
                ForEach(0..<4, id: \.self) { index in
                    MainBannerCell(bannerViewModel: bannerViewModel, index: index)
                        .frame(width: UIScreen.main.bounds.width)
                }
            }
        }
        .scrollTargetBehavior(.paging)

scrollTargetBehavior

  • 스크롤 가능한 뷰의 스크롤 동작을 정의하는 유형
  • SwiftUI의 ScrollView 컴포넌트를 사용하여 스크롤링을 할때 어떤 스크롤 동작을 해줄지를 정의 가능

🖼️ 스크린샷

Simulator Screen Recording - iPhone 16 Pro - 2024-12-10 at 02 30 17

관련이슈

  • Week/7 #12
    에셋 이미지 추가가 많아 File Changed가 많습니다ㅜ

과제 추가작업 12/14
reviewButton touch시 색변환되도록 함수 추가!

Simulator Screen Recording - iPhone 16 Pro - 2024-12-14 at 01 49 12

참고 사항

https://green1229.tistory.com/406

@choiyoubin choiyoubin requested a review from sozohoy December 9, 2024 17:31
@choiyoubin choiyoubin self-assigned this Dec 9, 2024
@choiyoubin choiyoubin merged commit a831691 into develop Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant