Skip to content

[#185] TodoDetailView에서 내비게이션타이틀의 라지 사이즈만큼 영역을 먹고 있는 현상을 해결한다#189

Merged
opficdev merged 8 commits intodevelopfrom
fix/#185-navigation
Mar 5, 2026
Merged

[#185] TodoDetailView에서 내비게이션타이틀의 라지 사이즈만큼 영역을 먹고 있는 현상을 해결한다#189
opficdev merged 8 commits intodevelopfrom
fix/#185-navigation

Conversation

@opficdev
Copy link
Copy Markdown
Owner

@opficdev opficdev commented Mar 5, 2026

@opficdev opficdev self-assigned this Mar 5, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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!

이 PR은 TodoDetailView에서 내비게이션 타이틀이 과도한 공간을 차지하는 UI 레이아웃 문제를 해결하는 데 중점을 둡니다. 이를 위해 내비게이션 바 스타일링을 위한 NavigationBarConfigurator와 스크롤 추적을 위한 onScrollOffsetChange 확장 기능을 도입했습니다. 이 새로운 구성 요소들은 TodoListViewPushNotificationListView에 적용되어 헤더 동작과 구분선, 배경색 등 전반적인 시각적 일관성을 향상시키고, 다양한 iOS 버전에서 호환성을 보장합니다.

Highlights

  • 내비게이션 바 커스터마이징: 내비게이션 바의 그림자를 제거하고 배경색을 설정할 수 있는 새로운 NavigationBarConfigurator를 추가하여 UI 일관성을 향상시켰습니다.
  • 스크롤 오프셋 추적 기능 추가: 스크롤 뷰의 콘텐츠 오프셋을 추적하는 onScrollOffsetChange View 확장 기능을 구현하여 iOS 18 이상 버전과 이전 버전 모두를 지원합니다.
  • TodoDetailView UI 문제 해결: TodoDetailView에서 내비게이션 타이틀이 너무 많은 공간을 차지하는 문제를 해결하기 위해 .navigationBarTitleDisplayMode(.inline)을 적용했습니다.
  • TodoListView 및 PushNotificationListView 개선: 새로운 내비게이션 바 설정 및 스크롤 오프셋 추적 기능을 TodoListViewPushNotificationListView에 통합하여 헤더 동작과 시각적 일관성을 개선했습니다.
Changelog
  • DevLog/UI/Common/NavigationBarConfigurator.swift
    • 내비게이션 바의 외관을 구성하기 위한 새로운 UIViewControllerRepresentable을 추가했습니다.
    • 표준, 스크롤 엣지, 컴팩트 및 컴팩트 스크롤 엣지 외관에 대해 배경색을 설정하고 그림자를 제거할 수 있도록 했습니다.
    • 원래의 외관 설정을 저장하고 복원하는 기능을 포함했습니다.
    • iOS 26 가용성 검사를 추가했습니다.
  • DevLog/UI/Extension/View+.swift
    • onScrollOffsetChange View 확장 기능을 추가했습니다.
    • iOS 18 이상 버전에서는 onScrollGeometryChange를 사용하도록 구현했습니다.
    • 이전 iOS 버전에서는 UIViewRepresentableNSKeyValueObservation을 사용하여 contentOffset을 추적하는 ScrollViewOffsetTracker를 구현했습니다.
    • UIScrollView를 찾기 위한 헬퍼 메서드 findScrollViewfindScrollViewInSubviews를 포함했습니다.
  • DevLog/UI/Home/TodoDetailView.swift
    • 내비게이션 타이틀 영역 문제를 해결하기 위해 TodoDetailView.navigationBarTitleDisplayMode(.inline)을 적용했습니다.
  • DevLog/UI/Home/TodoListView.swift
    • headerOffsetisScrollTrackingEnabled 상태 변수를 추가했습니다.
    • .toolbarBackground(.visible, for: .navigationBar)NavigationBarConfigurator()로 대체했습니다.
    • 할 일 목록 콘텐츠의 SectionGroup으로 변경했습니다.
    • 조건부 구분선 렌더링을 위해 ForEach를 인덱스와 함께 반복하도록 수정했습니다.
    • iOS 26 이상에서 첫 번째 항목에 대한 조건부 Divider를 추가했습니다.
    • .listSectionSeparator(.hidden, edges: .top)을 추가했습니다.
    • 스크롤 오프셋을 추적하고 headerOffset을 업데이트하기 위해 onScrollOffsetChange를 통합했습니다.
    • 동적 오프셋과 배경을 가진 headerView를 배치하기 위해 safeAreaInset을 사용했습니다.
    • headerView의 하위 뷰에 scrollDisabledcontentMargins를 추가했습니다.
    • onAppear를 구현하여 headerOffset을 재설정하고 지연 후 isScrollTrackingEnabled를 활성화했습니다.
  • DevLog/UI/PushNotification/PushNotificationListView.swift
    • headerOffsetisScrollTrackingEnabled 상태 변수를 추가했습니다.
    • 알림 목록 콘텐츠의 SectionGroup으로 변경했습니다.
    • 조건부 구분선 렌더링을 위해 ForEach를 인덱스와 함께 반복하도록 수정했습니다.
    • 알림 행에 padding(.vertical, 8)을 추가했습니다.
    • iOS 26 이상에서 첫 번째 항목에 대한 조건부 Divider를 추가했습니다.
    • .listSectionSeparator(.hidden, edges: .top)을 추가했습니다.
    • 스크롤 오프셋을 추적하고 headerOffset을 업데이트하기 위해 onScrollOffsetChange를 통합했습니다.
    • 동적 오프셋과 배경을 가진 headerView를 배치하기 위해 safeAreaInset을 사용했습니다.
    • LoadingView 오버레이를 제거했습니다.
    • headerView의 하위 뷰에 scrollDisabledcontentMargins를 추가했습니다.
    • onAppear를 구현하여 headerOffset을 재설정하고 지연 후 isScrollTrackingEnabled를 활성화했습니다.
Activity
  • 이 풀 리퀘스트에는 아직 인간 활동이 기록되지 않았습니다.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

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

이 풀 리퀘스트는 TodoDetailView에서 내비게이션 타이틀의 라지 사이즈로 인해 발생하는 영역 문제를 해결하고, TodoListViewPushNotificationListView에 스크롤 오프셋 추적 및 커스텀 내비게이션 바 배경 설정을 추가합니다. 또한, iOS 18 미만 버전을 위한 스크롤 오프셋 추적 기능을 구현하여 하위 호환성을 확보했습니다. 전반적으로 기능 개선 및 UI/UX 향상에 기여하는 좋은 변경사항입니다.

I am having trouble creating individual review comments. Click here to see my feedback.

DevLog/UI/PushNotification/PushNotificationListView.swift (98-102)

high

이전 코드에서는 NavigationStack.overlayLoadingView가 있었으나, 현재 변경사항에서는 제거되었습니다. viewModel.state.isLoadingtrue일 때 사용자에게 로딩 피드백을 제공하는 부분이 사라져, 데이터 로딩 중 사용자 경험이 저하될 수 있습니다. 로딩 상태를 명확히 표시할 수 있는 다른 방법을 고려해야 합니다.

DevLog/UI/Common/NavigationBarConfigurator.swift (34-41)

medium

내비게이션 바의 standardAppearance, scrollEdgeAppearance, compactAppearance, compactScrollEdgeAppearance에 대해 shadowColorbackgroundColor를 설정하는 코드가 반복됩니다. 이 부분을 헬퍼 메서드로 추출하여 코드 중복을 줄이고 가독성을 높일 수 있습니다.

예를 들어, configureAppearance(_ appearance: UINavigationBarAppearance, with color: UIColor)와 같은 메서드를 만들어 중복 코드를 제거할 수 있습니다.

            navigationBar.standardAppearance = configureAppearance(navigationBar.standardAppearance, with: backgroundColor)
            navigationBar.scrollEdgeAppearance = configureAppearance(navigationBar.scrollEdgeAppearance ?? UINavigationBarAppearance(), with: backgroundColor)
            navigationBar.compactAppearance = configureAppearance(navigationBar.compactAppearance ?? UINavigationBarAppearance(), with: backgroundColor)
            navigationBar.compactScrollEdgeAppearance = configureAppearance(navigationBar.compactScrollEdgeAppearance ?? UINavigationBarAppearance(), with: backgroundColor)
        }
    }

    private func configureAppearance(_ appearance: UINavigationBarAppearance, with color: UIColor) -> UINavigationBarAppearance {
        let newAppearance = appearance
        newAppearance.shadowColor = .clear
        newAppearance.backgroundColor = color
        return newAppearance

DevLog/UI/Common/NavigationBarConfigurator.swift (48-55)

medium

마찬가지로 dismantleUIViewController 메서드에서도 내비게이션 바의 shadowColorbackgroundColor를 원래 값으로 복원하는 코드가 반복됩니다. 이 부분도 헬퍼 메서드를 사용하여 코드 중복을 줄일 수 있습니다.

        navigationBar.standardAppearance = restoreAppearance(navigationBar.standardAppearance, originalShadowColor: coordinator.originalShadowColor, originalBackgroundColor: coordinator.originalBackgroundColor)
        navigationBar.scrollEdgeAppearance = restoreAppearance(navigationBar.scrollEdgeAppearance ?? UINavigationBarAppearance(), originalShadowColor: coordinator.originalShadowColor, originalBackgroundColor: coordinator.originalBackgroundColor)
        navigationBar.compactAppearance = restoreAppearance(navigationBar.compactAppearance ?? UINavigationBarAppearance(), originalShadowColor: coordinator.originalShadowColor, originalBackgroundColor: coordinator.originalBackgroundColor)
        navigationBar.compactScrollEdgeAppearance = restoreAppearance(navigationBar.compactScrollEdgeAppearance ?? UINavigationBarAppearance(), originalShadowColor: coordinator.originalShadowColor, originalBackgroundColor: coordinator.originalBackgroundColor)
    }

    private func restoreAppearance(_ appearance: UINavigationBarAppearance, originalShadowColor: UIColor?, originalBackgroundColor: UIColor?) -> UINavigationBarAppearance {
        let newAppearance = appearance
        newAppearance.shadowColor = originalShadowColor
        newAppearance.backgroundColor = originalBackgroundColor
        return newAppearance

DevLog/UI/Home/TodoListView.swift (303-308)

medium

isScrollTrackingEnabledDispatchQueue.main.asyncAfter를 사용하여 0.3초 지연 후 활성화하는 방식은 레이아웃이 완전히 적용되지 않은 상태에서 스크롤 추적이 시작되는 것을 방지하기 위한 일반적인 해결책입니다. 하지만 이 고정된 지연 시간은 모든 기기 및 시스템 조건에서 안정적임을 보장하지 못할 수 있습니다. 경우에 따라 초기 스크롤 동작이 예상과 다르게 나타날 수 있는 잠재적인 불안정성이 있습니다. 더 견고한 방법이 있다면 고려해볼 수 있습니다.

DevLog/UI/PushNotification/PushNotificationListView.swift (205-210)

medium

isScrollTrackingEnabledDispatchQueue.main.asyncAfter를 사용하여 0.3초 지연 후 활성화하는 방식은 레이아웃이 완전히 적용되지 않은 상태에서 스크롤 추적이 시작되는 것을 방지하기 위한 일반적인 해결책입니다. 하지만 이 고정된 지연 시간은 모든 기기 및 시스템 조건에서 안정적임을 보장하지 못할 수 있습니다. 경우에 따라 초기 스크롤 동작이 예상과 다르게 나타날 수 있는 잠재적인 불안정성이 있습니다. 더 견고한 방법이 있다면 고려해볼 수 있습니다.

@opficdev opficdev merged commit 417afa9 into develop Mar 5, 2026
1 check passed
@opficdev opficdev deleted the fix/#185-navigation branch March 5, 2026 10:19
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.

TodoDetailView에서 내비게이션타이틀의 라지 사이즈만큼 영역을 먹고 있는 현상을 해결한다

1 participant