Skip to content

[#327] TodoListView에서 스크롤을 하면 ui가 멈추는 현상을 해결한다#328

Merged
opficdev merged 2 commits intodevelopfrom
fix/#327-TodoListView
Mar 28, 2026
Merged

[#327] TodoListView에서 스크롤을 하면 ui가 멈추는 현상을 해결한다#328
opficdev merged 2 commits intodevelopfrom
fix/#327-TodoListView

Conversation

@opficdev
Copy link
Copy Markdown
Owner

@opficdev opficdev self-assigned this Mar 28, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이번 풀 리퀘스트는 TodoListView에서 헤더 높이를 설정할 때 고정된 값을 더하는 대신 geometry의 높이를 반올림하도록 변경하였습니다. 리뷰를 통해 iOS 17부터 지원되는 onChange의 initial 파라미터를 사용하여 onAppear와 onChange를 통합하는 개선 사항이 제안되었습니다.

Comment on lines 305 to 310
.onAppear {
headerHeight = geometry.size.height + 1
headerHeight = geometry.size.height.rounded()
}
.onChange(of: geometry.size.height) { _, height in
headerHeight = height + 1
headerHeight = height.rounded()
}
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.

medium

iOS 17부터 onChange 수정자에 initial 파라미터가 추가되어 onAppearonChange를 하나로 합칠 수 있습니다. 코드를 더 간결하게 만들 수 있으니 적용해보시는 것을 추천합니다.

Suggested change
.onAppear {
headerHeight = geometry.size.height + 1
headerHeight = geometry.size.height.rounded()
}
.onChange(of: geometry.size.height) { _, height in
headerHeight = height + 1
headerHeight = height.rounded()
}
.onChange(of: geometry.size.height, initial: true) { _, height in
headerHeight = height.rounded()
}

@opficdev opficdev merged commit 36541a7 into develop Mar 28, 2026
1 check passed
@opficdev opficdev deleted the fix/#327-TodoListView branch March 28, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TodoListView에서 스크롤을 하면 ui가 멈추는 현상을 해결한다

1 participant