Skip to content

Commit 15cb106

Browse files
authored
[#334] TodoList의 헤더가 보이지 않는 현상을 해결한다
* fix: 일부 하드코딩으로 헤더의 높이를 정확하게 지정 (#335)
1 parent e95ff19 commit 15cb106

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

DevLog/UI/Home/TodoListView.swift

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ struct TodoListView: View {
1212
@Environment(NavigationRouter.self) var router
1313
@Environment(\.diContainer) var container: DIContainer
1414
@Environment(\.colorScheme) private var colorScheme
15-
@State private var headerOffset: CGFloat = 0
16-
@State private var headerHeight: CGFloat = .pi
15+
@State private var headerOffset: CGFloat = .zero
1716
@State private var isScrollTrackingEnabled = false
1817

1918
var body: some View {
@@ -298,20 +297,11 @@ struct TodoListView: View {
298297
sortMenu
299298
filterMenu
300299
}
301-
// iOS 26.4부터 헤더의 높이가 달라져서 리스트에서 필터링된 Todo가 없으면 사라지는 현상 해결
302-
.background {
303-
GeometryReader { geometry in
304-
Color.clear
305-
.onChange(of: geometry.size.height, initial: true) { _, height in
306-
headerHeight = height.rounded()
307-
}
308-
}
309-
}
310300
}
311301
.scrollIndicators(.never)
312302
.scrollDisabled(!isScrollTrackingEnabled)
313303
.contentMargins(.leading, 16, for: .scrollContent)
314-
.frame(height: headerHeight)
304+
.frame(height: UIFont.preferredFont(forTextStyle: .body).lineHeight.rounded(.up) + 20)
315305
.onAppear {
316306
headerOffset = 0
317307
isScrollTrackingEnabled = false

0 commit comments

Comments
 (0)