Open
Conversation
sozohoy
approved these changes
Dec 2, 2024
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) | ||
| } | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
각 텍스트에 동일한 속성을 설정하고 싶었는데, 처음에 VStack으로 묶어서 한번에 공통적인 속성을 설정할려다가 비록 컴포넌트 하나뿐이지만 레이아웃에 영향이 미친다고 판단해서,
Group으로 레이아웃에 영향없이 단순히 뷰를 묶고, 공통 스타일 설정할 수 있는 것이 지금 상황에 적합하다고 생각해서 사용하게 되었습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 작업한 내용
SwiftUI로 리스트를 구현한 뷰를
UIHostingController으로 활용하여
UIKit 환경에서 SwiftUI 뷰를 통합할 수 있도록 구현했습니다.
💻 결과