Conversation
opficdev
commented
Mar 3, 2026
- closed iOS 17에서 PushNotificationSettingsView의 presentationDetents가 제대로 작동하지 않는 버그를 해결한다 #175
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 풀 리퀘스트는 iOS 17에서 Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
PR은 iOS 17에서 presentationDetents가 제대로 동작하지 않는 버그를 수정하기 위해 관련 수정자(modifier)들을 올바른 뷰로 옮기는 변경사항을 담고 있습니다. 이 수정은 올바른 접근입니다. 다만, 변경된 코드에서 사용되는 시트의 높이(sheetHeight) 계산 방식에 잠재적인 문제가 있어, 이로 인해 UI가 의도치 않게 표시될 수 있습니다. 관련하여 한 가지 개선 제안을 리뷰 코멘트로 남겼습니다.
| ) | ||
| } | ||
| .presentationDragIndicator(.hidden) | ||
| .presentationDetents([.height(viewModel.state.sheetHeight)]) |
There was a problem hiding this comment.
.presentationDetents에 사용되는 viewModel.state.sheetHeight 값이 DatePicker의 높이만을 기준으로 계산되고 있습니다. NavigationStack에 의해 추가되는 네비게이션 바의 높이가 포함되지 않아 시트의 상단 컨텐츠(네비게이션 바)가 잘릴 수 있습니다.
sheetHeight를 계산하는 GeometryReader를 NavigationStack 전체에 적용하여 시트의 전체 컨텐츠 높이를 측정하도록 수정하는 것을 고려해보세요.
예시:
NavigationStack {
// ... DatePicker and toolbar ...
}
.background(
GeometryReader { geometry in
Color.clear.onAppear {
viewModel.send(.setSheetHeight(geometry.size.height))
}
}
)
.presentationDragIndicator(.hidden)
.presentationDetents([.height(viewModel.state.sheetHeight)])