Skip to content

[#21] feat : chopper week3#25

Open
gkswlals104 wants to merge 1 commit intomainfrom
chopper-week3
Open

[#21] feat : chopper week3#25
gkswlals104 wants to merge 1 commit intomainfrom
chopper-week3

Conversation

@gkswlals104
Copy link
Copy Markdown
Contributor

📂 관련 이슈

  • closes #[21]

🛠️ 작업 사항

  1. 탭바 섹션
  • 홉 탭에는 홈 화면, 마이페이지에는 회원 화면 연결
  1. 화면 연결
  • 회원 정보 버튼 누르면 회원 정보 관리 화면으로 이동
  1. 홈 뷰 제작
  • 상단 헤어 제작
  • 무비카드 제작
  • 메가박스 특별관 제작
  1. 영화 상세 정보 섹션
  • 홈에서 받은 영화 이름 나오게 하기
  • 상세정보, 실관람평 세그먼트 버튼 구현
  1. 시연 영상
  • iPhone 17 프로맥스, 11 비교 영상 촬영 완료

📸 관련 이미지 (스크린샷 또는 동영상)

3.17.pro.mov
3.11.mov

💬 기타 설명

💡 추가적으로 공유할 내용이나 리뷰어에게 전달할 사항이 있다면 작성해 주세요.

@gkswlals104 gkswlals104 requested a review from guingguing April 4, 2026 20:53
@gkswlals104 gkswlals104 self-assigned this Apr 4, 2026
@gkswlals104 gkswlals104 linked an issue Apr 4, 2026 that may be closed by this pull request
2 tasks
@gkswlals104 gkswlals104 changed the title closes #[21] [#21] feat : chopper week2 Apr 4, 2026
@gkswlals104 gkswlals104 changed the title [#21] feat : chopper week2 [#21] feat : chopper week3 Apr 4, 2026
Copy link
Copy Markdown
Contributor

@guingguing guingguing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

쵸파 2, 3주차 과제 피드백


import SwiftUI

struct CombineView: View {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

마이페이지 뷰의 이름이 CombineView로 되어 있는데, 역할이 명확하게 드러나지 않아 다른 팀원이 코드를 이해하기 어려울 수 있습니다.
MyPageView나 UserInfoView처럼 기능을 직관적으로 알 수 있는 이름으로 변경하는 것을 추천드립니다.

또한 HeaderView, MemberInfoView 등 작은 단위의 컴포넌트 파일이 많이 분리되어 있어 전체 구조를 파악하기 어려운 부분이 있습니다.
간단한 UI 컴포넌트의 경우 CombineView 내부에 포함시키거나,
Components / Subviews 폴더를 따로 만들어 정리하면 가독성과 유지보수성이 더 좋아질 것 같습니다.


import Foundation

struct MovieModel: Identifiable {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

티모의 폴더 구조 팁 ~ 🍄📁

Model은 따로 Model 폴더를 만들어서 관리하는 것이 좋다!

프로젝트 규모가 커질수록 파일이 많아지기 때문에,
Model을 한 곳에 모아두면 구조 파악이 훨씬 쉬워지고 유지보수도 편해져요 👍

예시)

📁 Model
 ├── MovieModel.swift
 ├── LoginModel.swift

이렇게 역할별로 폴더를 나누는 습관을 들이면
나중에 협업할 때도 코드 찾기가 훨씬 쉬워집니다.

Comment on lines +44 to +56
.navigationDestination(isPresented: $isMoveToDetail) {
MovieDetailView(
title: viewModel.selectedMovie?.title ?? "",
englishTitle: viewModel.selectedMovie?.englishTitle ?? "",
imageName: viewModel.selectedMovie?.detailImageName ?? "",
description: viewModel.selectedMovie?.description ?? "",
age: viewModel.selectedMovie?.age ?? "",
openInfo: viewModel.selectedMovie?.openInfo ?? "",
genre: viewModel.selectedMovie?.genre ?? "",
type: viewModel.selectedMovie?.type ?? "",
director: viewModel.selectedMovie?.director ?? "",
cast: viewModel.selectedMovie?.cast ?? ""
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

상세 화면으로 데이터를 전달할 때 객체(Model) 통째로 전달해 보세요

현재 navigationDestination에서 영화의 제목, 이미지, 설명 등을 하나하나 개별 파라미터로 넘겨주고 계시네요! 이 방식보다는 MovieDetailView(movie: selectedMovie) 처럼 모델 객체 하나만 넘기는 것은 어떨까요?

MovieDetailView의 초기화 코드가 훨씬 간결해집니다.
나중에 영화 정보 데이터가 추가되더라도 HomeView의 코드를 수정할 필요가 없어 유지보수가 편해집니다.
SwiftUI의 navigationDestination(item:) 기능을 활용하면 데이터 존재 여부에 따른 화면 전환을 더 안전하게 처리할 수 있습니다.

참고 수정 코드 예시를 보내드립니다 ~

MovieDetailView 수정

struct MovieDetailView: View {
    let movie: MovieModel // 개별 변수 대신 모델 하나만 받음
    
    var body: some View {
        Text(movie.title) // 사용 시에는 movie.title로 접근
        // ...
    }
}

HomeView 수정

.navigationDestination(isPresented: $isMoveToDetail) {
    if let selectedMovie = viewModel.selectedMovie {
        MovieDetailView(movie: selectedMovie) // 훨씬 깔끔해진 코드!
    }
}

Comment on lines +169 to +178
Button {

} label: {
Image(systemName: "chevron.right")
.font(.system(size: 19, weight: .semibold))
.foregroundStyle(.black)
.frame(width: 48, height: 48)
.background(.ultraThinMaterial)
.clipShape(Circle())
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS 26 이후부터는 Liquid Glass 버튼 스타일이 새롭게 추가되었습니다!
Button(...)에 .buttonStyle(.glass)를 적용하면
자동으로 Liquid Glass 효과가 적용된 버튼을 손쉽게 만들 수 있습니다


import SwiftUI

struct MemberNavigationView: View {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NavigationBar를 따로 만들어줄 수도 있지만,
.navigationTitle(...)만으로도
간단히 네비게이션 타이틀을 설정할 수 있습니다 🎉

예시 코드를 남겨둘테니 참고하세요!

import SwiftUI

struct ContentView: View {
    @State var isShow: Bool = false
        
    var body: some View {
        NavigationStack {
            Button(action: {
                isShow.toggle()
            }, label: {
                Text("Say Hi!")
            })
            .navigationDestination(isPresented: $isShow, destination: {
                HelloWorldView()
            })
        }
    }
}

struct HelloWorldView: View {
    var body: some View {
        Text("Hello, World!")
            .navigationTitle(Text("Hi!"))
    }
}

#Preview {
    ContentView()
}

Image Image

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.

[Feat] 3주차 과제_쵸파

2 participants