Skip to content

6차 세미나 과제#9

Open
joho2022 wants to merge 1 commit intomainfrom
feature/week6
Open

6차 세미나 과제#9
joho2022 wants to merge 1 commit intomainfrom
feature/week6

Conversation

@joho2022
Copy link
Collaborator

@joho2022 joho2022 commented Nov 29, 2024

📋 작업한 내용

  • 기존 UIKit 베이스로 구현되어 있기 때문에
    SwiftUI로 리스트를 구현한 뷰를
    UIHostingController으로 활용하여
    UIKit 환경에서 SwiftUI 뷰를 통합할 수 있도록 구현했습니다.

💻 결과

Simulator Screen Recording - iPhone 16 Pro - 2024-11-29 at 23 13 25

Copy link
Member

@sozohoy sozohoy left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 !!

Comment on lines +39 to +55
var body: some View {
Group {
switch downloadState {
case .download:
Text("받기")
.foregroundColor(.blue)
case .update:
Text("업데이트")
.foregroundColor(.blue)
case .installed:
Text("설치됨")
.foregroundColor(.gray)
case .paid(let price):
Text("₩\(price)")
.foregroundColor(.blue)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

  • Group을 사용한 이유는 무엇인가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

각 텍스트에 동일한 속성을 설정하고 싶었는데, 처음에 VStack으로 묶어서 한번에 공통적인 속성을 설정할려다가 비록 컴포넌트 하나뿐이지만 레이아웃에 영향이 미친다고 판단해서,

Group으로 레이아웃에 영향없이 단순히 뷰를 묶고, 공통 스타일 설정할 수 있는 것이 지금 상황에 적합하다고 생각해서 사용하게 되었습니다.

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.

2 participants