Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import DevLogDomain

/// NavigationBar의 배경색을 지정하고 shadowColor를 제거하는 구조체
///
/// 기본적으로 ``UIColor/systemBackground``를 배경색으로 사용하며,
/// 기본적으로 ``UIColor/systemGroupedBackground``를 배경색으로 사용하며,
/// 자체 `NavigationStack`을 가진 뷰에서는 `alwaysVisible`을 `true`로 설정하여
/// 스크롤 위치와 관계없이 배경색이 항상 표시되도록 할 수 있다.
struct NavigationBarConfigurator: UIViewControllerRepresentable {
Expand All @@ -20,7 +20,7 @@ struct NavigationBarConfigurator: UIViewControllerRepresentable {
/// 지정된 배경색으로 Configurator를 생성한다.
///
/// - Parameter backgroundColor: NavigationBar에 적용할 배경색.
init(_ backgroundColor: UIColor = .systemBackground) {
init(_ backgroundColor: UIColor = .systemGroupedBackground) {
self.backgroundColor = backgroundColor
self.alwaysVisible = false
}
Expand All @@ -32,7 +32,7 @@ struct NavigationBarConfigurator: UIViewControllerRepresentable {
/// - alwaysVisible: `true`이면 스크롤 위치와 관계없이 배경색이 항상 표시된다.
/// 자체 `NavigationStack`을 가진 뷰에서 사용한다.
@available(iOS, deprecated: 18, message: "iOS 18 이상에서는 alwaysVisible 파라미터가 없는 생성자를 사용한다.")
init(_ backgroundColor: UIColor = .systemBackground, alwaysVisible: Bool) {
init(_ backgroundColor: UIColor = .systemGroupedBackground, alwaysVisible: Bool) {
self.backgroundColor = backgroundColor
if #available(iOS 18.0, *) {
self.alwaysVisible = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct TodoDetailContentView: View {

var body: some View {
ZStack {
Color(.secondarySystemBackground).ignoresSafeArea()
Color(.systemGroupedBackground).ignoresSafeArea()
ScrollView {
LazyVStack(alignment: .leading, spacing: 10) {
HStack(alignment: .firstTextBaseline, spacing: 8) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct TodoDetailView: View {

var body: some View {
ZStack {
Color(.secondarySystemBackground).ignoresSafeArea()
Color(.systemGroupedBackground).ignoresSafeArea()
if let todo = viewModel.state.todo, let number = todo.number {
TodoDetailContentView(
title: todo.title,
Expand Down Expand Up @@ -55,7 +55,7 @@ struct TodoDetailView: View {
}
}
}
.background(Color(.secondarySystemBackground))
.background(Color(.systemGroupedBackground))
.presentationDragIndicator(.visible)
}
.fullScreenCover(isPresented: Binding(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ struct TodoEditorView: View {
}
}
}
.background(Color(.secondarySystemBackground))
.background(Color(.systemGroupedBackground))
.presentationDragIndicator(.visible)
}
.toolbar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ struct TodoListView: View {
}
}
.background(NavigationBarConfigurator())
.background(Color(.systemGroupedBackground))
Comment thread
opficdev marked this conversation as resolved.
.task { viewModel.send(.onAppear) }
}

Expand Down Expand Up @@ -201,7 +202,7 @@ struct TodoListView: View {
if #available(iOS 26.0, *) {
Color.clear
} else {
Color(.systemBackground)
Color(.systemGroupedBackground)
}
}
.offset(y: headerOffset)
Expand Down
8 changes: 4 additions & 4 deletions Application/DevLogPresentation/Sources/Main/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ struct MainView: View {
}
}
}
.background(Color(.secondarySystemBackground).ignoresSafeArea())
.background(Color(.systemGroupedBackground).ignoresSafeArea())
case .profile:
NavigationSplitView {
mainSidebar
Expand Down Expand Up @@ -236,7 +236,7 @@ struct MainView: View {
homeDestinationView(homeRoute)
}
}
.background(Color(.secondarySystemBackground).ignoresSafeArea())
.background(Color(.systemGroupedBackground).ignoresSafeArea())
}

@ViewBuilder
Expand Down Expand Up @@ -304,7 +304,7 @@ struct MainView: View {
todayDestinationView(todayRoute)
}
}
.background(Color(.secondarySystemBackground).ignoresSafeArea())
.background(Color(.systemGroupedBackground).ignoresSafeArea())
}

@ViewBuilder
Expand Down Expand Up @@ -349,7 +349,7 @@ struct MainView: View {
profileRegularDestinationView(route)
}
}
.background(Color(.secondarySystemBackground).ignoresSafeArea())
.background(Color(.systemGroupedBackground).ignoresSafeArea())
}

@ViewBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ struct PushNotificationListView: View {
var body: some View {
NavigationStack {
notificationList
.background(NavigationBarConfigurator(.secondarySystemBackground, alwaysVisible: true))
.background(Color(.systemGroupedBackground))
Comment thread
opficdev marked this conversation as resolved.
.background(NavigationBarConfigurator(alwaysVisible: true))
.onScrollOffsetChange { offset in
guard isScrollTrackingEnabled else { return }
headerOffset = max(0, -offset)
Expand All @@ -35,7 +36,7 @@ struct PushNotificationListView: View {
.navigationTitle(String(localized: "nav_push_notifications"))
.listStyle(.plain)
}
.background(Color(.secondarySystemBackground).ignoresSafeArea())
.background(Color(.systemGroupedBackground).ignoresSafeArea())
.alert(
"",
isPresented: Binding(
Expand Down Expand Up @@ -75,7 +76,7 @@ struct PushNotificationListView: View {
}
}
}
.background(Color(.secondarySystemBackground))
.background(Color(.systemGroupedBackground))
.presentationDragIndicator(.visible)
}
.overlay {
Expand Down Expand Up @@ -167,7 +168,7 @@ struct PushNotificationListView: View {
if #available(iOS 26.0, *) {
Color.clear
} else {
Color(.secondarySystemBackground)
Color(.systemGroupedBackground)
}
}
.offset(y: headerOffset)
Expand Down
2 changes: 1 addition & 1 deletion Application/DevLogPresentation/Sources/Root/RootView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public struct RootView: View {
}
}
}
.background(Color(.secondarySystemBackground))
.background(Color(.systemGroupedBackground))
.presentationDragIndicator(.visible)
}
}
Expand Down