Skip to content

[#179] iOS 17의 TodoListView의 searchable이 포커싱 될 때 툴바가 보이는 현상을 해결한다#180

Merged
opficdev merged 2 commits intodevelopfrom
fix/#179-iOS17-searchable
Mar 4, 2026
Merged

[#179] iOS 17의 TodoListView의 searchable이 포커싱 될 때 툴바가 보이는 현상을 해결한다#180
opficdev merged 2 commits intodevelopfrom
fix/#179-iOS17-searchable

Conversation

@opficdev
Copy link
Copy Markdown
Owner

@opficdev opficdev commented Mar 4, 2026

@opficdev opficdev self-assigned this Mar 4, 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!

이 Pull Request는 iOS 17에서 TodoListView의 검색 기능 사용 시 발생하는 UI 문제를 해결하고, iOS 버전에 따른 searchable 수식어의 적용 방식을 개선합니다. 이를 통해 사용자 경험을 향상시키고, 코드의 가독성 및 유지보수성을 높였습니다. 또한, SearchView의 검색 로직도 간소화하여 전반적인 검색 기능 구현을 최적화했습니다.

Highlights

  • iOS 17 검색 기능 개선: iOS 17에서 TodoListViewsearchable이 포커싱될 때 툴바가 보이는 현상을 해결하기 위해 검색 로직을 재구성했습니다. iOS 17 이하 버전에서는 searchText의 상태에 따라 검색 결과를 표시하고 searchable 수식어를 직접 적용하도록 변경되었습니다.
  • iOS 18+ 버전 분기 처리: iOS 18 이상 버전에서는 isSearching 상태를 사용하여 검색 콘텐츠를 전환하고, searchable 수식어에 isPresented 매개변수를 활용하도록 코드를 분리하여 최신 iOS 버전의 기능을 활용합니다.
  • 검색 UI 로직 간소화: TodoListView에서 todoSearchContent 뷰의 역할을 iOS 18 이상으로 제한하고, 실제 검색 결과 표시 로직은 searchResultsContent로 분리했습니다. 또한, SearchView에서는 searchable 수식어 적용 방식을 간소화하여 불필요한 버전별 분기 처리를 제거했습니다.
  • 불필요한 리소스 제거: 사용되지 않는 로컬라이제이션 문자열인 "검색어를 입력해주세요."를 Localizable.xcstrings 파일에서 제거했습니다.
Changelog
  • DevLog/Resource/Localizable.xcstrings
    • 사용되지 않는 '검색어를 입력해주세요.' 로컬라이제이션 문자열을 제거했습니다.
  • DevLog/UI/Home/TodoListView.swift
    • iOS 18 이상과 그 이하 버전(iOS 17 포함)에 따라 searchable 수식어 적용 로직을 분기 처리했습니다.
    • iOS 18 이상에서만 todoSearchContent 뷰를 사용하도록 변경하고, searchable 수식어에 isPresented를 적용했습니다.
    • 검색 결과 표시 로직을 searchResultsContent라는 새로운 private var로 분리했습니다.
    • 툴바의 검색 버튼을 iOS 18 이상에서만 표시되도록 조건부 렌더링했습니다.
    • 검색어가 비어있을 때 '검색어를 입력해주세요.' 메시지를 표시하는 로직을 제거했습니다.
  • DevLog/UI/Search/SearchView.swift
    • searchableContent 뷰에서 searchQueryBindingsearchingBinding 변수를 제거하고 searchable 수식어를 직접 적용하도록 간소화했습니다.
    • iOS 버전에 따른 searchable 수식어의 조건부 적용 로직을 제거하여 일관된 동작을 보장했습니다.
Activity
  • 이 Pull Request는 이슈 #179를 해결하기 위해 생성되었습니다.
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

이 PR은 iOS 17에서 searchable 사용 시 툴바가 계속 보이는 버그를 수정하는 것을 목표로 하고 있습니다. iOS 18 이상과 미만 버전에 대해 분기 처리를 하여 문제를 해결한 점이 인상적입니다. 코드 구조를 개선하고 불필요한 지역화 문자열을 제거하는 등 좋은 변경 사항들이 포함되어 있습니다. 다만, 리뷰 과정에서 몇 가지 잠재적인 문제점을 발견했습니다. iOS 버전 호환성과 관련된 오타 및 로직 오류가 있어 수정이 필요해 보입니다. 또한, 검색 기능의 사용자 경험이 의도치 않게 변경되었을 가능성이 있어 확인이 필요합니다. 자세한 내용은 각 코드 리뷰 댓글을 참고해주세요.

Comment on lines 92 to 94
if #available(iOS 26.0, *) {
ToolbarSpacer(.fixed, placement: .topBarTrailing)
}
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.

critical

if #available(iOS 26.0, *) 구문은 오타인 것 같습니다. ToolbarSpacer는 iOS 16.0부터 사용 가능하므로 iOS 16.0으로 수정해야 합니다. 현재 코드는 의도한 대로 동작하지 않을 수 있습니다.

            if #available(iOS 16.0, *) {
                ToolbarSpacer(.fixed, placement: .topBarTrailing)
            }

Comment on lines +80 to +91
.searchable(
text: Binding(
get: { viewModel.state.searchQuery },
set: { viewModel.send(.setSearchQuery($0)) }
),
isPresented: Binding(
get: { viewModel.state.isSearching },
set: { viewModel.send(.setSearching($0)) }
),
placement: .navigationBarDrawer(displayMode: .always),
prompt: "검색"
)
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.

critical

searchable 수정자에서 isPresentedplacement 파라미터를 함께 사용하는 오버로드는 iOS 17.0부터 사용 가능합니다. #available(iOS 17.0, *) 확인 로직이 제거되어, 앱의 최소 지원 버전이 iOS 17.0 미만일 경우 컴파일 오류가 발생할 수 있습니다. 다른 파일에서 iOS 16.0을 지원하는 것으로 보이는 코드가 있어, 이 부분을 다시 확인하고 버전 분기 처리를 추가하는 것을 권장합니다.

Comment on lines +95 to 103
if #available(iOS 18, *) {
ToolbarItem(placement: .topBarTrailing) {
Button {
viewModel.send(.setIsSearching(true))
} label: {
Image(systemName: "magnifyingglass")
}
}
}
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 18 미만 버전에서는 검색 버튼(돋보기 아이콘)이 사라지고, 목록을 아래로 당겨야만 검색창이 나타나도록 변경되었습니다. 이는 기존에 버튼을 통해 검색을 시작하던 방식과 달라진 사용자 경험을 제공합니다. iOS 17의 툴바 버그를 해결하기 위한 의도적인 디자인 변경인지, 아니면 수정 과정에서 발생한 부수적인 효과인지 확인이 필요해 보입니다. 만약 의도하지 않은 변경이라면, iOS 17에서도 검색 버튼을 유지하면서 버그를 해결할 수 있는 다른 방법을 고려해볼 수 있습니다.

@opficdev opficdev merged commit 72525b8 into develop Mar 4, 2026
1 check passed
@opficdev opficdev deleted the fix/#179-iOS17-searchable branch March 4, 2026 07:50
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.

iOS 17의 TodoListView의 searchable이 포커싱 될 때 툴바가 보이는 현상을 해결한다

1 participant