Skip to content

Commit f230d85

Browse files
authored
[#320] TodoListView에서 Todo가 없는 카테고리인 경우, 필터링 및 정렬 메뉴를 선택하면 메뉴가 ui에서 보이지 않는 현상을 해결한다
* fix: 높이 하드코딩 대신 직접 height를 측정 후 적용하는 형태로 해결 (#324)
1 parent f7ec38a commit f230d85

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

DevLog/UI/Home/TodoListView.swift

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ struct TodoListView: View {
1313
@Environment(\.diContainer) var container: DIContainer
1414
@Environment(\.colorScheme) private var colorScheme
1515
@State private var headerOffset: CGFloat = 0
16+
@State private var headerHeight: CGFloat = .pi
1617
@State private var isScrollTrackingEnabled = false
1718

1819
var body: some View {
@@ -297,11 +298,23 @@ struct TodoListView: View {
297298
sortMenu
298299
filterMenu
299300
}
301+
// iOS 26.4부터 헤더의 높이가 달라져서 리스트에서 필터링된 Todo가 없으면 사라지는 현상 해결
302+
.background {
303+
GeometryReader { geometry in
304+
Color.clear
305+
.onAppear {
306+
headerHeight = geometry.size.height
307+
}
308+
.onChange(of: geometry.size.height) { _, height in
309+
headerHeight = height
310+
}
311+
}
312+
}
300313
}
301314
.scrollIndicators(.never)
302315
.scrollDisabled(!isScrollTrackingEnabled)
303316
.contentMargins(.leading, 16, for: .scrollContent)
304-
.frame(height: 36)
317+
.frame(height: headerHeight)
305318
.onAppear {
306319
headerOffset = 0
307320
isScrollTrackingEnabled = false

0 commit comments

Comments
 (0)