Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DevLog/UI/Extension/View+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,15 @@ extension View {
self.foregroundStyle(Color(.label))
.padding(8)
.glassEffect(.regular.tint(color), in: shape)
.clipShape(shape)
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.

critical

이 코드가 포함된 if #available(iOS 26.0, *) 조건문은 glassEffect가 사용된 것으로 보아 visionOS를 대상으로 하는 것으로 보입니다. 하지만 iOS 26.0은 유효한 OS 버전이 아니므로 이 조건은 항상 거짓이 되어, 이 코드 블록은 절대로 실행되지 않습니다.

visionOS 용 코드를 분기하려면 #if os(visionOS) 전처리기 지시문을 사용하는 것이 올바른 방법입니다.

#if os(visionOS)
    self.foregroundStyle(Color(.label))
        .padding(8)
        .glassEffect(.regular.tint(color), in: shape)
        .clipShape(shape)
#else
    // ... 다른 OS를 위한 fallback 코드
#endif

현재 구현은 의도와 다르게 항상 else 블록의 코드를 실행하게 되므로, visionOS 특정 UI가 적용되지 않는 심각한 문제입니다. 상위의 if #available 문을 수정해주세요.

} else {
self.foregroundStyle(Color(.label))
.padding(8)
.background {
Group {
if color == .clear {
shape
.fill(.ultraThinMaterial)
.fill(Color(.systemGray5))
} else {
shape
.fill(color)
Expand Down